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.

Add Comment
1 Answer(s)

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") 
Answered on July 15, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.