Hello. I get an error when I type any command in the channel where the bot is connected. Only the "!help" command works and it doesn't show the names of the other commands. It seems that it can't take into account the commands contained in the "Cogs collection".
Error output:
ERROR discord.ext.commands.bot Ignoring exception in command None
discord.ext.commands.errors.CommandNotFound: Command "pzplayers" is not found
So I tried to copy a command outside of the "Cogs collection" and it works correctly.
Like :
@bot.command(pass_context=True)
async def pzplayers(ctx):
"""Show current active players on the server"""
await IsChannelAllowed(ctx)
c_run = ""
c_run = await rcon_command(ctx, ["players"])
print(c_run)
if not c_run:
return
c_run = "\n".join(c_run.split('\n')[1:-1])
results = f"Current players in game:\n{c_run}"
await ctx.send(results)
After several hours of testing and searching I still can't figure out what's wrong with the code. If someone has an idea?
Hello. I get an error when I type any command in the channel where the bot is connected. Only the "!help" command works and it doesn't show the names of the other commands. It seems that it can't take into account the commands contained in the "Cogs collection".
Error output:
So I tried to copy a command outside of the "Cogs collection" and it works correctly. Like :
After several hours of testing and searching I still can't figure out what's wrong with the code. If someone has an idea?
Discord output:
Shell output: