Discordbot

Learn how to use Discordbot with Composio

Overview

SLUG

DISCORDBOT

Description

Discordbot refers to automated programs on Discord servers, performing tasks like moderation, music playback, and user engagement to enhance community interactions

Authentication Details

client_id
stringRequired
client_secret
stringRequired
bearer_token
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to identify,email,bot,messages.read
bearer_token
stringRequired
token
stringRequired

Tools

SLUG: DISCORDBOT_ADD_GUILD_MEMBER_ROLE

Assigns a role to a guild member, provided the bot has 'manage roles' permission in the guild and the role to be assigned is hierarchically lower than the bot's highest role.

Action Parameters

guild_id
stringRequired
role_id
stringRequired
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_CREATE_DM

Creates a new direct message (dm) channel or retrieves an existing one, using `recipient id` for a 1-on-1 dm or `access tokens` for a group dm; this action only establishes or fetches the channel and does not send messages.

Action Parameters

access_tokens
array
nicks
object
recipient_id
null

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_CREATE_GUILD

Creates a new discord guild (server) with the specified name, roles, and channels; icon must be a base64 encoded 128x128 image, and if `afk channel id` is set, `afk timeout` must also be set.

Action Parameters

afk_channel_id
null
afk_timeout
null
channels
array
default_message_notifications
null
description
string
explicit_content_filter
null
icon
string
name
stringRequired
preferred_locale
null
region
string
roles
array
system_channel_flags
integer
system_channel_id
null
verification_level
null

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_DELETE_GUILD_MEMBER_ROLE

Removes a specified role from a member of a discord guild, provided the member currently possesses that role.

Action Parameters

guild_id
stringRequired
role_id
stringRequired
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_GET_USER

Fetches public information for a discord user, requiring a valid and existing user id (snowflake).

Action Parameters

user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_LIST_GUILD_MEMBERS

Retrieves members for a discord guild; requires a valid guild id for an existing guild.

Action Parameters

after
integer
guild_id
stringRequired
limit
integer

Action Response

data
arrayRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_ADD_GROUP_DM_USER

Adds a user to a discord group direct message (dm) channel.

Action Parameters

access_token
string
channel_id
stringRequired
nick
string
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_ADD_GUILD_MEMBER

Adds a user (who is not already a member) to a guild using their `access token` (which must have `guilds.join` scope), optionally setting nickname, roles, mute/deaf status, or flags.

Action Parameters

access_token
stringRequired
deaf
boolean
flags
integer
guild_id
stringRequired
mute
boolean
nick
string
roles
array
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_ADD_MY_MESSAGE_REACTION

Adds an emoji reaction from the authenticated user/bot to a specific message in a discord channel; does not return information about existing reactions.

Action Parameters

channel_id
stringRequired
emoji_name
stringRequired
message_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_ADD_THREAD_MEMBER

Adds a user to a specific, unarchived thread; the user must have access to the thread's parent channel, and for private threads, the bot must already be a member.

Action Parameters

channel_id
stringRequired
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_BAN_USER_FROM_GUILD

Permanently bans a user from a discord guild, optionally deleting their recent messages (specify deletion period in seconds or days, not both).

Action Parameters

delete_message_days
integer
delete_message_seconds
integer
guild_id
stringRequired
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_BULK_BAN_USERS_FROM_GUILD

Bans up to 200 users from a discord guild, optionally deleting their recent messages; the bot must have 'ban members' permission in the guild, and this action is irreversible.

Action Parameters

delete_message_seconds
integer
guild_id
stringRequired
user_ids
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_BULK_DELETE_MESSAGES

Atomically bulk deletes messages in a discord channel for moderation or maintenance; deletion may not be instantaneous and messages are unrecoverable.

Action Parameters

channel_id
stringRequired
messages
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_CREATE_APPLICATION_COMMAND

Creates a new global discord application command, accessible across guilds and in dms (if `dm permission` is true), noting global commands can take up to an hour to propagate and have registration limits; for guild-specific commands, use a different action.

Action Parameters

application_id
stringRequired
default_member_permissions
integer
description
string
description_localizations
object
dm_permission
boolean
name
stringRequired
name_localizations
object
options
array
type
null

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_CREATE_AUTO_MODERATION_RULE

Creates a new auto moderation rule for a discord guild, requiring 'manage guild' permission; rule parameters are passed in the json request body (see request schema description for body content).

Action Parameters

guild_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_CREATE_CHANNEL_INVITE

Creates a new invite for the specified discord channel, provided the bot has 'create instant invite' permission for that channel.

Action Parameters

channel_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_CREATE_GUILD_APPLICATION_COMMAND

Creates a new guild-specific application command (slash, user, or message) in discord; command name must be unique per type within the guild (max 100 total commands), and client ui updates may take up to an hour.

Action Parameters

application_id
stringRequired
default_member_permissions
integer
description
string
description_localizations
object
dm_permission
boolean
guild_id
stringRequired
name
stringRequired
name_localizations
object
options
array
type
null

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_CREATE_GUILD_CHANNEL

Creates a new discord channel (text, voice, category, etc.) within a guild, with options for permissions, topic, and type-specific settings.

Action Parameters

available_tags
array
bitrate
integer
default_auto_archive_duration
integer
default_forum_layout
integer
default_reaction_emoji
string
default_sort_order
integer
default_thread_rate_limit_per_user
integer
guild_id
stringRequired
name
stringRequired
nsfw
boolean
parent_id
string
permission_overwrites
array
position
integer
rate_limit_per_user
integer
rtc_region
string
topic
string
type
integer
user_limit
integer
video_quality_mode
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_CREATE_GUILD_EMOJI

Creates a new custom emoji in a specified discord guild, requiring `create expressions` permission and adherence to guild emoji limits.

Action Parameters

guild_id
stringRequired
image
stringRequired
name
stringRequired
roles
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

SLUG: DISCORDBOT_CREATE_GUILD_FROM_TEMPLATE

Creates a new discord guild by applying channels, roles, and settings from a specified, valid, and accessible guild template code.

Action Parameters

code
stringRequired
icon
string
name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired