@DarkStars

Ошибка await ctx.command.invoke(ctx) как поправить?

Доброго времени суток помогите, 2 день ломаю голову вот код:
import discord
from discord.ext import commands
import asyncio

DISCORD_BOT_TOKEN = 'SECRET'

bot = commands.Bot(command_prefix= '~')

@bot.event
async def on_ready():
    print ("Good")


@bot.command()
async def clean(args, message, client, invoke,):

    try:
        ammount = int(args[0]) + 1 if len(args) > 0 else 2
    except:
        await client.send_message(message.channel, embed=discord.Embed(color=discord.Color.red(), description="write amount"))
        return

    cleared = 0
    failed = 0
    async for m in client.logs_from(message.channel, limit=amount):
        try:
            await client.delete_message(m)
            cleared += 1
        except:
            failed += 1
            pass

            failed_str = "\n\n Failed %s djjnv" % failed if failed > 0 else "fenfek"
            returnmg = await client.send_message(messag.channel, embed=discord.Embed(color=discord.Color.blue(), description="fjweijiwji %s" %s(cleared, failed_msg)))
            await asyncio.sleep (3)
            await client.delete_message(returnmsg)
bot.run(DISCORD_BOT_TOKEN, bot=True)

При вводе команды ~clean выдает такую ошибку
5d9f8c9b50713374413314.png
  • Вопрос задан
  • 145 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы