Skip to main content

Guild Resource

Guilds are referred to as "Servers" in the Discord app.

info

To access these endpoints, you will need to use a token you registered with a Guild ID field.

Guilds Resource on Discord API Docs

Get Guild

GET/guilds/{guild.id}

Returns a Guild object for the given ID.

Modify Guild

PATCH/guilds/{guild.id}

Modify a guild's settings. Returns the updated Guild object on success.

info

All parameters to this endpoint are optional.

JSON params

FieldTypeDescription
accent_color?integerThe guild's accent color as an integer.
auto_theming_enabled?booleanWhether to enable Automatic Theming.
join_channel_id?snowflakeThe channel ID where Welcome Messages are sent.
leave_channel_id?snowflakeThe channel ID where Farewell Messages are sent.
notifications_channel_id?snowflakeThe channel ID where Moderation Notifications are sent.
reports_channel_id?snowflakeThe channel ID where Moderation Reports are sent.

Get Guild Join Message

GET/guilds/{guild.id}/join-message

Returns a Guild Join/Leave Message object for the given ID. Referred to as "Welcome Message" within the app.

Get Guild Leave Message

GET/guilds/{guild.id}/leave-message

Returns a Guild Join/Leave Message object for the given ID. Referred to as "Farewell Message" within the app.

Get Guild Polls

GET/guilds/{guild.id}/polls

Returns an array of Poll objects for this guild.

Guild Object

Guild Structure

FieldTypeDescription
idsnowflakeThe ID of the guild.
accent_colorintegerThe guild's accent color as an integer.
flagsintegerThe guild's public flags.
auto_theming_enabledbooleantrue if the guild has Automatic Theming enabled.
iconstring?The lastly cached image hash for this guild.
join_channel_idsnowflake?The channel ID where Welcome Messages are sent.
leave_channel_idsnowflake?The channel ID where Farewell Messages are sent.
notifications_channel_idsnowflake?The channel ID where Moderation Notifications are sent.
reports_channel_idsnowflake?The channel ID where Moderation Reports are sent.
modulesModulesA modules object.

Guild Flags

ValueNameDescription
1 << 0HasEconomyWhether the guild can access to Economy
1 << 1HasLevelingWhether the guild can access to Leveling
1 << 3HasChatMoneyWhether the guild can access to Chat Money

Example Guild

{
"id": "738747595438030888",
"accent_color": 16743291,
"flags": 0,
"auto_theming_enabled": true,
"icon": null,
"join_channel_id": "843141931504631818",
"leave_channel_id": "843141931504631818",
"notifications_channel_id": "1070375756477255732",
"reports_channel_id": "1070375756477255732",
"modules": {
"economy": false,
"joinMessage": false,
"leaveMessage": false,
"moderationLogs": false,
"moderationReports": false
}
}

Guild Join/Leave Message object

Guild Join/Leave Message structure

FieldTypeDescription
contentstring?The message content.
typestringJOIN_MESSAGE or LEAVE_MESSAGE depending on the message type.
embedEmbed?The message embed.
scriptstring?The message script. Should contain CRBTscript syntax.

Example Guild Join/Leave Message

{
"type": "JOIN_MESSAGE",
"content": "<user.mention>",
"embed": {
"title": "", //*
"description": "We hope you'll enjoy your stay!", //*
"url": null,
"color": 15888775,
"image": {
"url": "<user.avatar>" //*
},
"author": {
"url": "",
"name": "<user.tag> - Welcome!", //*
"icon_url": "<user.avatar>" //*
},
"fields": [], //**
"footer": {
"text": "For any inquiries, please turn to #support.", //*
"icon_url": "https://crbt.app/favicon.ico" //*
},
"thumbnail": {
"url": "<guild.icon>"
}
}
}

* Supports CRBTscript syntax.

** Not implemented in the message builder provided in the CRBT UI.