discord-api-spec
Version:
TypeScript types, flattened JS enums, and Zod schemas generated from [Discord’s OpenAPI spec](https://github.com/discord/discord-api-spec). Built daily for up-to-date data.
1,838 lines (1,721 loc) • 390 kB
text/typescript
/* AUTO-GENERATED. DO NOT EDIT. */
/**
* AfkTimeouts
*/
export const enum AfkTimeouts {
ONE_MINUTE = 60,
FIVE_MINUTES = 300,
FIFTEEN_MINUTES = 900,
THIRTY_MINUTES = 1800,
ONE_HOUR = 3600,
}
/**
* AllowedMentionTypes
*/
export const enum AllowedMentionTypes {
/** Controls role mentions */
USERS = "users",
/** Controls user mentions */
ROLES = "roles",
/** Controls @everyone and @here mentions */
EVERYONE = "everyone",
}
/**
* ApplicationCommandOptionType
*/
export const enum ApplicationCommandOptionType {
/** A sub-action within a command or group */
SUB_COMMAND = 1,
/** A group of subcommands */
SUB_COMMAND_GROUP = 2,
/** A string option */
STRING = 3,
/** An integer option. Any integer between -2^53 and 2^53 is a valid value */
INTEGER = 4,
/** A boolean option */
BOOLEAN = 5,
/** A snowflake option that represents a User */
USER = 6,
/** A snowflake option that represents a Channel. Includes all channel types and categories */
CHANNEL = 7,
/** A snowflake option that represents a Role */
ROLE = 8,
/** A snowflake option that represents anything you can mention */
MENTIONABLE = 9,
/** A number option. Any double between -2^53 and 2^53 is a valid value */
NUMBER = 10,
/** An attachment option */
ATTACHMENT = 11,
}
/**
* ApplicationCommandPermissionType
*/
export const enum ApplicationCommandPermissionType {
/** This permission is for a role. */
ROLE = 1,
/** This permission is for a user. */
USER = 2,
/** This permission is for a channel. */
CHANNEL = 3,
}
/**
* ApplicationCommandType
*/
export const enum ApplicationCommandType {
/** Slash commands; a text-based command that shows up when a user types / */
CHAT = 1,
/** A UI-based command that shows up when you right click or tap on a user */
USER = 2,
/** A UI-based command that shows up when you right click or tap on a message */
MESSAGE = 3,
/** A command that represents the primary way to use an application (e.g. launching an Activity) */
PRIMARY_ENTRY_POINT = 4,
}
/**
* ApplicationExplicitContentFilterTypes
*/
export const enum ApplicationExplicitContentFilterTypes {
/** inherit guild content filter setting */
INHERIT = 0,
/** interactions will always be scanned */
ALWAYS = 1,
}
/**
* ApplicationIdentityProviderAuthType
*/
export const enum ApplicationIdentityProviderAuthType {
OIDC = "OIDC",
EPIC_ONLINE_SERVICES_ACCESS_TOKEN = "EPIC_ONLINE_SERVICES_ACCESS_TOKEN",
EPIC_ONLINE_SERVICES_ID_TOKEN = "EPIC_ONLINE_SERVICES_ID_TOKEN",
STEAM_SESSION_TICKET = "STEAM_SESSION_TICKET",
UNITY_SERVICES_ID_TOKEN = "UNITY_SERVICES_ID_TOKEN",
DISCORD_BOT_ISSUED_ACCESS_TOKEN = "DISCORD_BOT_ISSUED_ACCESS_TOKEN",
APPLE_ID_TOKEN = "APPLE_ID_TOKEN",
PLAYSTATION_NETWORK_ID_TOKEN = "PLAYSTATION_NETWORK_ID_TOKEN",
}
/**
* ApplicationIntegrationType
*/
export const enum ApplicationIntegrationType {
/** For Guild install. */
GUILD_INSTALL = 0,
/** For User install. */
USER_INSTALL = 1,
}
/**
* ApplicationTypes
*/
export const enum ApplicationTypes {
GUILD_ROLE_SUBSCRIPTIONS = 4,
}
/**
* AuditLogActionTypes
*/
export const enum AuditLogActionTypes {
GUILD_UPDATE = 1,
CHANNEL_CREATE = 10,
CHANNEL_UPDATE = 11,
CHANNEL_DELETE = 12,
CHANNEL_OVERWRITE_CREATE = 13,
CHANNEL_OVERWRITE_UPDATE = 14,
CHANNEL_OVERWRITE_DELETE = 15,
MEMBER_KICK = 20,
MEMBER_PRUNE = 21,
MEMBER_BAN_ADD = 22,
MEMBER_BAN_REMOVE = 23,
MEMBER_UPDATE = 24,
MEMBER_ROLE_UPDATE = 25,
MEMBER_MOVE = 26,
MEMBER_DISCONNECT = 27,
BOT_ADD = 28,
ROLE_CREATE = 30,
ROLE_UPDATE = 31,
ROLE_DELETE = 32,
INVITE_CREATE = 40,
INVITE_UPDATE = 41,
INVITE_DELETE = 42,
WEBHOOK_CREATE = 50,
WEBHOOK_UPDATE = 51,
WEBHOOK_DELETE = 52,
EMOJI_CREATE = 60,
EMOJI_UPDATE = 61,
EMOJI_DELETE = 62,
MESSAGE_DELETE = 72,
MESSAGE_BULK_DELETE = 73,
MESSAGE_PIN = 74,
MESSAGE_UNPIN = 75,
INTEGRATION_CREATE = 80,
INTEGRATION_UPDATE = 81,
INTEGRATION_DELETE = 82,
STAGE_INSTANCE_CREATE = 83,
STAGE_INSTANCE_UPDATE = 84,
STAGE_INSTANCE_DELETE = 85,
STICKER_CREATE = 90,
STICKER_UPDATE = 91,
STICKER_DELETE = 92,
GUILD_SCHEDULED_EVENT_CREATE = 100,
GUILD_SCHEDULED_EVENT_UPDATE = 101,
GUILD_SCHEDULED_EVENT_DELETE = 102,
THREAD_CREATE = 110,
THREAD_UPDATE = 111,
THREAD_DELETE = 112,
APPLICATION_COMMAND_PERMISSION_UPDATE = 121,
SOUNDBOARD_SOUND_CREATE = 130,
SOUNDBOARD_SOUND_UPDATE = 131,
SOUNDBOARD_SOUND_DELETE = 132,
AUTO_MODERATION_RULE_CREATE = 140,
AUTO_MODERATION_RULE_UPDATE = 141,
AUTO_MODERATION_RULE_DELETE = 142,
AUTO_MODERATION_BLOCK_MESSAGE = 143,
AUTO_MODERATION_FLAG_TO_CHANNEL = 144,
AUTO_MODERATION_USER_COMM_DISABLED = 145,
AUTO_MODERATION_QUARANTINE_USER = 146,
CREATOR_MONETIZATION_REQUEST_CREATED = 150,
CREATOR_MONETIZATION_TERMS_ACCEPTED = 151,
ONBOARDING_PROMPT_CREATE = 163,
ONBOARDING_PROMPT_UPDATE = 164,
ONBOARDING_PROMPT_DELETE = 165,
ONBOARDING_CREATE = 166,
ONBOARDING_UPDATE = 167,
GUILD_HOME_FEATURE_ITEM = 171,
GUILD_HOME_REMOVE_ITEM = 172,
HARMFUL_LINKS_BLOCKED_MESSAGE = 180,
HOME_SETTINGS_CREATE = 190,
HOME_SETTINGS_UPDATE = 191,
VOICE_CHANNEL_STATUS_CREATE = 192,
VOICE_CHANNEL_STATUS_DELETE = 193,
GUILD_PROFILE_UPDATE = 211,
}
/**
* AuthorType
*/
export const enum AuthorType {
USER = "user",
BOT = "bot",
WEBHOOK = "webhook",
NO_USER = "-user",
NO_BOT = "-bot",
NO_WEBHOOK = "-webhook",
}
/**
* AutomodActionType
*/
export const enum AutomodActionType {
/** Block a user's message and prevent it from being posted. A custom explanation can be specified and shown to members whenever their message is blocked */
BLOCK_MESSAGE = 1,
/** Send a system message to a channel in order to log the user message that triggered the rule */
FLAG_TO_CHANNEL = 2,
/** Temporarily disable a user's ability to communicate in the server (timeout) */
USER_COMMUNICATION_DISABLED = 3,
/** Prevent a user from interacting in the server */
QUARANTINE_USER = 4,
}
/**
* AutomodEventType
*/
export const enum AutomodEventType {
/** A user submitted a message to a channel */
MESSAGE_SEND = 1,
/** A user is attempting to join the server or a member's properties were updated. */
GUILD_MEMBER_JOIN_OR_UPDATE = 2,
}
/**
* AutomodKeywordPresetType
*/
export const enum AutomodKeywordPresetType {
/** Words and phrases that may be considered profanity */
PROFANITY = 1,
/** Words and phrases that may be considered as sexual content */
SEXUAL_CONTENT = 2,
/** Words and phrases that may be considered slurs and hate speech */
SLURS = 3,
}
/**
* AutomodTriggerType
*/
export const enum AutomodTriggerType {
/** Check if content contains words from a list of keywords or matches regex */
KEYWORD = 1,
/** DEPRECATED */
SPAM_LINK = 2,
/** Check if content represents generic spam */
ML_SPAM = 3,
/** Check if content contains words from internal pre-defined wordsets */
DEFAULT_KEYWORD_LIST = 4,
/** Check if content contains more unique mentions than allowed */
MENTION_SPAM = 5,
}
/**
* AvailableLocalesEnum
*/
export const enum AvailableLocalesEnum {
/** The ar locale */
ar = "ar",
/** The bg locale */
bg = "bg",
/** The cs locale */
cs = "cs",
/** The da locale */
da = "da",
/** The de locale */
de = "de",
/** The el locale */
el = "el",
/** The en-GB locale */
"en-GB" = "en-GB",
/** The en-US locale */
"en-US" = "en-US",
/** The es-419 locale */
"es-419" = "es-419",
/** The es-ES locale */
"es-ES" = "es-ES",
/** The fi locale */
fi = "fi",
/** The fr locale */
fr = "fr",
/** The he locale */
he = "he",
/** The hi locale */
hi = "hi",
/** The hr locale */
hr = "hr",
/** The hu locale */
hu = "hu",
/** The id locale */
id = "id",
/** The it locale */
it = "it",
/** The ja locale */
ja = "ja",
/** The ko locale */
ko = "ko",
/** The lt locale */
lt = "lt",
/** The nl locale */
nl = "nl",
/** The no locale */
no = "no",
/** The pl locale */
pl = "pl",
/** The pt-BR locale */
"pt-BR" = "pt-BR",
/** The ro locale */
ro = "ro",
/** The ru locale */
ru = "ru",
/** The sv-SE locale */
"sv-SE" = "sv-SE",
/** The th locale */
th = "th",
/** The tr locale */
tr = "tr",
/** The uk locale */
uk = "uk",
/** The vi locale */
vi = "vi",
/** The zh-CN locale */
"zh-CN" = "zh-CN",
/** The zh-TW locale */
"zh-TW" = "zh-TW",
}
/**
* ButtonStyleTypes
*/
export const enum ButtonStyleTypes {
PRIMARY = 1,
SECONDARY = 2,
SUCCESS = 3,
DANGER = 4,
LINK = 5,
PREMIUM = 6,
}
/**
* ChannelPermissionOverwrites
*/
export const enum ChannelPermissionOverwrites {
ROLE = 0,
MEMBER = 1,
}
/**
* ChannelTypes
*/
export const enum ChannelTypes {
/** A direct message between users */
DM = 1,
/** A direct message between multiple users */
GROUP_DM = 3,
/** A text channel within a server */
GUILD_TEXT = 0,
/** A voice channel within a server */
GUILD_VOICE = 2,
/** An organizational category that contains up to 50 channels */
GUILD_CATEGORY = 4,
/** A channel that users can follow and crosspost into their own server (formerly news channels) */
GUILD_ANNOUNCEMENT = 5,
/** A temporary sub-channel within a GUILD_ANNOUNCEMENT channel */
ANNOUNCEMENT_THREAD = 10,
/** A temporary sub-channel within a GUILD_TEXT or GUILD_THREADS_ONLY channel type set */
PUBLIC_THREAD = 11,
/** A temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those with the MANAGE_THREADS permission */
PRIVATE_THREAD = 12,
/** A voice channel for hosting events with an audience */
GUILD_STAGE_VOICE = 13,
/** The channel in a hub containing the listed servers */
GUILD_DIRECTORY = 14,
/** Channel that can only contain threads */
GUILD_FORUM = 15,
}
/**
* ConnectedAccountProviders
*/
export const enum ConnectedAccountProviders {
BATTLENET = "battlenet",
BLUESKY = "bluesky",
BUNGIE = "bungie",
EBAY = "ebay",
EPIC_GAMES = "epicgames",
FACEBOOK = "facebook",
GITHUB = "github",
INSTAGRAM = "instagram",
MASTODON = "mastodon",
LEAGUE_OF_LEGENDS = "leagueoflegends",
PAYPAL = "paypal",
PLAYSTATION = "playstation",
REDDIT = "reddit",
RIOT_GAMES = "riotgames",
ROBLOX = "roblox",
SKYPE = "skype",
SPOTIFY = "spotify",
STEAM = "steam",
TIKTOK = "tiktok",
TWITCH = "twitch",
TWITTER = "twitter",
XBOX = "xbox",
YOUTUBE = "youtube",
DOMAIN = "domain",
}
/**
* ConnectedAccountVisibility
*/
export const enum ConnectedAccountVisibility {
NONE = 0,
EVERYONE = 1,
}
/**
* EmbeddedActivityLocationKind
*/
export const enum EmbeddedActivityLocationKind {
/** guild channel */
GUILD_CHANNEL = "gc",
/** private channel */
PRIVATE_CHANNEL = "pc",
/** party */
PARTY = "party",
}
/**
* EntitlementTenantFulfillmentStatusResponse
*/
export const enum EntitlementTenantFulfillmentStatusResponse {
UNKNOWN = 0,
FULFILLMENT_NOT_NEEDED = 1,
FULFILLMENT_NEEDED = 2,
FULFILLED = 3,
FULFILLMENT_FAILED = 4,
UNFULFILLMENT_NEEDED = 5,
UNFULFILLED = 6,
UNFULFILLMENT_FAILED = 7,
}
/**
* EntitlementTypes
*/
export const enum EntitlementTypes {
APPLICATION_SUBSCRIPTION = 8,
QUEST_REWARD = 10,
}
/**
* ForumLayout
*/
export const enum ForumLayout {
/** No default has been set for forum channel */
DEFAULT = 0,
/** Display posts as a list */
LIST = 1,
/** Display posts as a collection of tiles */
GRID = 2,
}
/**
* GuildExplicitContentFilterTypes
*/
export const enum GuildExplicitContentFilterTypes {
/** media content will not be scanned */
DISABLED = 0,
/** media content sent by members without roles will be scanned */
MEMBERS_WITHOUT_ROLES = 1,
/** media content sent by all members will be scanned */
ALL_MEMBERS = 2,
}
/**
* GuildFeatures
*/
export const enum GuildFeatures {
/** guild has access to set an animated guild banner image */
ANIMATED_BANNER = "ANIMATED_BANNER",
/** guild has access to set an animated guild icon */
ANIMATED_ICON = "ANIMATED_ICON",
/** guild is using the old permissions configuration behavior */
APPLICATION_COMMAND_PERMISSIONS_V2 = "APPLICATION_COMMAND_PERMISSIONS_V2",
/** guild has set up auto moderation rules */
AUTO_MODERATION = "AUTO_MODERATION",
/** guild has access to set a guild banner image */
BANNER = "BANNER",
/** guild can enable welcome screen, Membership Screening, stage channels and discovery, and receives community updates */
COMMUNITY = "COMMUNITY",
/** guild has enabled monetization */
CREATOR_MONETIZABLE_PROVISIONAL = "CREATOR_MONETIZABLE_PROVISIONAL",
/** guild has enabled the role subscription promo page */
CREATOR_STORE_PAGE = "CREATOR_STORE_PAGE",
/** guild has been set as a support server on the App Directory */
DEVELOPER_SUPPORT_SERVER = "DEVELOPER_SUPPORT_SERVER",
/** guild is able to be discovered in the directory */
DISCOVERABLE = "DISCOVERABLE",
/** guild is able to be featured in the directory */
FEATURABLE = "FEATURABLE",
/** guild has paused invites, preventing new users from joining */
INVITES_DISABLED = "INVITES_DISABLED",
/** guild has access to set an invite splash background */
INVITE_SPLASH = "INVITE_SPLASH",
/** guild has enabled Membership Screening */
MEMBER_VERIFICATION_GATE_ENABLED = "MEMBER_VERIFICATION_GATE_ENABLED",
/** guild has increased custom sticker slots */
MORE_STICKERS = "MORE_STICKERS",
/** guild has access to create announcement channels */
NEWS = "NEWS",
/** guild is partnered */
PARTNERED = "PARTNERED",
/** guild can be previewed before joining via Membership Screening or the directory */
PREVIEW_ENABLED = "PREVIEW_ENABLED",
/** guild has disabled activity alerts in the configured safety alerts channel */
RAID_ALERTS_DISABLED = "RAID_ALERTS_DISABLED",
/** guild is able to set role icons */
ROLE_ICONS = "ROLE_ICONS",
/** guild has role subscriptions that can be purchased */
ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE",
/** guild has enabled role subscriptions */
ROLE_SUBSCRIPTIONS_ENABLED = "ROLE_SUBSCRIPTIONS_ENABLED",
/** guild has enabled ticketed events */
TICKETED_EVENTS_ENABLED = "TICKETED_EVENTS_ENABLED",
/** guild has access to set a vanity URL */
VANITY_URL = "VANITY_URL",
/** guild is verified */
VERIFIED = "VERIFIED",
/** guild has access to set 384kbps bitrate in voice (previously VIP voice servers) */
VIP_REGIONS = "VIP_REGIONS",
/** guild has enabled the welcome screen */
WELCOME_SCREEN_ENABLED = "WELCOME_SCREEN_ENABLED",
/** guild is an official guild for one or more games */
OFFICIAL_GAME_GUILD = "OFFICIAL_GAME_GUILD",
}
/**
* GuildMFALevel
*/
export const enum GuildMFALevel {
/** Guild has no MFA/2FA requirement for moderation actions */
NONE = 0,
/** Guild has a 2FA requirement for moderation actions */
ELEVATED = 1,
}
/**
* GuildNSFWContentLevel
*/
export const enum GuildNSFWContentLevel {
DEFAULT = 0,
EXPLICIT = 1,
SAFE = 2,
AGE_RESTRICTED = 3,
}
/**
* GuildOnboardingMode
*/
export const enum GuildOnboardingMode {
/** Only Default Channels considered in constraints */
ONBOARDING_DEFAULT = 0,
/** Default Channels and Onboarding Prompts considered in constraints */
ONBOARDING_ADVANCED = 1,
}
/**
* GuildScheduledEventEntityTypes
*/
export const enum GuildScheduledEventEntityTypes {
NONE = 0,
STAGE_INSTANCE = 1,
VOICE = 2,
EXTERNAL = 3,
}
/**
* GuildScheduledEventPrivacyLevels
*/
export const enum GuildScheduledEventPrivacyLevels {
/** the scheduled event is only accessible to guild members */
GUILD_ONLY = 2,
}
/**
* GuildScheduledEventStatuses
*/
export const enum GuildScheduledEventStatuses {
SCHEDULED = 1,
ACTIVE = 2,
COMPLETED = 3,
CANCELED = 4,
}
/**
* HasOption
*/
export const enum HasOption {
LINK = "link",
EMBED = "embed",
FILE = "file",
IMAGE = "image",
VIDEO = "video",
SOUND = "sound",
STICKER = "sticker",
POLL = "poll",
SNAPSHOT = "snapshot",
NO_LINK = "-link",
NO_EMBED = "-embed",
NO_FILE = "-file",
NO_IMAGE = "-image",
NO_VIDEO = "-video",
NO_SOUND = "-sound",
NO_STICKER = "-sticker",
NO_POLL = "-poll",
NO_SNAPSHOT = "-snapshot",
}
/**
* IntegrationExpireBehaviorTypes
*/
export const enum IntegrationExpireBehaviorTypes {
/** Remove role */
REMOVE_ROLE = 0,
/** Kick */
KICK = 1,
}
/**
* IntegrationExpireGracePeriodTypes
*/
export const enum IntegrationExpireGracePeriodTypes {
/** 1 day */
ONE_DAY = 1,
/** 3 days */
THREE_DAYS = 3,
/** 7 days */
SEVEN_DAYS = 7,
/** 14 days */
FOURTEEN_DAYS = 14,
/** 30 days */
THIRTY_DAYS = 30,
}
/**
* IntegrationTypes
*/
export const enum IntegrationTypes {
DISCORD = "discord",
TWITCH = "twitch",
YOUTUBE = "youtube",
GUILD_SUBSCRIPTION = "guild_subscription",
}
/**
* InteractionCallbackTypes
*/
export const enum InteractionCallbackTypes {
PONG = 1,
CHANNEL_MESSAGE_WITH_SOURCE = 4,
DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE = 5,
DEFERRED_UPDATE_MESSAGE = 6,
UPDATE_MESSAGE = 7,
APPLICATION_COMMAND_AUTOCOMPLETE_RESULT = 8,
MODAL = 9,
LAUNCH_ACTIVITY = 12,
SOCIAL_LAYER_SKU_PURCHASE_ELIGIBILITY = 13,
}
/**
* InteractionContextType
*/
export const enum InteractionContextType {
/** This command can be used within a Guild. */
GUILD = 0,
/** This command can be used within a DM with this application's bot. */
BOT_DM = 1,
/** This command can be used within DMs and Group DMs with users. */
PRIVATE_CHANNEL = 2,
}
/**
* InteractionTypes
*/
export const enum InteractionTypes {
/** Sent by Discord to validate your application's interaction handler */
PING = 1,
/** Sent when a user uses an application command */
APPLICATION_COMMAND = 2,
/** Sent when a user interacts with a message component previously sent by your application */
MESSAGE_COMPONENT = 3,
/** Sent when a user is filling in an autocomplete option in a chat command */
APPLICATION_COMMAND_AUTOCOMPLETE = 4,
/** Sent when a user submits a modal previously sent by your application */
MODAL_SUBMIT = 5,
/** Sent when Discord is checking if a user can purchase a Social Layer SKU */
SOCIAL_LAYER_SKU_PURCHASE_ELIGIBILITY = 6,
}
/**
* InviteTargetTypes
*/
export const enum InviteTargetTypes {
STREAM = 1,
EMBEDDED_APPLICATION = 2,
ROLE_SUBSCRIPTIONS_PURCHASE = 3,
}
/**
* InviteTypes
*/
export const enum InviteTypes {
GUILD = 0,
GROUP_DM = 1,
FRIEND = 2,
}
/**
* MessageComponentSeparatorSpacingSize
*/
export const enum MessageComponentSeparatorSpacingSize {
/** Small spacing */
SMALL = 1,
/** Large spacing */
LARGE = 2,
}
/**
* MessageComponentTypes
*/
export const enum MessageComponentTypes {
/** Container for other components */
ACTION_ROW = 1,
/** Button object */
BUTTON = 2,
/** Select menu for picking from defined text options */
STRING_SELECT = 3,
/** Text input object */
TEXT_INPUT = 4,
/** Select menu for users */
USER_SELECT = 5,
/** Select menu for roles */
ROLE_SELECT = 6,
/** Select menu for mentionables (users and roles) */
MENTIONABLE_SELECT = 7,
/** Select menu for channels */
CHANNEL_SELECT = 8,
/** Section component */
SECTION = 9,
/** Text component */
TEXT_DISPLAY = 10,
/** Thumbnail component */
THUMBNAIL = 11,
/** Media gallery component */
MEDIA_GALLERY = 12,
/** File component */
FILE = 13,
/** Separator component */
SEPARATOR = 14,
/** Container component */
CONTAINER = 17,
/** Label component */
LABEL = 18,
/** File upload component */
FILE_UPLOAD = 19,
/** Radio group component */
RADIO_GROUP = 21,
/** Checkbox group component */
CHECKBOX_GROUP = 22,
/** Checkbox component */
CHECKBOX = 23,
}
/**
* MessageReferenceType
*/
export const enum MessageReferenceType {
/** Reference to a message */
DEFAULT = 0,
}
/**
* MessageShareCustomUserThemeBaseTheme
*/
export const enum MessageShareCustomUserThemeBaseTheme {
/** No base theme */
UNSET = 0,
/** Dark base theme */
DARK = 1,
/** Light base theme */
LIGHT = 2,
/** Darker base theme */
DARKER = 3,
/** Midnight base theme */
MIDNIGHT = 4,
}
/**
* MessageType
*/
export const enum MessageType {
DEFAULT = 0,
RECIPIENT_ADD = 1,
RECIPIENT_REMOVE = 2,
CALL = 3,
CHANNEL_NAME_CHANGE = 4,
CHANNEL_ICON_CHANGE = 5,
CHANNEL_PINNED_MESSAGE = 6,
USER_JOIN = 7,
GUILD_BOOST = 8,
GUILD_BOOST_TIER_1 = 9,
GUILD_BOOST_TIER_2 = 10,
GUILD_BOOST_TIER_3 = 11,
CHANNEL_FOLLOW_ADD = 12,
GUILD_DISCOVERY_DISQUALIFIED = 14,
GUILD_DISCOVERY_REQUALIFIED = 15,
GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING = 16,
GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING = 17,
THREAD_CREATED = 18,
REPLY = 19,
CHAT_INPUT_COMMAND = 20,
THREAD_STARTER_MESSAGE = 21,
GUILD_INVITE_REMINDER = 22,
CONTEXT_MENU_COMMAND = 23,
AUTO_MODERATION_ACTION = 24,
ROLE_SUBSCRIPTION_PURCHASE = 25,
INTERACTION_PREMIUM_UPSELL = 26,
STAGE_START = 27,
STAGE_END = 28,
STAGE_SPEAKER = 29,
STAGE_TOPIC = 31,
GUILD_APPLICATION_PREMIUM_SUBSCRIPTION = 32,
GUILD_INCIDENT_ALERT_MODE_ENABLED = 36,
GUILD_INCIDENT_ALERT_MODE_DISABLED = 37,
GUILD_INCIDENT_REPORT_RAID = 38,
GUILD_INCIDENT_REPORT_FALSE_ALARM = 39,
POLL_RESULT = 46,
HD_STREAMING_UPGRADED = 55,
}
/**
* MetadataItemTypes
*/
export const enum MetadataItemTypes {
/** the metadata value (integer) is less than or equal to the guild's configured value (integer) */
INTEGER_LESS_THAN_EQUAL = 1,
/** the metadata value (integer) is greater than or equal to the guild's configured value (integer) */
INTEGER_GREATER_THAN_EQUAL = 2,
/** the metadata value (integer) is equal to the guild's configured value (integer) */
INTEGER_EQUAL = 3,
/** the metadata value (integer) is not equal to the guild's configured value (integer) */
INTEGER_NOT_EQUAL = 4,
/** the metadata value (ISO8601 string) is less than or equal to the guild's configured value (integer; days before current date) */
DATETIME_LESS_THAN_EQUAL = 5,
/** the metadata value (ISO8601 string) is greater than or equal to the guild's configured value (integer; days before current date) */
DATETIME_GREATER_THAN_EQUAL = 6,
/** the metadata value (integer) is equal to the guild's configured value (integer; 1) */
BOOLEAN_EQUAL = 7,
/** the metadata value (integer) is not equal to the guild's configured value (integer; 1) */
BOOLEAN_NOT_EQUAL = 8,
}
/**
* NewMemberActionType
*/
export const enum NewMemberActionType {
VIEW = 0,
TALK = 1,
}
/**
* OAuth2Scopes
*/
export const enum OAuth2Scopes {
/** allows /users/@me without email */
IDENTIFY = "identify",
/** enables /users/@me to return an email */
EMAIL = "email",
/** allows /users/@me/connections to return linked third-party accounts */
CONNECTIONS = "connections",
/** allows /users/@me/guilds to return basic information about all of a user's guilds */
GUILDS = "guilds",
/** allows /guilds/{guild.id}/members/{user.id} to be used for joining users to a guild */
GUILDS_JOIN = "guilds.join",
/** allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild */
GUILDS_MEMBERS_READ = "guilds.members.read",
/** allows your app to join users to a group dm */
GDM_JOIN = "gdm.join",
/** for oauth2 bots, this puts the bot in the user's selected guild by default */
BOT = "bot",
/** for local rpc server access, this allows you to control a user's local Discord client - requires Discord approval */
RPC = "rpc",
/** for local rpc server access, this allows you to receive notifications pushed out to the user - requires Discord approval */
RPC_NOTIFICATIONS_READ = "rpc.notifications.read",
/** for local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval */
RPC_VOICE_READ = "rpc.voice.read",
/** for local rpc server access, this allows you to update a user's voice settings - requires Discord approval */
RPC_VOICE_WRITE = "rpc.voice.write",
/** for local rpc server access, this allows you to read a user's video status - requires Discord approval */
RPC_VIDEO_READ = "rpc.video.read",
/** for local rpc server access, this allows you to update a user's video settings - requires Discord approval */
RPC_VIDEO_WRITE = "rpc.video.write",
/** for local rpc server access, this allows you to read a user's screenshare status- requires Discord approval */
RPC_SCREENSHARE_READ = "rpc.screenshare.read",
/** for local rpc server access, this allows you to update a user's screenshare settings- requires Discord approval */
RPC_SCREENSHARE_WRITE = "rpc.screenshare.write",
/** for local rpc server access, this allows you to update a user's activity - requires Discord approval */
RPC_ACTIVITIES_WRITE = "rpc.activities.write",
/** this generates a webhook that is returned in the oauth token response for authorization code grants */
WEBHOOK_INCOMING = "webhook.incoming",
/** for local rpc server api access, this allows you to read messages from all client channels (otherwise restricted to channels/guilds your app creates) */
MESSAGES_READ = "messages.read",
/** allows your app to upload/update builds for a user's applications - requires Discord approval */
APPLICATIONS_BUILDS_UPLOAD = "applications.builds.upload",
/** allows your app to read build data for a user's applications */
APPLICATIONS_BUILDS_READ = "applications.builds.read",
/** allows your app to use commands in a guild */
APPLICATIONS_COMMANDS = "applications.commands",
/** allows your app to update permissions for its commands in a guild a user has permissions to */
APPLICATIONS_COMMANDS_PERMISSIONS_UPDATE = "applications.commands.permissions.update",
/** allows your app to update its commands using a Bearer token - client credentials grant only */
APPLICATIONS_COMMANDS_UPDATE = "applications.commands.update",
/** allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications */
APPLICATIONS_STORE_UPDATE = "applications.store.update",
/** allows your app to read entitlements for a user's applications */
APPLICATIONS_ENTITLEMENTS = "applications.entitlements",
/** allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval */
ACTIVITIES_READ = "activities.read",
/** allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) */
ACTIVITIES_WRITE = "activities.write",
/** allows your app to send activity invites - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) */
ACTIVITIES_INVITES_WRITE = "activities.invites.write",
/** allows your app to know a user's friends and implicit relationships - requires Discord approval */
RELATIONSHIPS_READ = "relationships.read",
/** allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval */
VOICE = "voice",
/** allows your app to see information about the user's DMs and group DMs - requires Discord approval */
DM_CHANNELS_READ = "dm_channels.read",
/** allows your app to update a user's connection and metadata for the app */
ROLE_CONNECTIONS_WRITE = "role_connections.write",
/** for OpenID Connect, this allows your app to receive user id and basic profile information */
OPENID = "openid",
}
/**
* OnboardingPromptType
*/
export const enum OnboardingPromptType {
/** Multiple choice options */
MULTIPLE_CHOICE = 0,
/** Many options shown as a dropdown */
DROPDOWN = 1,
}
/**
* PremiumGuildTiers
*/
export const enum PremiumGuildTiers {
/** Guild has not unlocked any Server Boost perks */
NONE = 0,
/** Guild has unlocked Server Boost level 1 perks */
TIER_1 = 1,
/** Guild has unlocked Server Boost level 2 perks */
TIER_2 = 2,
/** Guild has unlocked Server Boost level 3 perks */
TIER_3 = 3,
}
/**
* PremiumTypes
*/
export const enum PremiumTypes {
/** None */
NONE = 0,
/** Nitro Classic */
TIER_1 = 1,
/** Nitro Standard */
TIER_2 = 2,
/** Nitro Basic */
TIER_0 = 3,
}
/**
* PurchaseType
*/
export const enum PurchaseType {
GUILD_PRODUCT = 0,
}
/**
* ReactionTypes
*/
export const enum ReactionTypes {
/** Normal reaction type */
NORMAL = 0,
/** Burst reaction type */
BURST = 1,
}
/**
* SKUIneligibilityReason
*/
export const enum SKUIneligibilityReason {
/** Other / catch-all */
OTHER = 0,
/** User already owns this SKU or one of its components */
OWNS_SKU_OR_BUNDLE_COMPONENT = 1,
/** User account is not on an eligible platform */
PLATFORM_RESTRICTION = 2,
}
/**
* SearchableEmbedType
*/
export const enum SearchableEmbedType {
IMAGE = "image",
VIDEO = "video",
GIFV = "gif",
SOUND = "sound",
ARTICLE = "article",
}
/**
* SnowflakeSelectDefaultValueTypes
*/
export const enum SnowflakeSelectDefaultValueTypes {
USER = "user",
ROLE = "role",
CHANNEL = "channel",
}
/**
* SortingMode
*/
export const enum SortingMode {
RELEVANCE = "relevance",
TIMESTAMP = "timestamp",
}
/**
* SortingOrder
*/
export const enum SortingOrder {
ASC = "asc",
DESC = "desc",
}
/**
* StageInstancesPrivacyLevels
*/
export const enum StageInstancesPrivacyLevels {
/** The Stage instance is visible publicly. (deprecated) */
PUBLIC = 1,
/** The Stage instance is visible publicly. (deprecated) */
GUILD_ONLY = 2,
}
/**
* StickerFormatTypes
*/
export const enum StickerFormatTypes {
PNG = 1,
APNG = 2,
LOTTIE = 3,
GIF = 4,
}
/**
* StickerTypes
*/
export const enum StickerTypes {
/** an official sticker in a pack, part of Nitro or in a removed purchasable pack */
STANDARD = 1,
/** a sticker uploaded to a guild for the guild's members */
GUILD = 2,
}
/**
* TargetUsersJobStatusTypes
*/
export const enum TargetUsersJobStatusTypes {
/** The default value. */
UNSPECIFIED = 0,
/** The job is still being processed. */
PROCESSING = 1,
/** The job has been completed successfully. */
COMPLETED = 2,
/** The job has failed, see error_message field for more details. */
FAILED = 3,
}
/**
* TeamMembershipStates
*/
export const enum TeamMembershipStates {
/** User has been invited to the team. */
INVITED = 1,
/** User has accepted the team invitation. */
ACCEPTED = 2,
}
/**
* TextInputStyleTypes
*/
export const enum TextInputStyleTypes {
/** Single-line input */
SHORT = 1,
/** Multi-line input */
PARAGRAPH = 2,
}
/**
* ThreadAutoArchiveDuration
*/
export const enum ThreadAutoArchiveDuration {
/** One hour */
ONE_HOUR = 60,
/** One day */
ONE_DAY = 1440,
/** Three days */
THREE_DAY = 4320,
/** Seven days */
SEVEN_DAY = 10080,
}
/**
* ThreadSearchTagSetting
*/
export const enum ThreadSearchTagSetting {
/** The thread tags must contain all tags in the search query */
MATCH_ALL = "match_all",
/** The thread tags must contain at least one of tags in the search query */
MATCH_SOME = "match_some",
}
/**
* ThreadSortOrder
*/
export const enum ThreadSortOrder {
/** Sort forum posts by activity */
LATEST_ACTIVITY = 0,
/** Sort forum posts by creation time (from most recent to oldest) */
CREATION_DATE = 1,
}
/**
* ThreadSortingMode
*/
export const enum ThreadSortingMode {
RELEVANCE = "relevance",
CREATION_TIME = "creation_time",
LAST_MESSAGE_TIME = "last_message_time",
ARCHIVE_TIME = "archive_time",
}
/**
* UserNotificationSettings
*/
export const enum UserNotificationSettings {
/** members will receive notifications for all messages by default */
ALL_MESSAGES = 0,
/** members will receive notifications only for messages that @mention them by default */
ONLY_MENTIONS = 1,
}
/**
* VerificationLevels
*/
export const enum VerificationLevels {
/** unrestricted */
NONE = 0,
/** must have verified email on account */
LOW = 1,
/** must be registered on Discord for longer than 5 minutes */
MEDIUM = 2,
/** must be a member of the server for longer than 10 minutes */
HIGH = 3,
/** must have a verified phone number */
VERY_HIGH = 4,
}
/**
* VideoQualityModes
*/
export const enum VideoQualityModes {
/** Discord chooses the quality for optimal performance */
AUTO = 1,
/** 720p */
FULL = 2,
}
/**
* WebhookTypes
*/
export const enum WebhookTypes {
/** Incoming Webhooks can post messages to channels with a generated token */
GUILD_INCOMING = 1,
/** Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels */
CHANNEL_FOLLOWER = 2,
/** Application webhooks are webhooks used with Interactions */
APPLICATION_INCOMING = 3,
}
/**
* WidgetImageStyles
*/
export const enum WidgetImageStyles {
/** shield style widget with Discord icon and guild members online count */
SHIELD = "shield",
/** large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget */
BANNER1 = "banner1",
/** smaller widget style with guild icon, name and online count. Split on the right with Discord logo */
BANNER2 = "banner2",
/** large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right */
BANNER3 = "banner3",
/** large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget and a "JOIN MY SERVER" button at the bottom */
BANNER4 = "banner4",
}
/**
* WidgetUserDiscriminator
*/
export const enum WidgetUserDiscriminator {
ZEROES = "0000",
}
// Components
export type AccountResponse = {
id: string;
name: string | null;
};
export type ActionRowComponentForMessageRequest = {
type: MessageComponentTypes.ACTION_ROW;
id?: number | null;
components: (
| ButtonComponentForMessageRequest
| ChannelSelectComponentForMessageRequest
| MentionableSelectComponentForMessageRequest
| RoleSelectComponentForMessageRequest
| StringSelectComponentForMessageRequest
| UserSelectComponentForMessageRequest
)[];
};
export type ActionRowComponentForModalRequest = {
type: MessageComponentTypes.ACTION_ROW;
id?: number | null;
components: TextInputComponentForModalRequest[];
};
export type ActionRowComponentResponse = {
type: MessageComponentTypes.ACTION_ROW;
id: number;
components: (
| ButtonComponentResponse
| ChannelSelectComponentResponse
| MentionableSelectComponentResponse
| RoleSelectComponentResponse
| StringSelectComponentResponse
| TextInputComponentResponse
| UserSelectComponentResponse
)[];
};
export type ActivitiesAttachmentResponse = {
attachment: AttachmentResponse;
};
export type ApplicationCommandAttachmentOption = {
type: ApplicationCommandOptionType.ATTACHMENT;
name: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean | null;
};
export type ApplicationCommandAttachmentOptionResponse = {
type: ApplicationCommandOptionType.ATTACHMENT;
name: string;
name_localized?: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localized?: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean;
};
export type ApplicationCommandAutocompleteCallbackRequest = {
type: InteractionCallbackTypes.APPLICATION_COMMAND_AUTOCOMPLETE_RESULT;
data:
| InteractionApplicationCommandAutocompleteCallbackIntegerData
| InteractionApplicationCommandAutocompleteCallbackNumberData
| InteractionApplicationCommandAutocompleteCallbackStringData;
};
export type ApplicationCommandBooleanOption = {
type: ApplicationCommandOptionType.BOOLEAN;
name: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean | null;
};
export type ApplicationCommandBooleanOptionResponse = {
type: ApplicationCommandOptionType.BOOLEAN;
name: string;
name_localized?: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localized?: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean;
};
export type ApplicationCommandChannelOption = {
type: ApplicationCommandOptionType.CHANNEL;
name: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean | null;
channel_types?: ChannelTypes[] | null;
};
export type ApplicationCommandChannelOptionResponse = {
type: ApplicationCommandOptionType.CHANNEL;
name: string;
name_localized?: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localized?: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean;
channel_types?: ChannelTypes[];
};
export type ApplicationCommandCreateRequest = {
name: string;
name_localizations?: {
[key: string]: string;
} | null;
description?: string | null;
description_localizations?: {
[key: string]: string;
} | null;
options?:
| (
| ApplicationCommandAttachmentOption
| ApplicationCommandBooleanOption
| ApplicationCommandChannelOption
| ApplicationCommandIntegerOption
| ApplicationCommandMentionableOption
| ApplicationCommandNumberOption
| ApplicationCommandRoleOption
| ApplicationCommandStringOption
| ApplicationCommandSubcommandGroupOption
| ApplicationCommandSubcommandOption
| ApplicationCommandUserOption
)[]
| null;
default_member_permissions?: number | null;
dm_permission?: boolean | null;
contexts?: InteractionContextType[] | null;
integration_types?: ApplicationIntegrationType[] | null;
handler?: null | ApplicationCommandHandler;
type?: null | ApplicationCommandType;
};
export type ApplicationCommandHandler = number;
export type ApplicationCommandIntegerOption = {
type: ApplicationCommandOptionType.INTEGER;
name: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean | null;
autocomplete?: boolean | null;
choices?: ApplicationCommandOptionIntegerChoice[] | null;
min_value?: null | Int53Type;
max_value?: null | Int53Type;
};
export type ApplicationCommandIntegerOptionResponse = {
type: ApplicationCommandOptionType.INTEGER;
name: string;
name_localized?: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localized?: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean;
autocomplete?: boolean;
choices?: ApplicationCommandOptionIntegerChoiceResponse[];
min_value?: Int53Type;
max_value?: Int53Type;
};
export type ApplicationCommandInteractionMetadataResponse = {
id: SnowflakeType;
type: InteractionTypes.APPLICATION_COMMAND;
user?: UserResponse;
authorizing_integration_owners: {
[key: string]: SnowflakeType;
};
original_response_message_id?: SnowflakeType;
target_user?: UserResponse;
target_message_id?: SnowflakeType;
};
export type ApplicationCommandMentionableOption = {
type: ApplicationCommandOptionType.MENTIONABLE;
name: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean | null;
};
export type ApplicationCommandMentionableOptionResponse = {
type: ApplicationCommandOptionType.MENTIONABLE;
name: string;
name_localized?: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localized?: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean;
};
export type ApplicationCommandNumberOption = {
type: ApplicationCommandOptionType.NUMBER;
name: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean | null;
autocomplete?: boolean | null;
choices?: ApplicationCommandOptionNumberChoice[] | null;
min_value?: number | null;
max_value?: number | null;
};
export type ApplicationCommandNumberOptionResponse = {
type: ApplicationCommandOptionType.NUMBER;
name: string;
name_localized?: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localized?: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean;
autocomplete?: boolean;
choices?: ApplicationCommandOptionNumberChoiceResponse[];
min_value?: number;
max_value?: number;
};
export type ApplicationCommandOptionIntegerChoice = {
name: string;
name_localizations?: {
[key: string]: string;
} | null;
value: Int53Type;
};
export type ApplicationCommandOptionIntegerChoiceResponse = {
name: string;
name_localized?: string;
name_localizations?: {
[key: string]: string;
} | null;
value: Int53Type;
};
export type ApplicationCommandOptionNumberChoice = {
name: string;
name_localizations?: {
[key: string]: string;
} | null;
value: number;
};
export type ApplicationCommandOptionNumberChoiceResponse = {
name: string;
name_localized?: string;
name_localizations?: {
[key: string]: string;
} | null;
value: number;
};
export type ApplicationCommandOptionStringChoice = {
name: string;
name_localizations?: {
[key: string]: string;
} | null;
value: string;
};
export type ApplicationCommandOptionStringChoiceResponse = {
name: string;
name_localized?: string;
name_localizations?: {
[key: string]: string;
} | null;
value: string;
};
export type ApplicationCommandPatchRequestPartial = {
name?: string;
name_localizations?: {
[key: string]: string;
} | null;
description?: string | null;
description_localizations?: {
[key: string]: string;
} | null;
options?:
| (
| ApplicationCommandAttachmentOption
| ApplicationCommandBooleanOption
| ApplicationCommandChannelOption
| ApplicationCommandIntegerOption
| ApplicationCommandMentionableOption
| ApplicationCommandNumberOption
| ApplicationCommandRoleOption
| ApplicationCommandStringOption
| ApplicationCommandSubcommandGroupOption
| ApplicationCommandSubcommandOption
| ApplicationCommandUserOption
)[]
| null;
default_member_permissions?: number | null;
dm_permission?: boolean | null;
contexts?: InteractionContextType[] | null;
integration_types?: ApplicationIntegrationType[] | null;
handler?: null | ApplicationCommandHandler;
};
export type ApplicationCommandPermission = {
id: SnowflakeType;
type: ApplicationCommandPermissionType;
permission: boolean;
};
export type ApplicationCommandResponse = {
id: SnowflakeType;
application_id: SnowflakeType;
version: SnowflakeType;
default_member_permissions: string | null;
type: ApplicationCommandType;
name: string;
name_localized?: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localized?: string;
description_localizations?: {
[key: string]: string;
} | null;
guild_id?: SnowflakeType;
dm_permission?: boolean;
contexts?: InteractionContextType[] | null;
integration_types?: ApplicationIntegrationType[];
options?: (
| ApplicationCommandAttachmentOptionResponse
| ApplicationCommandBooleanOptionResponse
| ApplicationCommandChannelOptionResponse
| ApplicationCommandIntegerOptionResponse
| ApplicationCommandMentionableOptionResponse
| ApplicationCommandNumberOptionResponse
| ApplicationCommandRoleOptionResponse
| ApplicationCommandStringOptionResponse
| ApplicationCommandSubcommandGroupOptionResponse
| ApplicationCommandSubcommandOptionResponse
| ApplicationCommandUserOptionResponse
)[];
nsfw?: boolean;
};
export type ApplicationCommandRoleOption = {
type: ApplicationCommandOptionType.ROLE;
name: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean | null;
};
export type ApplicationCommandRoleOptionResponse = {
type: ApplicationCommandOptionType.ROLE;
name: string;
name_localized?: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localized?: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean;
};
export type ApplicationCommandStringOption = {
type: ApplicationCommandOptionType.STRING;
name: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean | null;
autocomplete?: boolean | null;
min_length?: number | null;
max_length?: number | null;
choices?: ApplicationCommandOptionStringChoice[] | null;
};
export type ApplicationCommandStringOptionResponse = {
type: ApplicationCommandOptionType.STRING;
name: string;
name_localized?: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localized?: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean;
autocomplete?: boolean;
choices?: ApplicationCommandOptionStringChoiceResponse[];
min_length?: number;
max_length?: number;
};
export type ApplicationCommandSubcommandGroupOption = {
type: ApplicationCommandOptionType.SUB_COMMAND_GROUP;
name: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean | null;
options?: ApplicationCommandSubcommandOption[] | null;
};
export type ApplicationCommandSubcommandGroupOptionResponse = {
type: ApplicationCommandOptionType.SUB_COMMAND_GROUP;
name: string;
name_localized?: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localized?: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean;
options?: ApplicationCommandSubcommandOptionResponse[];
};
export type ApplicationCommandSubcommandOption = {
type: ApplicationCommandOptionType.SUB_COMMAND;
name: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean | null;
options?:
| (
| ApplicationCommandAttachmentOption
| ApplicationCommandBooleanOption
| ApplicationCommandChannelOption
| ApplicationCommandIntegerOption
| ApplicationCommandMentionableOption
| ApplicationCommandNumberOption
| ApplicationCommandRoleOption
| ApplicationCommandStringOption
| ApplicationCommandUserOption
)[]
| null;
};
export type ApplicationCommandSubcommandOptionResponse = {
type: ApplicationCommandOptionType.SUB_COMMAND;
name: string;
name_localized?: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localized?: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean;
options?: (
| ApplicationCommandAttachmentOptionResponse
| ApplicationCommandBooleanOptionResponse
| ApplicationCommandChannelOptionResponse
| ApplicationCommandIntegerOptionResponse
| ApplicationCommandMentionableOptionResponse
| ApplicationCommandNumberOptionResponse
| ApplicationCommandRoleOptionResponse
| ApplicationCommandStringOptionResponse
| ApplicationCommandUserOptionResponse
)[];
};
export type ApplicationCommandUpdateRequest = {
name: string;
name_localizations?: {
[key: string]: string;
} | null;
description?: string | null;
description_localizations?: {
[key: string]: string;
} | null;
options?:
| (
| ApplicationCommandAttachmentOption
| ApplicationCommandBooleanOption
| ApplicationCommandChannelOption
| ApplicationCommandIntegerOption
| ApplicationCommandMentionableOption
| ApplicationCommandNumberOption
| ApplicationCommandRoleOption
| ApplicationCommandStringOption
| ApplicationCommandSubcommandGroupOption
| ApplicationCommandSubcommandOption
| ApplicationCommandUserOption
)[]
| null;
default_member_permissions?: number | null;
dm_permission?: boolean | null;
contexts?: InteractionContextType[] | null;
integration_types?: ApplicationIntegrationType[] | null;
handler?: null | ApplicationCommandHandler;
type?: null | ApplicationCommandType;
id?: null | SnowflakeType;
};
export type ApplicationCommandUserOption = {
type: ApplicationCommandOptionType.USER;
name: string;
name_localizations?: {
[key: string]: string;
} | null;
description: string;
description_localizations?: {
[key: string]: string;
} | null;
required?: boolean | null;
};
export type ApplicationCommandUserOptionResponse = {
type: ApplicationCommandOptionType.USER;
name: string;
name