Skip to content
Advertisement

How to send message in a Discord Thread?

So I need to create and send messages in discord thread. I have been able to create threads but unable to send message in them. I am using Discord.py library (v2.0 supports thread).

await ctx.channel.create_thread(name="Thread" , type=discord.ChannelType.public_thread )

This is what I am using to create thread. I have no lead on how to send message in it. Thanks.

Advertisement

Answer

create_thread() returns the thread created, so you can just call send() from it.

thread = await ctx.channel.create_thread(name="Thread" , type=discord.ChannelType.public_thread )
await thread.send("This message is sent to the created thread!")
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement