1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-24 22:27:28 +00:00

Change catching of generic Exception to HTTPException for accuracy

This commit is contained in:
Dylan Dizon 2018-11-08 14:29:22 -05:00
parent 535da344a1
commit 722d0d2291

View file

@ -430,9 +430,9 @@ class MsG:
except exc.SizeError as e: except exc.SizeError as e:
await ctx.send(f'`{e}` **too large.** Maximum is 8 MB') await ctx.send(f'`{e}` **too large.** Maximum is 8 MB')
await ctx.message.add_reaction('\N{CROSS MARK}') await ctx.message.add_reaction('\N{CROSS MARK}')
# except Exception: except err.HTTPException:
# await ctx.send('**The image database is offline.** Please try again later') await ctx.send('**The image database returned an unexpected result.** It may be offline')
# await ctx.message.add_reaction('\N{CROSS MARK}') 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):
@ -509,8 +509,8 @@ class MsG:
except exc.BoundsError as e: except exc.BoundsError as e:
await dest.send('`{}` **invalid limit.** Query limited to 30'.format(e)) await dest.send('`{}` **invalid limit.** Query limited to 30'.format(e))
await ctx.message.add_reaction('\N{CROSS MARK}') await ctx.message.add_reaction('\N{CROSS MARK}')
except Exception: except err.HTTPException:
await dest.send('**The image database is offline.** Please try again later') await dest.send('**The image database returned an unexpected result.** It may be offline')
await ctx.message.add_reaction('\N{CROSS MARK}') await ctx.message.add_reaction('\N{CROSS MARK}')
async def _reversify(self): async def _reversify(self):