mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[V3] adds a permissions check for embed_links in ctx.embed_requested (#1619)
This commit is contained in:
parent
b7cd097c43
commit
1e60d1c265
@ -128,12 +128,15 @@ class RedContext(commands.Context):
|
||||
async def embed_requested(self):
|
||||
"""
|
||||
Simple helper to call bot.embed_requested
|
||||
with logic around if embed permissions are available
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool:
|
||||
:code:`True` if an embed is requested
|
||||
"""
|
||||
if self.guild and not self.channel.permissions_for(self.guild.me).embed_links:
|
||||
return False
|
||||
return await self.bot.embed_requested(
|
||||
self.channel, self.author, command=self.command
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user