ignore bots

This commit is contained in:
bmintz 2018-07-30 02:36:23 -05:00
parent d5c0983a5f
commit 12d32c985a
1 changed files with 6 additions and 0 deletions

6
bot.py
View File

@ -27,6 +27,12 @@ class Bot(commands.AutoShardedBot):
async def on_ready(self):
logger.info('Logged on as {0} (ID: {0.id})'.format(self.user))
async def on_message(self, message):
if message.author.bot:
return
await self.process_commands(message)
# https://github.com/Rapptz/RoboDanny/blob/ca75fae7de132e55270e53d89bc19dd2958c2ae0/bot.py#L77-L85
async def on_command_error(self, context, error):
if isinstance(error, commands.NoPrivateMessage):