mirror of
https://github.com/uhIgnacio/EmoteManager.git
synced 2024-08-15 02:23:13 +00:00
ignore bots
This commit is contained in:
parent
d5c0983a5f
commit
12d32c985a
1 changed files with 6 additions and 0 deletions
6
bot.py
6
bot.py
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue