#When a thread is created, ....

1 messages · Page 1 of 1 (latest)

viscid narwhal
#

the first message id of the thread is === the thread id

a thread starts with the message hence why first message == thread

#

hope that helps

#

take your post for example

#976321641573396581 message
discord_host/channels/guild_id/channel_id_thread/message_id

Notice they're both the same

timber fable
#

Hey guys,

Little bit confused reading the documentation on how to implement some logic:

If (new thread) created in (channel x):

  • Post a message (in channel y):
    --- A new thread was created on the topic (thread name) on (date). You can read about it here: (message link where thread was created)

I'm assuming it's something like:


async def on_thread_create(thread):
  chat_to_post = placeholder_chanel_id
  thread_link = placeholder
  thread_message = f"A new thread has been posted on {thread}. You can read about it here: {thread_link} "

  await ctx.send(thread_message)```

but I'm unable to get this to work. Help with the function or any ideas on how to get the first message of the thread's channel id would be appreciated!