Reputation: 79
I wrote a small bot in python for discord and got working simple $print function but I want to add a simple function when you input a specific word like $cat
it returns cats are good
or maybe an image/gif of a cat. I tried making it with this.
@bot.command(NAME="hello")
await ctx.channel.send("hi there")
basically, I wanted to output hi there
when $hello
was inputted. but when I try to run the python file it crashes instantly
Upvotes: 0
Views: 73
Reputation: 4225
The code is pretty much wrong
Below is the revised code:
@bot.command()
async def hello(ctx):
await ctx.send("hi there")
Upvotes: 2