【发布时间】:2022-09-28 01:21:44
【问题描述】:
import lightbulb
import requests
bot = lightbulb.BotApp(token=\"TOKEN\")
@bot.command
@lightbulb.command(\"dog\",\"Dog pictures\")
@lightbulb.implements(lightbulb.SlashCommand)
async def dog(ctx: lightbulb.Context) -> None:
response = requests.get(\"https://dog.ceo/api/breeds/image/random\")
image_link = response.json()[\"message\"]
await ctx.response(image_link)
bot.run()
尝试在不和谐上执行命令时出错
-
请包含您收到的任何错误的完整回溯,并包含minimal reproducible example。有关更多信息,请参阅How to Ask。
标签: python discord discord.py bots