mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-10 05:08:55 -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:
|
try:
|
||||||
await self.bot.say(embed=data)
|
await self.bot.say(embed=data)
|
||||||
except:
|
except discord.HTTPException:
|
||||||
await self.bot.say("I need the `Embed links` permission "
|
await self.bot.say("I need the `Embed links` permission "
|
||||||
"to send this")
|
"to send this")
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ class General:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
await self.bot.say(embed=data)
|
await self.bot.say(embed=data)
|
||||||
except:
|
except discord.HTTPException:
|
||||||
await self.bot.say("I need the `Embed links` permission "
|
await self.bot.say("I need the `Embed links` permission "
|
||||||
"to send this")
|
"to send this")
|
||||||
|
|
||||||
|
|||||||
@ -616,7 +616,11 @@ class Owner:
|
|||||||
embed.set_footer(text="Bringing joy since 02 Jan 2016 (over "
|
embed.set_footer(text="Bringing joy since 02 Jan 2016 (over "
|
||||||
"{} days ago!)".format(days_since))
|
"{} 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()
|
@commands.command()
|
||||||
async def uptime(self):
|
async def uptime(self):
|
||||||
@ -633,7 +637,7 @@ class Owner:
|
|||||||
result = await asyncio.wait_for(response, timeout=10)
|
result = await asyncio.wait_for(response, timeout=10)
|
||||||
try:
|
try:
|
||||||
await self.bot.say(embed=result)
|
await self.bot.say(embed=result)
|
||||||
except:
|
except discord.HTTPException:
|
||||||
await self.bot.say("I need the `Embed links` permission "
|
await self.bot.say("I need the `Embed links` permission "
|
||||||
"to send this")
|
"to send this")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user