mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Don't break on missing perms
This commit is contained in:
parent
a151a43144
commit
14a6b62cb9
1 changed files with 2 additions and 0 deletions
|
@ -39,6 +39,8 @@ class McDonaldsCog(commands.Cog):
|
||||||
@commands.user_command(name="Commercial Break")
|
@commands.user_command(name="Commercial Break")
|
||||||
async def commercial_break(self, ctx: discord.ApplicationContext, member: discord.Member):
|
async def commercial_break(self, ctx: discord.ApplicationContext, member: discord.Member):
|
||||||
await ctx.defer(ephemeral=True)
|
await ctx.defer(ephemeral=True)
|
||||||
|
if not ctx.channel.permissions_for(ctx.me).manage_messages:
|
||||||
|
return await ctx.respond("I don't have permission to manage messages in this channel.", ephemeral=True)
|
||||||
if member.bot or member == ctx.user:
|
if member.bot or member == ctx.user:
|
||||||
return await ctx.respond("No.", ephemeral=True)
|
return await ctx.respond("No.", ephemeral=True)
|
||||||
if member in self.targets.keys():
|
if member in self.targets.keys():
|
||||||
|
|
Loading…
Reference in a new issue