1
0
Fork 0
mirror of https://github.com/uhIgnacio/EmoteManager.git synced 2024-08-15 02:23:13 +00:00

ignore bots

This commit is contained in:
bmintz 2018-07-30 02:36:23 -05:00
parent d5c0983a5f
commit 12d32c985a

6
bot.py
View file

@ -27,6 +27,12 @@ class Bot(commands.AutoShardedBot):
async def on_ready(self): async def on_ready(self):
logger.info('Logged on as {0} (ID: {0.id})'.format(self.user)) 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 # https://github.com/Rapptz/RoboDanny/blob/ca75fae7de132e55270e53d89bc19dd2958c2ae0/bot.py#L77-L85
async def on_command_error(self, context, error): async def on_command_error(self, context, error):
if isinstance(error, commands.NoPrivateMessage): if isinstance(error, commands.NoPrivateMessage):