Channel.send 用于斜线命令

Channel.send for slash commands

我正在将我的命令迁移到斜杠变体,对于一些我需要将消息发送到不同的频道,我需要在 nextcord 斜杠中等待 channel.send(),类似

channel = client.get_channel(862547191373496380)
await interaction.response.channel.send_message()

您仍然可以使用

await channel.send()

请注意,这不会响应斜杠命令,而是在指定频道中发送单独的消息。

对于响应,您可以简单地这样做:

await channel.response.send_message()