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_create

Outputs

FieldInventScript nameValue
Thread IDthread_ide.g. "123456789012345678"
Parent IDparent_ide.g. "234567890123456789"
Server IDserver_ide.g. "345678901234567890"
Thread Namethread_namee.g. "general-thread"
Owner IDowner_ide.g. "456789012345678901"
Newly Creatednewly_createde.g. "true"

Example InventScript

var trigger = thread_create()

func main() {
	send_text_message(Args{
		channel_id:      "CHANNEL_ID",
		message_content: "Thread ID: " + trigger.thread_id,
	})
}

More threads triggers