keeps the discord bot from being triggered by its own messages

This commit is contained in:
Kyle Spier-Swenson
2017-07-08 23:31:38 -07:00
committed by GitHub
parent 74db2b89bb
commit 0d0e97f7a6
+3 -1
View File
@@ -45,7 +45,9 @@ namespace TGServerService
private void Client_MessageReceived(object sender, MessageEventArgs e)
{
var pm = e.Channel.IsPrivate && e.User.Id != client.CurrentUser.Id;
if (e.User.Id == client.CurrentUser.Id)
return
var pm = e.Channel.IsPrivate;
if (pm && !SeenPrivateChannels.ContainsKey(e.Channel.Id))
SeenPrivateChannels.Add(e.Channel.Id, e.Channel);