Answer the question
In order to leave comments, you need to log in
Why is the command not working?
Hello, I have a command like this:
@bot.command()
@commands.bot_has_permissions( manage_roles = True, manage_channels = True, send_messages = True, embed_links = True, read_message_history = True )
@commands.has_permissions( administrator = True )
async def addblacklist(ctx, member: discord.Member = None):
support = ctx.guild.get_role(collticku.find_one({'_id': ctx.guild.id})['support_id'])
black = ctx.guild.get_role(collticku.find_one({'_id': ctx.guild.id})['blackl'])
if support in ctx.author.roles:
if member is None:
emb1 = discord.Embed(
description = 'Укажите участника, для занесения в черный список.',
colour = 0x2F3136
)
await ctx.reply(embed = emb1, delete_after = 5)
else:
if len(member.id) in black < 1:
collticku.update_one({'_id': ctx.guild.id}, {'$set': {'blackl': member.id}})
else:
collticku.update_one({'_id': ctx.guild.id}, {'$push': {'blackl': member.id}})
emb2 = discord.Embed(
description = f'Вы успешно занесли ({member.mention}) в черный список.',
colour = 0x2F3136
)
await ctx.send(embed = emb2, delete_after = 5)
else:
emb3 = discord.Embed(
description = 'Вы не являетесь службой поддержки и не можете заносить участников в черный список.',
colour = 0x2F3136
)
await ctx.reply(embed = emb3, delete_after = 5)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question