discord.py simple commands not working (in pythonista)

120 Views Asked by At

I’m just getting started with a discord.py bot in Pythonista but I am unsure as to why this starting code (copied from official docs) is not working - when I type “!test hello” the bot doesn’t reply, whereas when I used an “on_message” before, it worked fine. It also didn’t work when I tried it in PyCharm on a laptop. Any help appreciated. Thanks!

import discord
from discord.ext import commands

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

@bot.command()
async def test(ctx, arg):
    await ctx.send(arg)


bot.run("myToken")
1

There are 1 best solutions below

0
Pickl On

Since I don't really see a problem, maybe you could try updating discord.py doing pip install -U discord.py