【发布时间】:2020-11-18 19:29:22
【问题描述】:
我在 python 中为 discord 编写了一个小机器人,并开始使用简单的 $print 函数,但我想添加一个简单的函数,当你输入一个特定的单词时,比如 $cat 它返回 cats are good 或者可能是一个图像/gif猫。我试着用这个来做。
@bot.command(NAME="hello")
await ctx.channel.send("hi there")
基本上,我想在输入$hello 时输出hi there。但是当我尝试运行 python 文件时它会立即崩溃
【问题讨论】:
标签: python discord discord.py