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).
JavaScript
x
2
1
await ctx.channel.create_thread(name="Thread" , type=discord.ChannelType.public_thread )
2
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.
JavaScript
1
3
1
thread = await ctx.channel.create_thread(name="Thread" , type=discord.ChannelType.public_thread )
2
await thread.send("This message is sent to the created thread!")
3