Why does not this work? When I run the code and try the !test, it doesn’t even send an error to the terminal. How can i fix this?
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix="!")
bot.command()
async def test(ctx):
ctx.send("test")
bot.run(token)
>Solution :
You’re missing the decorator symbol
@bot.command()
also, the send message instruction inside your test function needs to be awaited
@bot.command()
async def test(ctx):
await ctx.send("test")