Moved the startup ping response to a module, so it will only reply if the modules are enabled
This commit is contained in:
@@ -191,3 +191,14 @@ def check_negative(s):
|
||||
return False
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
|
||||
# Check if message is a ping request and respond even if it is a bot
|
||||
async def check_and_reply_to_ping(bot, message):
|
||||
if "check_modules" in message.content:
|
||||
ctx = await bot.get_context(message)
|
||||
await bot.invoke(ctx)
|
||||
return True
|
||||
else:
|
||||
await bot.process_commands(message)
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user