Create DM Channel

BlockUsers

Create a DM channel with a user.

Avoid opening DMs in bulk; Discord may rate limit or block the bot.

Inputs

User IDRequired

ID of the user to create a DM channel with.

Outputs

Channel ID

ID of the created DM channel.

Build a bot using blocks like Create DM Channel

Use this block 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: create_dm_channel

Inputs

FieldInventScript nameValue
User IDuser_id

Outputs

FieldInventScript nameValue
Channel IDchannel_id

Example InventScript

dmChannel := create_dm_channel(Args{user_id: "..."})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Channel ID: " + dmChannel.channel_id,
})

More users blocks