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:
parent
841470655c
commit
5e65dcbb8f
1 changed files with 16 additions and 3 deletions
|
@ -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):
|
||||||
print(error)
|
if not isinstance(error, commands.errors.CommandNotFound):
|
||||||
await ctx.send('{}\n```\n{}```'.format(exc.base, error))
|
print(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)
|
||||||
|
|
Loading…
Reference in a new issue