1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-25 06:37:29 +00:00

Catch database error

This commit is contained in:
Myned 2018-06-14 21:15:03 -04:00
parent 32dafac469
commit 254a0d95b4

View file

@ -450,6 +450,9 @@ class MsG:
except exc.SizeError as e: except exc.SizeError as e:
await ctx.send(f'`{e}` **too large.** Maximum is 8 MB', delete_after=7) await ctx.send(f'`{e}` **too large.** Maximum is 8 MB', delete_after=7)
await ctx.message.add_reaction('\N{CROSS MARK}') await ctx.message.add_reaction('\N{CROSS MARK}')
except Exception:
await ctx.send('**The image database is offline.** Please try again later')
await ctx.message.add_reaction('\N{CROSS MARK}')
@cmds.command(name='reversify', aliases=['revify', 'risify', 'rify']) @cmds.command(name='reversify', aliases=['revify', 'risify', 'rify'])
async def reversify(self, ctx, *args): async def reversify(self, ctx, *args):
@ -525,6 +528,9 @@ class MsG:
except exc.BoundsError as e: except exc.BoundsError as e:
await ctx.send('`{}` **invalid limit.** Query limited to 30'.format(e), delete_after=7) await ctx.send('`{}` **invalid limit.** Query limited to 30'.format(e), delete_after=7)
await ctx.message.add_reaction('\N{CROSS MARK}') await ctx.message.add_reaction('\N{CROSS MARK}')
except Exception:
await ctx.send('**The image database is offline.** Please try again later')
await ctx.message.add_reaction('\N{CROSS MARK}')
async def _reversify(self): async def _reversify(self):
while self.reversifying: while self.reversifying: