1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-23 22:27:27 +00:00

Order of events logic with reactions

This commit is contained in:
Myned 2017-10-17 00:41:58 -04:00
parent 33a1a5f529
commit 16c7985942

View file

@ -152,8 +152,6 @@ class MsG:
delete = False
try:
await ctx.message.add_reaction('')
if arg == '-d' or arg == '-del' or arg == '-delete':
delete = True
elif arg is not None:
@ -206,6 +204,8 @@ class MsG:
await ctx.send('**No probable match for:** `{}`'.format(e), delete_after=10)
await message.add_reaction('')
await ctx.message.add_reaction('')
except exc.NotFound:
await ctx.send('**No matches found.**', delete_after=10)
await ctx.message.add_reaction('')
@ -220,8 +220,6 @@ class MsG:
if not urls and not ctx.message.attachments:
raise exc.MissingArgument
await ctx.message.add_reaction('')
for url in urls:
try:
await ctx.trigger_typing()
@ -248,6 +246,8 @@ class MsG:
except exc.MatchError as e:
await ctx.send('**No probable match for:** `{}`'.format(e), delete_after=10)
await ctx.message.add_reaction('')
except exc.MissingArgument:
await ctx.send('**Invalid url or file.**', delete_after=10)
await ctx.message.add_reaction('')
@ -260,8 +260,6 @@ class MsG:
attachments = []
delete = False
await ctx.message.add_reaction('')
try:
if arg == '-d' or arg == '-del' or arg == '-delete':
delete = True
@ -319,6 +317,8 @@ class MsG:
await ctx.send('**No probable match for:** `{}`'.format(e), delete_after=10)
await message.add_reaction('')
await ctx.message.add_reaction('')
except exc.NotFound:
await ctx.send('**No matches found.**', delete_after=10)
await ctx.message.add_reaction('')