mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-09 20:58:54 -05:00
[General, Owner] Properly catch perm exceptions for embeds
This commit is contained in:
parent
b740bcae2e
commit
49567bc1a3
@ -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")
|
||||
|
||||
|
||||
@ -616,7 +616,11 @@ class Owner:
|
||||
embed.set_footer(text="Bringing joy since 02 Jan 2016 (over "
|
||||
"{} days ago!)".format(days_since))
|
||||
|
||||
await self.bot.say(embed=embed)
|
||||
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")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user