【发布时间】:2021-10-22 20:21:59
【问题描述】:
我正在过渡到斜线命令,它们让我很头疼。我已经在椅子上坐了一个多小时。这是测试斜杠命令。
@slash.slash(name="test",
description="This is just a test command, nothing more.")
async def _test(ctx):
await ctx.channel.send("Hello World!")
我做了这个测试斜线命令,看看它是否有效。长话短说,它没有。我的意思是,它出现了,但它实际上并没有做任何事情。它只是说“交互失败”。 这不是唯一的问题,描述也不存在。它只是显示标题,老实说,我不想死去试图解决这个问题。这是我导入的:
import discord
from discord.ext import commands
from discord_slash import SlashCommand, SlashContext
from discord_slash.utils.manage_commands import create_choice, create_option
我想我应该提到我没有收到任何错误,这是一件坏事。任何帮助将不胜感激。
【问题讨论】:
-
如果您要说明您正在使用的操作系统和 IDE 并在解释上下文和问题时更明确一点,这将有所帮助。这可以帮助那些试图帮助你的人。
标签: python json discord discord.py