How can a list of people who have been neglected byard beans be made



  • I want to make a team. ignorant. In a fight. Like I'm writing 'ignor', then he's added to the list of ignorant people and bot after he doesn't respond to it. Code, as an example:

    @bot.command()
    @commands.check(moderator) #не обращайте внимания
    async def игнор(ctx, member : discord.Member):
        await ignoruser.append(member.id)
    

    How can the code be made or improved? Just like making people get off the list, like Frasignor, like a banana. ?



  • I'd advise you to use the OBD, because the lists are not sustainable, and when the bot is reset, it'll fall. But if you still decided to use the lists, that's the code. APPENDIX and MANAGEMENT From the list:

    ignoruser = []
    

    @bot.command()
    @commands.check(moderator) # не обращайте внимания
    async def игнор(ctx, member: discord.Member = None):
    if member is not None:
    await ignoruser.append(member.id)
    await ctx.reply('Успешно!')
    else:
    await ctx.reply(f'Правильное использование команды:\n`{ctx.prefix}игнор <member>')

    @bot.command()
    @commands.check(moderator) # не обращайте внимания
    async def раз_игнор(ctx, member: discord.Member = None):
    if member is not None:
    await ignoruser.remove(member.id)
    await ctx.reply('Успешно!')
    else:
    await ctx.reply(f'Правильное использование команды:\n`{ctx.prefix}раз_игнор <member>')

    Check if you write it off.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2