mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 22:27:28 +00:00
Add remove flag to reverse command
This commit is contained in:
parent
fc1d00eff0
commit
e96d98aee8
1 changed files with 21 additions and 17 deletions
|
@ -388,7 +388,7 @@ class MsG:
|
||||||
async def reverse(self, ctx, *args):
|
async def reverse(self, ctx, *args):
|
||||||
try:
|
try:
|
||||||
kwargs = u.get_kwargs(ctx, args)
|
kwargs = u.get_kwargs(ctx, args)
|
||||||
dest, urls = kwargs['destination'], kwargs['remaining']
|
dest, urls, remove = kwargs['destination'], kwargs['remaining'], kwargs['remove']
|
||||||
c = 0
|
c = 0
|
||||||
|
|
||||||
if not urls and not ctx.message.attachments:
|
if not urls and not ctx.message.attachments:
|
||||||
|
@ -418,6 +418,10 @@ class MsG:
|
||||||
except exc.MatchError as e:
|
except exc.MatchError as e:
|
||||||
await ctx.send('**No probable match for:** `{}`'.format(e), delete_after=7)
|
await ctx.send('**No probable match for:** `{}`'.format(e), delete_after=7)
|
||||||
|
|
||||||
|
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}')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue