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

Fix ctx.message deletion logic

This commit is contained in:
Dylan Dizon 2018-11-06 13:23:17 -05:00
parent 5e4cc8174e
commit 1a014d4425

View file

@ -418,12 +418,11 @@ class MsG:
except exc.MatchError as e: except exc.MatchError as e:
await ctx.send('**No probable match for:** `{}`'.format(e)) await ctx.send('**No probable match for:** `{}`'.format(e))
if remove:
with suppress(err.NotFound):
await ctx.message.delete()
if not c: if not c:
await ctx.message.add_reaction('\N{CROSS MARK}') await ctx.message.add_reaction('\N{CROSS MARK}')
else:
with suppress(err.NotFound):
await ctx.message.delete()
except exc.MissingArgument: except exc.MissingArgument:
await ctx.send('**Invalid url or file.** Be sure the link directs to an image file') await ctx.send('**Invalid url or file.** Be sure the link directs to an image file')