From cd90da5455c32e50ba6f30055b453bc2eef5bfa7 Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 6 Jan 2017 14:46:47 +0100 Subject: add ignore list for message mirror --- main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 06639eb..e68ac92 100644 --- a/main.py +++ b/main.py @@ -13,6 +13,7 @@ TOKEN = "MjM5NzI3NzQ2Nzk0NzgyNzIw.Cu5BbA.z7bkO3Ncd_L80htVzREHYDsEGNk" VERSION = "v0.1.0" MODMIRROR = "266921381634113537" +MIRROR_IGNORE = ["237194769116168192"] # bot_spam client = pymongo.MongoClient() db = client.vainbot @@ -105,19 +106,19 @@ async def search_teammates(server, channel, who, query, notify=True): @cli.event async def on_message_delete(message): mirror = cli.get_channel(MODMIRROR) - if message.author != cli.user and mirror: + if message.author != cli.user and mirror and message.channel.id not in MIRROR_IGNORE: await cli.send_message(mirror, message.author.mention + message.channel.mention + ": DELETE: " + message.content) @cli.event async def on_message_edit(before, message): mirror = cli.get_channel(MODMIRROR) - if message.author != cli.user and mirror: + if message.author != cli.user and mirror and message.channel.id not in MIRROR_IGNORE: await cli.send_message(mirror, message.author.mention + message.channel.mention + ": EDIT: ~~" + before.content + "~~ -> " + message.content) @cli.event async def on_message(message): mirror = cli.get_channel(MODMIRROR) - if message.author != cli.user and mirror: + if message.author != cli.user and mirror and message.channel.id not in MIRROR_IGNORE: await cli.send_message(mirror, message.author.mention + message.channel.mention + ": " + message.content) msg = message.content.lower() -- cgit v1.3.1