【发布时间】:2023-01-17 23:22:01
【问题描述】:
这是我的代码,我需要它来将响应发送到特定频道。似乎无法在 API 的任何地方找到如何做
@bot.tree.command(name='training', description='Set up a training date & announce it to everyone in the server')
@app_commands.describe(date = "Date")
@app_commands.describe(time = "Time")
@app_commands.describe(location = "Location")
async def say(interaction: discord.Interaction, date: str, time: str, location: str):
await interaction.response.send_message(f"{interaction.user.mention} is training at {location} on {date} at {time}")```
Ive tried changing the "interaction.response.send_message" into "channel.send" but that gave back an error with the atr: send
【问题讨论】: