dmChannel := create_dm_channel(Args{user_id: "..."})
send_text_message(Args{
channel_id: trigger.channel_id,
message_content: "Channel ID: " + dmChannel.channel_id,
})
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_channelInputs
| Field | InventScript name | Value |
|---|---|---|
| User ID | user_id |
Outputs
| Field | InventScript name | Value |
|---|---|---|
| Channel ID | channel_id |
Example InventScript
More users blocks
Get UserRetrieve a Discord user's information by their ID.Get Server MemberRetrieve a Discord server member information by their ID.Get Highest Role Position of MemberRetrieve the position of the highest role of a member in a server.Get Server MembersRetrieve members of a Discord server.Kick Server MemberKick a member from a server.Ban Server MemberBan a member from a server.Unban Server MemberUnban a member from a server.Get Server BansRetrieve a list of banned users in a server.Timeout Server MemberTimeout a member from a server.Assign RoleAssign a role to a user.Remove RoleRemove a role from a user.Change Member NicknameChange a member's nickname in a server.