ByteChef LogoByteChef
Components

Discord

Discord is a communication platform designed for creating communities, chatting with friends, and connecting with others through text, voice, and video channels.

Categories: Communication

Type: discord/v1


Connections

Version: 1

Bearer Token

Properties

NameLabelTypeDescriptionRequired
tokenBot tokenSTRINGtrue

Actions

Send Channel Message

Name: sendChannelMessage

Post a new message to a specific #channel you choose.

Properties

NameLabelTypeDescriptionRequired
guildIdGuild IDSTRINGtrue
channelIdChannel IDSTRING
Depends On guildId
ID of the channel where to send the message.true
contentMessage TextSTRINGMessage contents (up to 2000 characters)true
ttsText to SpeechBOOLEAN
Options true, false
True if this is a TTS messagefalse

Example JSON Structure

{
  "label" : "Send Channel Message",
  "name" : "sendChannelMessage",
  "parameters" : {
    "guildId" : "",
    "channelId" : "",
    "content" : "",
    "tts" : false
  },
  "type" : "discord/v1/sendChannelMessage"
}

Output

Type: OBJECT

Properties

NameTypeDescription
typeINTEGERType of the message.
idSTRINGID of the message.
contentSTRINGContents of the message.
ttsBOOLEAN
Options true, false
Whether this was a TTS message.
mentionsARRAY
Items [{STRING(id), STRING(username)}]
Users specifically mentioned in the message.
mention_rolesARRAY
Items [{STRING(id), STRING(name)}]
Roles specifically mentioned in this message.
attachmentsARRAY
Items [{STRING(id), STRING(filename), STRING(title), STRING(description), STRING(content_type), INTEGER(size), STRING(url), STRING(proxy_url)}]
Any attached files.
timestampSTRINGWhen this message was sent.
flagsINTEGERmessage flags combined as a bitfield.
componentsARRAY
Items [{}]
Sent if the message contains components like buttons, action rows, or other interactive components.
channel_idSTRINGID of the channel the message was sent in.
authorOBJECT
Properties {STRING(id), STRING(username)}
The author of this message.
pinnedBOOLEAN
Options true, false
Whether this message is pinned.
mention_everyoneBOOLEAN
Options true, false
Whether this message mentions everyone.

Output Example

{
  "type" : 1,
  "id" : "",
  "content" : "",
  "tts" : false,
  "mentions" : [ {
    "id" : "",
    "username" : ""
  } ],
  "mention_roles" : [ {
    "id" : "",
    "name" : ""
  } ],
  "attachments" : [ {
    "id" : "",
    "filename" : "",
    "title" : "",
    "description" : "",
    "content_type" : "",
    "size" : 1,
    "url" : "",
    "proxy_url" : ""
  } ],
  "timestamp" : "",
  "flags" : 1,
  "components" : [ { } ],
  "channel_id" : "",
  "author" : {
    "id" : "",
    "username" : ""
  },
  "pinned" : false,
  "mention_everyone" : false
}

Create Channel

Name: createChannel

Create a new channel

Properties

NameLabelTypeDescriptionRequired
guildIdGuild IDSTRINGtrue
nameNameSTRINGThe name of the new channeltrue
typeTypeINTEGER
Options 0, 2, 4
false

Example JSON Structure

{
  "label" : "Create Channel",
  "name" : "createChannel",
  "parameters" : {
    "guildId" : "",
    "name" : "",
    "type" : 1
  },
  "type" : "discord/v1/createChannel"
}

Output

Type: OBJECT

Properties

NameTypeDescription
idSTRINGID of the channel.
typeINTEGERType of the channel.
last_message_idSTRINGID of the last message sent in this channel.
flagsINTEGERChannel flags combined as a bitfield.
guild_idSTRINGID of the guild to which the channel belongs.
nameSTRINGName of the channel.
parent_idSTRINGFor guild channels: id of the parent category for a channel
rate_limit_per_userINTEGERAmount of seconds a user has to wait before sending another message
topicSTRINGTopic of the channel.
positionINTEGERSorting position of the channel (channels with the same position are sorted by id)
permission_overwritesARRAY
Items [{STRING(id), INTEGER(type), STRING(allow), STRING(deny)}]
Explicit permission overwrites for members and roles.
nsfwBOOLEAN
Options true, false
Whether the channel is marked as NSFW (Not Safe For Work).

