mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-08 10:22:31 -05:00
[Audio] Check required permissions in events (#4960)
This commit is contained in:
@@ -100,6 +100,10 @@ class MiscellaneousUtilities(MixinMeta, metaclass=CompositeMetaClass):
|
||||
embed.set_author(name=name)
|
||||
return await ctx.send(embed=embed)
|
||||
|
||||
def _has_notify_perms(self, channel: discord.TextChannel) -> bool:
|
||||
perms = channel.permissions_for(channel.guild.me)
|
||||
return all((perms.send_messages, perms.embed_links))
|
||||
|
||||
async def maybe_run_pending_db_tasks(self, ctx: commands.Context) -> None:
|
||||
if self.api_interface is not None:
|
||||
await self.api_interface.run_tasks(ctx)
|
||||
|
||||
Reference in New Issue
Block a user