mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 15:07:03 +01:00
keeps the discord bot from being triggered by its own messages (#129)
* keeps the discord bot from being triggered by its own messages * You're not in byond anymore dorothy
This commit is contained in:
committed by
GitHub
parent
902cc64f17
commit
cd7a73bcc6
@@ -45,7 +45,10 @@ 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);
|
||||
|
||||
Reference in New Issue
Block a user