Bot Command No Longer Working(Discord.py rewrite)
@bot.command() async def ling(ctx): await ctx.send("Mabel")
I believe the code above should give me Mabel when I send the word {ling (prefix is {). So it’s either something has been changed or bot.command legit no longer works in the latest version of discord.py rewrite.
The above code is totally fine. If you haven’t DEFINED Your bot yet, You have to do it. Here is the simple code you can modify according to your needs.
import discord from discord.ext import commands bot = commands.Bot(command_prefix = 'YOUR PREFIX') @bot.command() async def ling(ctx): await ctx.send("Mabel")