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!")