From 997cd80bf9032c5824b0a857a7d63e3ceecaefbb Mon Sep 17 00:00:00 2001 From: Ave Ozkal Date: Thu, 25 Apr 2019 10:17:06 +0300 Subject: [PATCH] Extend the list of whitelisted commands on newcomers Also, hopefully the new logic is (at least slightly) better. --- Robocop.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Robocop.py b/Robocop.py index efef247..371514e 100755 --- a/Robocop.py +++ b/Robocop.py @@ -190,9 +190,11 @@ async def on_message(message): if (message.guild) and (message.guild.id not in config.guild_whitelist): return - # Ignore messages in newcomers channel, unless it's potentially reset + # Ignore messages in newcomers channel, unless it's potentially + # an allowed command + welcome_allowed = ["reset", "kick", "ban", "warn"] if message.channel.id == config.welcome_channel and\ - "reset" not in message.content: + not any(cmd in message.content for cmd in welcome_allowed): return ctx = await bot.get_context(message)