1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-11-01 21:02:38 +00:00

Add remove flag to reverse command

This commit is contained in:
Dylan Dizon 2018-11-03 17:01:30 -04:00
parent fc1d00eff0
commit e96d98aee8

View file

@ -388,7 +388,7 @@ class MsG:
async def reverse(self, ctx, *args):
try:
kwargs = u.get_kwargs(ctx, args)
dest, urls = kwargs['destination'], kwargs['remaining']
dest, urls, remove = kwargs['destination'], kwargs['remaining'], kwargs['remove']
c = 0
if not urls and not ctx.message.attachments:
@ -418,6 +418,10 @@ class MsG:
except exc.MatchError as e:
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:
await ctx.message.add_reaction('\N{CROSS MARK}')