1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-25 06:37:29 +00:00

Passed CommandNotFound error, WIP dual reaction events

This commit is contained in:
Myned 2017-10-13 21:51:38 -04:00
parent 841470655c
commit 5e65dcbb8f

View file

@ -60,16 +60,29 @@ async def on_ready():
@bot.event @bot.event
async def on_command_error(ctx, error): async def on_command_error(ctx, error):
if not isinstance(error, commands.errors.CommandNotFound):
print(error) print(error)
await ctx.send('{}\n```\n{}```'.format(exc.base, error)) await ctx.send('{}\n```\n{}```'.format(exc.base, error))
async def on_reaction_add(r, u): async def on_reaction_add(r, u):
print('Reacted') pass
async def on_reaction_remove(r, u): async def on_reaction_remove(r, u):
pass
async def reaction_add(r, u):
bot.add_listener(on_reaction_add)
print('Reacted')
bot.remove_listener(on_reaction_remove)
async def reaction_remove(r, u):
bot.add_listener(on_reaction_remove)
print('Removed') print('Removed')
bot.remove_listener(on_reaction_remove)
@bot.command(name=',test', hidden=True) @bot.command(name=',test', hidden=True)