Output Example

{
  "id" : "",
  "type" : 1,
  "last_message_id" : "",
  "flags" : 1,
  "guild_id" : "",
  "name" : "",
  "parent_id" : "",
  "rate_limit_per_user" : 1,
  "topic" : "",
  "position" : 1,
  "permission_overwrites" : [ {
    "id" : "",
    "type" : 1,
    "allow" : "",
    "deny" : ""
  } ],
  "nsfw" : false
}

Send Direct Message

Name: sendDirectMessage

Send direct message guild member.

Properties

NameLabelTypeDescriptionRequired
guildIdGuild IDSTRINGtrue
recipient_idRecipientSTRING
Depends On guildId
The recipient to open a DM channel with.true
contentMessage TextSTRINGMessage contents (up to 2000 characters)true
ttsText to SpeechBOOLEAN
Options true, false
True if this is a TTS messagefalse

Example JSON Structure

{
  "label" : "Send Direct Message",
  "name" : "sendDirectMessage",
  "parameters" : {
    "guildId" : "",
    "recipient_id" : "",
    "content" : "",
    "tts" : false
  },
  "type" : "discord/v1/sendDirectMessage"
}

Output

Type: OBJECT

Properties

NameTypeDescription
typeINTEGERType of the message.
idSTRINGID of the message.
contentSTRINGContents of the message.
ttsBOOLEAN
Options true, false
Whether this was a TTS message.
mentionsARRAY
Items [{STRING(id), STRING(username)}]
Users specifically mentioned in the message.
mention_rolesARRAY
Items [{STRING(id), STRING(name)}]
Roles specifically mentioned in this message.
attachmentsARRAY
Items [{STRING(id), STRING(filename), STRING(title), STRING(description), STRING(content_type), INTEGER(size), STRING(url), STRING(proxy_url)}]
Any attached files.
timestampSTRINGWhen this message was sent.
flagsINTEGERmessage flags combined as a bitfield.
componentsARRAY
Items [{}]
Sent if the message contains components like buttons, action rows, or other interactive components.
channel_idSTRINGID of the channel the message was sent in.
authorOBJECT
Properties {STRING(id), STRING(username)}
The author of this message.
pinnedBOOLEAN
Options true, false
Whether this message is pinned.
mention_everyoneBOOLEAN
Options true, false
Whether this message mentions everyone.

Output Example

{
  "type" : 1,
  "id" : "",
  "content" : "",
  "tts" : false,
  "mentions" : [ {
    "id" : "",
    "username" : ""
  } ],
  "mention_roles" : [ {
    "id" : "",
    "name" : ""
  } ],
  "attachments" : [ {
    "id" : "",
    "filename" : "",
    "title" : "",
    "description" : "",
    "content_type" : "",
    "size" : 1,
    "url" : "",
    "proxy_url" : ""
  } ],
  "timestamp" : "",
  "flags" : 1,
  "components" : [ { } ],
  "channel_id" : "",
  "author" : {
    "id" : "",
    "username" : ""
  },
  "pinned" : false,
  "mention_everyone" : false
}

What to do if your action is not listed here?

If this component doesn't have the action you need, you can use Custom Action to create your own. Custom Actions empower you to define HTTP requests tailored to your specific requirements, allowing for greater flexibility in integrating with external services or APIs.

To create a Custom Action, simply specify the desired HTTP method, path, and any necessary parameters. This way, you can extend the functionality of your component beyond the predefined actions, ensuring that you can meet all your integration needs effectively.


Additional instructions

anl-c-discord-md

CONNECTION

Setting up OAuth2