var trigger = thread_create()
func main() {
send_text_message(Args{
channel_id: "CHANNEL_ID",
message_content: "Thread ID: " + trigger.thread_id,
})
}
Thread Created
Event triggerThreads
Triggers when a new thread is created.
Discord may fire this event twice. Newly Created is true only on the first event.
Outputs
Thread ID
ID of the created thread.
Example: 123456789012345678
Parent ID
ID of the parent channel.
Example: 234567890123456789
Server ID
ID of the server where the thread was created.
Example: 345678901234567890
Thread Name
Name of the created thread.
Example: general-thread
Owner ID
ID of the user who owns the thread.
Example: 456789012345678901
Newly Created
Whether this is the first of two events Discord may send.
Example: true
Build a bot using triggers like Thread Created
Use this trigger in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.
Advanced Documentation
This documentation can be useful when using code mode. View as Markdown
ID:
thread_createOutputs
| Field | InventScript name | Value |
|---|---|---|
| Thread ID | thread_id | e.g. "123456789012345678" |
| Parent ID | parent_id | e.g. "234567890123456789" |
| Server ID | server_id | e.g. "345678901234567890" |
| Thread Name | thread_name | e.g. "general-thread" |
| Owner ID | owner_id | e.g. "456789012345678901" |
| Newly Created | newly_created | e.g. "true" |