Revert "fix: catch some discord bot errors"

This reverts commit 64f07a8c02.
This commit is contained in:
goat 2020-07-20 18:31:40 +02:00
parent 64f07a8c02
commit 5410981beb
3 changed files with 17 additions and 31 deletions

View file

@ -75,7 +75,7 @@ namespace Dalamud.Injector {
Thread.Sleep(1000);
#if NO
#if DEBUG
// Inject exception handler
NativeInject(process);
#endif

View file

@ -188,9 +188,7 @@ namespace Dalamud.DiscordBot {
string senderName;
string senderWorld;
if (this.dalamud.ClientState.LocalPlayer != null) {
if (playerLink == null)
{
if (playerLink == null) {
// chat messages from the local player do not include a player link, and are just the raw name
// but we should still track other instances to know if this is ever an issue otherwise
@ -208,16 +206,10 @@ namespace Dalamud.DiscordBot {
}
senderWorld = this.dalamud.ClientState.LocalPlayer.HomeWorld.GameData.Name;
}
else
{
} else {
senderName = wasOutgoingTell ? this.dalamud.ClientState.LocalPlayer.Name : playerLink.PlayerName;
senderWorld = playerLink.World.Name;
}
} else {
senderName = string.Empty;
senderWorld = string.Empty;
}
var rawMessage = message.TextValue;

View file

@ -170,13 +170,7 @@ namespace Dalamud.Game {
var messageCopy = message;
var senderCopy = sender;
Task.Run(async () => {
try {
await this.dalamud.BotManager.ProcessChatMessage(type, messageCopy, senderCopy);
} catch (Exception ex) {
Log.Error(ex, "Could not process discord bot message.");
}
});
Task.Run(() => this.dalamud.BotManager.ProcessChatMessage(type, messageCopy, senderCopy));
// Handle all of this with SeString some day
/*