вот фрагмент кода
@bot.command()
async def f(ctx, *args):
result = False
if not args:
await ctx.channel.purge(limit=900)
await asyncio.sleep(0.21)
channel_A = discord.utils.get(ctx.guild.channels, name="pins")
if channel_A:
await channel_A.send("-f +
await ctx.invoke(bot.get_command('-f +
else:
await ctx.send("Channel A not found.")
//there more code but it long and irelevant i think
Я вижу отправляемое сообщение, но оно не вызывает другую команду.
оно также показывает ошибку
Traceback (most recent call last):
File "c:\Users\M Muzammil\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 235, in wrapped
ret = await coro(*args, **kwargs)
File "D:\Personal\Auto upload\BOT.py", line 60, in f
await ctx.invoke(bot.get_command('-f +
File "c:\Users\M Muzammil\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\context.py", line 336, in invoke
return await command(self, *args, **kwargs)
TypeError: 'NoneType' object is not callable
The above exception was the direct cause of the following exception:
Источник: https://stackoverflow.com/questions/781 ... iscord-bot