Extend the list of whitelisted commands on newcomers

Also, hopefully the new logic is (at least slightly) better.
This commit is contained in:
Ave Ozkal 2019-04-25 10:17:06 +03:00
parent 4ce90624c3
commit 997cd80bf9
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B

View file

@ -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)