mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-07 09:52:30 -05:00
Support all Messageables in bot.embed_requested() (#5576)
* Support all Messageables in bot.embed_requested * Update usage in core * Simplify [p]contact This couldn't be done before this change. I have also simplified getting embed color. * Make `True` the new default for `check_permissions` kwarg
This commit is contained in:
@@ -231,17 +231,20 @@ class Context(DPYContext):
|
||||
|
||||
async def embed_requested(self):
|
||||
"""
|
||||
Simple helper to call bot.embed_requested
|
||||
with logic around if embed permissions are available
|
||||
Short-hand for calling bot.embed_requested with permission checks.
|
||||
|
||||
Equivalent to:
|
||||
|
||||
.. code:: python
|
||||
|
||||
await ctx.bot.embed_requested(ctx)
|
||||
|
||||
Returns
|
||||
-------
|
||||
bool:
|
||||
:code:`True` if an embed is requested
|
||||
"""
|
||||
return await self.bot.embed_requested(
|
||||
self.channel, self.author, command=self.command, check_permissions=True
|
||||
)
|
||||
return await self.bot.embed_requested(self)
|
||||
|
||||
async def maybe_send_embed(self, message: str) -> discord.Message:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user