mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 14:27:27 +00:00
Moved sleep and message deletion to trigger on successful reverse
This commit is contained in:
parent
bab9932949
commit
709da02ffe
1 changed files with 8 additions and 6 deletions
|
@ -566,18 +566,20 @@ class MsG:
|
||||||
|
|
||||||
await message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
|
await message.add_reaction('\N{WHITE HEAVY CHECK MARK}')
|
||||||
|
|
||||||
|
await asyncio.sleep(self.RATE_LIMIT)
|
||||||
|
|
||||||
|
with suppress(err.NotFound):
|
||||||
|
await message.delete()
|
||||||
|
|
||||||
except exc.MatchError as e:
|
except exc.MatchError as e:
|
||||||
await message.channel.send('**No probable match for:** `{}`'.format(e), delete_after=7)
|
await message.channel.send('**No probable match for:** `{}`'.format(e), delete_after=7)
|
||||||
await message.add_reaction('\N{CROSS MARK}')
|
await message.add_reaction('\N{CROSS MARK}')
|
||||||
except exc.SizeError as e:
|
except exc.SizeError as e:
|
||||||
await message.channel.send(f'`{e}` **too large.** Maximum is 8 MB', delete_after=7)
|
await message.channel.send(f'`{e}` **too large.** Maximum is 8 MB', delete_after=7)
|
||||||
await message.add_reaction('\N{CROSS MARK}')
|
await message.add_reaction('\N{CROSS MARK}')
|
||||||
|
except Exception:
|
||||||
finally:
|
await message.channel.send(f'**An unknown error occurred.**', delete_after=7)
|
||||||
await asyncio.sleep(self.RATE_LIMIT)
|
await message.add_reaction('\N{WARNING SIGN}')
|
||||||
|
|
||||||
with suppress(err.NotFound):
|
|
||||||
await message.delete()
|
|
||||||
|
|
||||||
print('STOPPED : reversifying')
|
print('STOPPED : reversifying')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue