Skip to content

Commit 1e4e98e

Browse files
committed
Fix a Discord unhandled exception
1 parent 65c2521 commit 1e4e98e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

GenOnlineService/Discord.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ public void PushDM(SocketUser user, string strMessage)
738738
{
739739
if (user != null)
740740
{
741-
user.SendMessageAsync(strMessage);
741+
user.SendMessageAsync(strMessage).ContinueWith(t => { }, TaskContinuationOptions.OnlyOnFaulted);
742742
}
743743
}
744744
catch
@@ -786,7 +786,7 @@ public void PushChannelMessage(EDiscordChannelIDs channelID, string strMessage)
786786
ISocketMessageChannel? channel = GetChannel(channelID);
787787
if (channel != null)
788788
{
789-
channel.SendMessageAsync(strMessage);
789+
channel.SendMessageAsync(strMessage).ContinueWith(t => { }, TaskContinuationOptions.OnlyOnFaulted);
790790
}
791791
}
792792
catch

0 commit comments

Comments
 (0)