None of my ctx commands work. Here I’ll give an example. When I say p!test I want it to print hi and say test, but it’s not responding. Can someone help?
@client.command()
async def test(ctx):
print('hi')
await ctx.channel.send('test')
Advertisement
Answer
If you’re using a on_message event, you have to ‘process commands’ in the last line of the event. Otherwise, your commands won’t work.
@client.event
async def on_message(message):
...
await client.process_commands(message)