如何在 Discord 线程中发送消息?
How to send message in a Discord Thread?
所以我需要在不和谐线程中创建和发送消息。我已经能够创建线程但无法在其中发送消息。我正在使用 Discord.py 库(v2.0 支持线程)。
await ctx.channel.create_thread(name="Thread" , type=discord.ChannelType.public_thread )
这就是我用来创建线程的。我不知道如何在其中发送消息。谢谢
create_thread()
returns 线程已创建,因此您可以从中调用 send()
。
thread = await ctx.channel.create_thread(name="Thread" , type=discord.ChannelType.public_thread )
await thread.send("This message is sent to the created thread!")
所以我需要在不和谐线程中创建和发送消息。我已经能够创建线程但无法在其中发送消息。我正在使用 Discord.py 库(v2.0 支持线程)。
await ctx.channel.create_thread(name="Thread" , type=discord.ChannelType.public_thread )
这就是我用来创建线程的。我不知道如何在其中发送消息。谢谢
create_thread()
returns 线程已创建,因此您可以从中调用 send()
。
thread = await ctx.channel.create_thread(name="Thread" , type=discord.ChannelType.public_thread )
await thread.send("This message is sent to the created thread!")