Attempt to block commands on #newcomers

This commit is contained in:
Ave Ozkal 2019-01-23 00:09:21 +03:00
parent 4a54e2caa8
commit 0786f29bca
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B

View file

@ -185,6 +185,11 @@ async def on_message(message):
if (message.guild) and (message.guild.id not in config.guild_whitelist): if (message.guild) and (message.guild.id not in config.guild_whitelist):
return return
# Ignore messages in newcomers channel, unless it's potentially reset
if message.channel.id == config.welcome_channel and\
"reset" not in message.content:
return
ctx = await bot.get_context(message) ctx = await bot.get_context(message)
await bot.invoke(ctx) await bot.invoke(ctx)