mirror of
https://github.com/myned/modufur.git
synced 2024-12-25 06:37:29 +00:00
Fix ctx.message deletion logic
This commit is contained in:
parent
5e4cc8174e
commit
1a014d4425
1 changed files with 3 additions and 4 deletions
|
@ -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')
|
||||||
|
|
Loading…
Reference in a new issue