From a6a15392194833a2436650342155a60cb25c5080 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 7 Jan 2017 13:42:59 +0100 Subject: ignore channels in the ignorelist properly --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index 9a15ea8..69c456f 100644 --- a/main.py +++ b/main.py @@ -105,6 +105,8 @@ async def search_teammates(server, channel, who, query, notify=True): @cli.event async def on_message_delete(message): + if message.channel.id in MIRROR_IGNORE: + return msgs = [] mirror = cli.get_channel(MODMIRROR) msgs.append("--- deleted message " + message.author.mention + message.channel.mention) @@ -122,6 +124,8 @@ async def on_message_delete(message): @cli.event async def on_message_edit(before, message): + if message.channel.id in MIRROR_IGNORE: + return msgs = [] mirror = cli.get_channel(MODMIRROR) msgs.append("--- edited message " + message.author.mention + message.channel.mention) -- cgit v1.3.1