[General, Owner] Properly catch perm exceptions for embeds

This commit is contained in:
Twentysix 2016-11-18 01:57:29 +01:00
parent b740bcae2e
commit 49567bc1a3
2 changed files with 8 additions and 4 deletions

View File

@ -207,7 +207,7 @@ class General:
try:
await self.bot.say(embed=data)
except:
except discord.HTTPException:
await self.bot.say("I need the `Embed links` permission "
"to send this")
@ -249,7 +249,7 @@ class General:
try:
await self.bot.say(embed=data)
except:
except discord.HTTPException:
await self.bot.say("I need the `Embed links` permission "
"to send this")

View File

@ -616,7 +616,11 @@ class Owner:
embed.set_footer(text="Bringing joy since 02 Jan 2016 (over "
"{} days ago!)".format(days_since))
try:
await self.bot.say(embed=embed)
except discord.HTTPException:
await self.bot.say("I need the `Embed links` permission "
"to send this")
@commands.command()
async def uptime(self):
@ -633,7 +637,7 @@ class Owner:
result = await asyncio.wait_for(response, timeout=10)
try:
await self.bot.say(embed=result)
except:
except discord.HTTPException:
await self.bot.say("I need the `Embed links` permission "
"to send this")