mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-06-01 00:10:09 +00:00
refactor(Enums): make property casing consistent (#131)
BREAKING CHANGE: Enum keys have been normalized, and they are all PascalCased now (for API v8 and above). API v6 did not receive these changes.
This commit is contained in:
@@ -30,7 +30,7 @@ export const GatewayVersion = '8';
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
|
||||
*/
|
||||
export enum GatewayOPCodes {
|
||||
export enum GatewayOpcodes {
|
||||
/**
|
||||
* An event was dispatched
|
||||
*/
|
||||
@@ -91,7 +91,7 @@ export enum GatewayCloseCodes {
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#payloads-and-opcodes
|
||||
*/
|
||||
UnknownOpCode,
|
||||
UnknownOpcode,
|
||||
/**
|
||||
* You sent an invalid payload to us. Don't do that!
|
||||
*
|
||||
@@ -165,21 +165,21 @@ export enum GatewayCloseCodes {
|
||||
* https://discord.com/developers/docs/topics/gateway#list-of-intents
|
||||
*/
|
||||
export enum GatewayIntentBits {
|
||||
GUILDS = 1 << 0,
|
||||
GUILD_MEMBERS = 1 << 1,
|
||||
GUILD_BANS = 1 << 2,
|
||||
GUILD_EMOJIS = 1 << 3,
|
||||
GUILD_INTEGRATIONS = 1 << 4,
|
||||
GUILD_WEBHOOKS = 1 << 5,
|
||||
GUILD_INVITES = 1 << 6,
|
||||
GUILD_VOICE_STATES = 1 << 7,
|
||||
GUILD_PRESENCES = 1 << 8,
|
||||
GUILD_MESSAGES = 1 << 9,
|
||||
GUILD_MESSAGE_REACTIONS = 1 << 10,
|
||||
GUILD_MESSAGE_TYPING = 1 << 11,
|
||||
DIRECT_MESSAGES = 1 << 12,
|
||||
DIRECT_MESSAGE_REACTIONS = 1 << 13,
|
||||
DIRECT_MESSAGE_TYPING = 1 << 14,
|
||||
Guilds = 1 << 0,
|
||||
GuildMembers = 1 << 1,
|
||||
GuildBans = 1 << 2,
|
||||
GuildEmojis = 1 << 3,
|
||||
GuildIntegrations = 1 << 4,
|
||||
GuildWebhooks = 1 << 5,
|
||||
GuildInvites = 1 << 6,
|
||||
GuildVoiceStates = 1 << 7,
|
||||
GuildPresences = 1 << 8,
|
||||
GuildMessages = 1 << 9,
|
||||
GuildMessageReactions = 1 << 10,
|
||||
GuildMessageTyping = 1 << 11,
|
||||
DirectMessages = 1 << 12,
|
||||
DirectMessageReactions = 1 << 13,
|
||||
DirectMessageTyping = 1 << 14,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -341,7 +341,7 @@ export type GatewayApplicationCommandDeleteDispatchData = GatewayApplicationComm
|
||||
* https://discord.com/developers/docs/topics/gateway#hello
|
||||
*/
|
||||
export interface GatewayHello extends NonDispatchPayload {
|
||||
op: GatewayOPCodes.Hello;
|
||||
op: GatewayOpcodes.Hello;
|
||||
d: GatewayHelloData;
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ export interface GatewayHelloData {
|
||||
* https://discord.com/developers/docs/topics/gateway#heartbeating
|
||||
*/
|
||||
export interface GatewayHeartbeatRequest extends NonDispatchPayload {
|
||||
op: GatewayOPCodes.Heartbeat;
|
||||
op: GatewayOpcodes.Heartbeat;
|
||||
d: never;
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ export interface GatewayHeartbeatRequest extends NonDispatchPayload {
|
||||
* https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack
|
||||
*/
|
||||
export interface GatewayHeartbeatAck extends NonDispatchPayload {
|
||||
op: GatewayOPCodes.HeartbeatAck;
|
||||
op: GatewayOpcodes.HeartbeatAck;
|
||||
d: never;
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ export interface GatewayHeartbeatAck extends NonDispatchPayload {
|
||||
* https://discord.com/developers/docs/topics/gateway#invalid-session
|
||||
*/
|
||||
export interface GatewayInvalidSession extends NonDispatchPayload {
|
||||
op: GatewayOPCodes.InvalidSession;
|
||||
op: GatewayOpcodes.InvalidSession;
|
||||
d: GatewayInvalidSessionData;
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ export type GatewayInvalidSessionData = boolean;
|
||||
* https://discord.com/developers/docs/topics/gateway#reconnect
|
||||
*/
|
||||
export interface GatewayReconnect extends NonDispatchPayload {
|
||||
op: GatewayOPCodes.Reconnect;
|
||||
op: GatewayOpcodes.Reconnect;
|
||||
d: never;
|
||||
}
|
||||
|
||||
@@ -1250,7 +1250,7 @@ export interface GatewayWebhooksUpdateDispatchData {
|
||||
* https://discord.com/developers/docs/topics/gateway#heartbeating
|
||||
*/
|
||||
export interface GatewayHeartbeat {
|
||||
op: GatewayOPCodes.Heartbeat;
|
||||
op: GatewayOpcodes.Heartbeat;
|
||||
d: GatewayHeartbeatData;
|
||||
}
|
||||
|
||||
@@ -1263,7 +1263,7 @@ export type GatewayHeartbeatData = number | null;
|
||||
* https://discord.com/developers/docs/topics/gateway#identify
|
||||
*/
|
||||
export interface GatewayIdentify {
|
||||
op: GatewayOPCodes.Identify;
|
||||
op: GatewayOpcodes.Identify;
|
||||
d: GatewayIdentifyData;
|
||||
}
|
||||
|
||||
@@ -1336,7 +1336,7 @@ export interface GatewayIdentifyProperties {
|
||||
* https://discord.com/developers/docs/topics/gateway#resume
|
||||
*/
|
||||
export interface GatewayResume {
|
||||
op: GatewayOPCodes.Resume;
|
||||
op: GatewayOpcodes.Resume;
|
||||
d: GatewayResumeData;
|
||||
}
|
||||
|
||||
@@ -1362,7 +1362,7 @@ export interface GatewayResumeData {
|
||||
* https://discord.com/developers/docs/topics/gateway#request-guild-members
|
||||
*/
|
||||
export interface GatewayRequestGuildMembers {
|
||||
op: GatewayOPCodes.RequestGuildMembers;
|
||||
op: GatewayOpcodes.RequestGuildMembers;
|
||||
d: GatewayRequestGuildMembersData;
|
||||
}
|
||||
|
||||
@@ -1405,7 +1405,7 @@ export interface GatewayRequestGuildMembersData {
|
||||
* https://discord.com/developers/docs/topics/gateway#update-voice-state
|
||||
*/
|
||||
export interface GatewayVoiceStateUpdate {
|
||||
op: GatewayOPCodes.VoiceStateUpdate;
|
||||
op: GatewayOpcodes.VoiceStateUpdate;
|
||||
d: GatewayVoiceStateUpdateData;
|
||||
}
|
||||
|
||||
@@ -1435,7 +1435,7 @@ export interface GatewayVoiceStateUpdateData {
|
||||
* https://discord.com/developers/docs/topics/gateway#update-status
|
||||
*/
|
||||
export interface GatewayUpdatePresence {
|
||||
op: GatewayOPCodes.PresenceUpdate;
|
||||
op: GatewayOpcodes.PresenceUpdate;
|
||||
d: GatewayPresenceUpdateData;
|
||||
}
|
||||
|
||||
@@ -1477,7 +1477,7 @@ interface BasePayload {
|
||||
/**
|
||||
* Opcode for the payload
|
||||
*/
|
||||
op: GatewayOPCodes;
|
||||
op: GatewayOpcodes;
|
||||
/**
|
||||
* Event data
|
||||
*/
|
||||
@@ -1495,7 +1495,7 @@ interface BasePayload {
|
||||
type NonDispatchPayload = Omit<BasePayload, 't'>;
|
||||
|
||||
interface DataPayload<Event extends GatewayDispatchEvents, D = unknown> extends BasePayload {
|
||||
op: GatewayOPCodes.Dispatch;
|
||||
op: GatewayOpcodes.Dispatch;
|
||||
t: Event;
|
||||
d: D;
|
||||
}
|
||||
|
||||
@@ -92,49 +92,49 @@ export interface APIAuditLogEntry {
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
|
||||
*/
|
||||
export enum AuditLogEvent {
|
||||
GUILD_UPDATE = 1,
|
||||
GuildUpdate = 1,
|
||||
|
||||
CHANNEL_CREATE = 10,
|
||||
CHANNEL_UPDATE,
|
||||
CHANNEL_DELETE,
|
||||
CHANNEL_OVERWRITE_CREATE,
|
||||
CHANNEL_OVERWRITE_UPDATE,
|
||||
CHANNEL_OVERWRITE_DELETE,
|
||||
ChannelCreate = 10,
|
||||
ChannelUpdate,
|
||||
ChannelDelete,
|
||||
ChannelOverwriteCreate,
|
||||
ChannelOverwriteUpdate,
|
||||
ChannelOverwriteDelete,
|
||||
|
||||
MEMBER_KICK = 20,
|
||||
MEMBER_PRUNE,
|
||||
MEMBER_BAN_ADD,
|
||||
MEMBER_BAN_REMOVE,
|
||||
MEMBER_UPDATE,
|
||||
MEMBER_ROLE_UPDATE,
|
||||
MEMBER_MOVE,
|
||||
MEMBER_DISCONNECT,
|
||||
BOT_ADD,
|
||||
MemberKick = 20,
|
||||
MemberPrune,
|
||||
MemberBanAdd,
|
||||
MemberBanRemove,
|
||||
MemberUpdate,
|
||||
MemberRoleUpdate,
|
||||
MemberMove,
|
||||
MemberDisconnect,
|
||||
BotAdd,
|
||||
|
||||
ROLE_CREATE = 30,
|
||||
ROLE_UPDATE,
|
||||
ROLE_DELETE,
|
||||
RoleCreate = 30,
|
||||
RoleUpdate,
|
||||
RoleDelete,
|
||||
|
||||
INVITE_CREATE = 40,
|
||||
INVITE_UPDATE,
|
||||
INVITE_DELETE,
|
||||
InviteCreate = 40,
|
||||
InviteUpdate,
|
||||
InviteDelete,
|
||||
|
||||
WEBHOOK_CREATE = 50,
|
||||
WEBHOOK_UPDATE,
|
||||
WEBHOOK_DELETE,
|
||||
WebhookCreate = 50,
|
||||
WebhookUpdate,
|
||||
WebhookDelete,
|
||||
|
||||
EMOJI_CREATE = 60,
|
||||
EMOJI_UPDATE,
|
||||
EMOJI_DELETE,
|
||||
EmojiCreate = 60,
|
||||
EmojiUpdate,
|
||||
EmojiDelete,
|
||||
|
||||
MESSAGE_DELETE = 72,
|
||||
MESSAGE_BULK_DELETE,
|
||||
MESSAGE_PIN,
|
||||
MESSAGE_UNPIN,
|
||||
MessageDelete = 72,
|
||||
MessageBulkDelete,
|
||||
MessagePin,
|
||||
MessageUnpin,
|
||||
|
||||
INTEGRATION_CREATE = 80,
|
||||
INTEGRATION_UPDATE,
|
||||
INTEGRATION_DELETE,
|
||||
IntegrationCreate = 80,
|
||||
IntegrationUpdate,
|
||||
IntegrationDelete,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -121,7 +121,7 @@ export enum ChannelType {
|
||||
/**
|
||||
* A text channel within a guild
|
||||
*/
|
||||
GUILD_TEXT,
|
||||
GuildText,
|
||||
/**
|
||||
* A direct message between users
|
||||
*/
|
||||
@@ -129,46 +129,46 @@ export enum ChannelType {
|
||||
/**
|
||||
* A voice channel within a guild
|
||||
*/
|
||||
GUILD_VOICE,
|
||||
GuildVoice,
|
||||
/**
|
||||
* A direct message between multiple users
|
||||
*/
|
||||
GROUP_DM,
|
||||
GroupDM,
|
||||
/**
|
||||
* An organizational category that contains up to 50 channels
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/115001580171-Channel-Categories-101
|
||||
*/
|
||||
GUILD_CATEGORY,
|
||||
GuildCategory,
|
||||
/**
|
||||
* A channel that users can follow and crosspost into their own guild
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/360032008192
|
||||
*/
|
||||
GUILD_NEWS,
|
||||
GuildNews,
|
||||
/**
|
||||
* A channel in which game developers can sell their game on Discord
|
||||
*
|
||||
* See https://discord.com/developers/docs/game-and-server-management/special-channels
|
||||
*/
|
||||
GUILD_STORE,
|
||||
GuildStore,
|
||||
/**
|
||||
* A voice channel for hosting events with an audience
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/1500005513722
|
||||
*/
|
||||
GUILD_STAGE_VOICE = 13,
|
||||
GuildStageVoice = 13,
|
||||
}
|
||||
|
||||
export enum VideoQualityMode {
|
||||
/**
|
||||
* Discord chooses the quality for optimal performance
|
||||
*/
|
||||
AUTO = 1,
|
||||
Auto = 1,
|
||||
/**
|
||||
* 720p
|
||||
*/
|
||||
FULL,
|
||||
Full,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -348,26 +348,26 @@ export interface APIMessage {
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-types
|
||||
*/
|
||||
export enum MessageType {
|
||||
DEFAULT,
|
||||
RECIPIENT_ADD,
|
||||
RECIPIENT_REMOVE,
|
||||
CALL,
|
||||
CHANNEL_NAME_CHANGE,
|
||||
CHANNEL_ICON_CHANGE,
|
||||
CHANNEL_PINNED_MESSAGE,
|
||||
GUILD_MEMBER_JOIN,
|
||||
USER_PREMIUM_GUILD_SUBSCRIPTION,
|
||||
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1,
|
||||
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2,
|
||||
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3,
|
||||
CHANNEL_FOLLOW_ADD,
|
||||
GUILD_DISCOVERY_DISQUALIFIED = 14,
|
||||
GUILD_DISCOVERY_REQUALIFIED,
|
||||
GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING,
|
||||
GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING,
|
||||
REPLY = 19,
|
||||
APPLICATION_COMMAND,
|
||||
GUILD_INVITE_REMINDER = 22,
|
||||
Default,
|
||||
RecipientAdd,
|
||||
RecipientRemove,
|
||||
Call,
|
||||
ChannelNameChange,
|
||||
ChannelIconChange,
|
||||
ChannelPinnedMessage,
|
||||
GuildMemberJoin,
|
||||
UserPremiumGuildSubscription,
|
||||
UserPremiumGuildSubscriptionTier1,
|
||||
UserPremiumGuildSubscriptionTier2,
|
||||
UserPremiumGuildSubscriptionTier3,
|
||||
ChannelFollowAdd,
|
||||
GuildDiscoveryDisqualified = 14,
|
||||
GuildDiscoveryRequalified,
|
||||
GuildDiscoveryGracePeriodInitialWarning,
|
||||
GuildDiscoveryGracePeriodFinalWarning,
|
||||
Reply = 19,
|
||||
ApplicationCommand,
|
||||
GuildInviteReminder = 22,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -410,10 +410,10 @@ export interface APIMessageReference {
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
|
||||
*/
|
||||
export enum MessageActivityType {
|
||||
JOIN = 1,
|
||||
SPECTATE,
|
||||
LISTEN,
|
||||
JOIN_REQUEST = 5,
|
||||
Join = 1,
|
||||
Spectate,
|
||||
Listen,
|
||||
JoinRequest = 5,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -423,31 +423,31 @@ export enum MessageFlags {
|
||||
/**
|
||||
* This message has been published to subscribed channels (via Channel Following)
|
||||
*/
|
||||
CROSSPOSTED = 1 << 0,
|
||||
Crossposted = 1 << 0,
|
||||
/**
|
||||
* This message originated from a message in another channel (via Channel Following)
|
||||
*/
|
||||
IS_CROSSPOST = 1 << 1,
|
||||
IsCrosspost = 1 << 1,
|
||||
/**
|
||||
* Do not include any embeds when serializing this message
|
||||
*/
|
||||
SUPPRESS_EMBEDS = 1 << 2,
|
||||
SuppressEmbeds = 1 << 2,
|
||||
/**
|
||||
* The source message for this crosspost has been deleted (via Channel Following)
|
||||
*/
|
||||
SOURCE_MESSAGE_DELETED = 1 << 3,
|
||||
SourceMessageDeleted = 1 << 3,
|
||||
/**
|
||||
* This message came from the urgent message system
|
||||
*/
|
||||
URGENT = 1 << 4,
|
||||
Urgent = 1 << 4,
|
||||
/**
|
||||
* This message is only visible to the user who invoked the Interaction
|
||||
*/
|
||||
EPHEMERAL = 1 << 6,
|
||||
Ephemeral = 1 << 6,
|
||||
/**
|
||||
* This message is an Interaction Response and the bot is "thinking"
|
||||
*/
|
||||
LOADING = 1 << 7,
|
||||
Loading = 1 << 7,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -670,7 +670,7 @@ export enum EmbedType {
|
||||
/**
|
||||
* Animated gif image embed rendered as a video embed
|
||||
*/
|
||||
GifV = 'gifv',
|
||||
GIFV = 'gifv',
|
||||
/**
|
||||
* Article embed
|
||||
*/
|
||||
|
||||
@@ -292,12 +292,12 @@ export type GatewayActivitySecrets = Partial<Record<'join' | 'spectate' | 'match
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags
|
||||
*/
|
||||
export enum ActivityFlags {
|
||||
INSTANCE = 1 << 0,
|
||||
JOIN = 1 << 1,
|
||||
SPECTATE = 1 << 2,
|
||||
JOIN_REQUEST = 1 << 3,
|
||||
SYNC = 1 << 4,
|
||||
PLAY = 1 << 5,
|
||||
Instance = 1 << 0,
|
||||
Join = 1 << 1,
|
||||
Spectate = 1 << 2,
|
||||
JoinRequest = 1 << 3,
|
||||
Sync = 1 << 4,
|
||||
Play = 1 << 5,
|
||||
}
|
||||
|
||||
export interface GatewayActivityButton {
|
||||
|
||||
@@ -315,25 +315,25 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
|
||||
*/
|
||||
export enum GuildDefaultMessageNotifications {
|
||||
ALL_MESSAGES,
|
||||
ONLY_MENTIONS,
|
||||
AllMessages,
|
||||
OnlyMentions,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
|
||||
*/
|
||||
export enum GuildExplicitContentFilter {
|
||||
DISABLED,
|
||||
MEMBERS_WITHOUT_ROLES,
|
||||
ALL_MEMBERS,
|
||||
Disabled,
|
||||
MembersWithoutRoles,
|
||||
AllMembers,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
|
||||
*/
|
||||
export enum GuildMFALevel {
|
||||
NONE,
|
||||
ELEVATED,
|
||||
None,
|
||||
Elevated,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -343,33 +343,33 @@ export enum GuildVerificationLevel {
|
||||
/**
|
||||
* Unrestricted
|
||||
*/
|
||||
NONE,
|
||||
None,
|
||||
/**
|
||||
* Must have verified email on account
|
||||
*/
|
||||
LOW,
|
||||
Low,
|
||||
/**
|
||||
* Must be registered on Discord for longer than 5 minutes
|
||||
*/
|
||||
MEDIUM,
|
||||
Medium,
|
||||
/**
|
||||
* Must be a member of the guild for longer than 10 minutes
|
||||
*/
|
||||
HIGH,
|
||||
High,
|
||||
/**
|
||||
* Must have a verified phone number
|
||||
*/
|
||||
VERY_HIGH,
|
||||
VeryHigh,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
|
||||
*/
|
||||
export enum GuildPremiumTier {
|
||||
NONE,
|
||||
TIER_1,
|
||||
TIER_2,
|
||||
TIER_3,
|
||||
None,
|
||||
Tier1,
|
||||
Tier2,
|
||||
Tier3,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -379,15 +379,15 @@ export enum GuildSystemChannelFlags {
|
||||
/**
|
||||
* Suppress member join notifications
|
||||
*/
|
||||
SUPPRESS_JOIN_NOTIFICATIONS = 1 << 0,
|
||||
SuppressJoinNotifications = 1 << 0,
|
||||
/**
|
||||
* Suppress server boost notifications
|
||||
*/
|
||||
SUPPRESS_PREMIUM_SUBSCRIPTIONS = 1 << 1,
|
||||
SuppressPremiumSubscriptions = 1 << 1,
|
||||
/**
|
||||
* Suppress server setup tips
|
||||
*/
|
||||
SUPPRESS_GUILD_REMINDER_NOTIFICATIONS = 1 << 2,
|
||||
SuppressGuildReminderNotifications = 1 << 2,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -397,64 +397,64 @@ export enum GuildFeature {
|
||||
/**
|
||||
* Guild has access to set an animated guild icon
|
||||
*/
|
||||
ANIMATED_ICON = 'ANIMATED_ICON',
|
||||
AnimatedIcon = 'ANIMATED_ICON',
|
||||
/**
|
||||
* Guild has access to set a guild banner image
|
||||
*/
|
||||
BANNER = 'BANNER',
|
||||
Banner = 'BANNER',
|
||||
/**
|
||||
* Guild has access to use commerce features (i.e. create store channels)
|
||||
*/
|
||||
COMMERCE = 'COMMERCE',
|
||||
Commerce = 'COMMERCE',
|
||||
/**
|
||||
* Guild can enable welcome screen, Membership Screening and discovery, and receives community updates
|
||||
*/
|
||||
COMMUNITY = 'COMMUNITY',
|
||||
Community = 'COMMUNITY',
|
||||
/**
|
||||
* Guild is able to be discovered in the directory
|
||||
*/
|
||||
DISCOVERABLE = 'DISCOVERABLE',
|
||||
Discoverable = 'DISCOVERABLE',
|
||||
/**
|
||||
* Guild is able to be featured in the directory
|
||||
*/
|
||||
FEATURABLE = 'FEATURABLE',
|
||||
Featurable = 'FEATURABLE',
|
||||
/**
|
||||
* Guild has access to set an invite splash background
|
||||
*/
|
||||
INVITE_SPLASH = 'INVITE_SPLASH',
|
||||
InviteSplash = 'INVITE_SPLASH',
|
||||
/**
|
||||
* Guild has access to create news channels
|
||||
*/
|
||||
NEWS = 'NEWS',
|
||||
News = 'NEWS',
|
||||
/**
|
||||
* Guild is partnered
|
||||
*/
|
||||
PARTNERED = 'PARTNERED',
|
||||
RELAY_ENABLED = 'RELAY_ENABLED',
|
||||
Partnered = 'PARTNERED',
|
||||
RelayEnabled = 'RELAY_ENABLED',
|
||||
/**
|
||||
* Guild has access to set a vanity URL
|
||||
*/
|
||||
VANITY_URL = 'VANITY_URL',
|
||||
VanityURL = 'VANITY_URL',
|
||||
/**
|
||||
* Guild is verified
|
||||
*/
|
||||
VERIFIED = 'VERIFIED',
|
||||
Verified = 'VERIFIED',
|
||||
/**
|
||||
* Guild has access to set 384kbps bitrate in voice (previously VIP voice servers)
|
||||
*/
|
||||
VIP_REGIONS = 'VIP_REGIONS',
|
||||
VIPRegions = 'VIP_REGIONS',
|
||||
/**
|
||||
* Guild has enabled the welcome screen
|
||||
*/
|
||||
WELCOME_SCREEN_ENABLED = 'WELCOME_SCREEN_ENABLED',
|
||||
WelcomeScreenEnabled = 'WELCOME_SCREEN_ENABLED',
|
||||
/**
|
||||
* Guild has enabled Membership Screening
|
||||
*/
|
||||
MEMBER_VERIFICATION_GATE_ENABLED = 'MEMBER_VERIFICATION_GATE_ENABLED',
|
||||
MemberVerificationGateEnabled = 'MEMBER_VERIFICATION_GATE_ENABLED',
|
||||
/**
|
||||
* Guild can be previewed before joining via Membership Screening or the directory
|
||||
*/
|
||||
PREVIEW_ENABLED = 'PREVIEW_ENABLED',
|
||||
PreviewEnabled = 'PREVIEW_ENABLED',
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -872,5 +872,5 @@ export enum MembershipScreeningFieldType {
|
||||
/**
|
||||
* Server Rules
|
||||
*/
|
||||
TERMS = 'TERMS',
|
||||
Terms = 'TERMS',
|
||||
}
|
||||
|
||||
@@ -36,11 +36,11 @@ export interface APIApplicationCommand {
|
||||
|
||||
interface APIApplicationCommandOptionBase {
|
||||
type:
|
||||
| ApplicationCommandOptionType.BOOLEAN
|
||||
| ApplicationCommandOptionType.USER
|
||||
| ApplicationCommandOptionType.CHANNEL
|
||||
| ApplicationCommandOptionType.ROLE
|
||||
| ApplicationCommandOptionType.MENTIONABLE;
|
||||
| ApplicationCommandOptionType.Boolean
|
||||
| ApplicationCommandOptionType.User
|
||||
| ApplicationCommandOptionType.Channel
|
||||
| ApplicationCommandOptionType.Role
|
||||
| ApplicationCommandOptionType.Mentionable;
|
||||
name: string;
|
||||
description: string;
|
||||
default?: boolean;
|
||||
@@ -61,7 +61,7 @@ export type APIApplicationCommandOption =
|
||||
* If the option is a `SUB_COMMAND` or `SUB_COMMAND_GROUP` type, this nested options will be the parameters
|
||||
*/
|
||||
export interface APIApplicationCommandSubCommandOptions extends Omit<APIApplicationCommandOptionBase, 'type'> {
|
||||
type: ApplicationCommandOptionType.SUB_COMMAND | ApplicationCommandOptionType.SUB_COMMAND_GROUP;
|
||||
type: ApplicationCommandOptionType.SubCommand | ApplicationCommandOptionType.SubCommandGroup;
|
||||
options?: APIApplicationCommandOption[];
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ export interface APIApplicationCommandSubCommandOptions extends Omit<APIApplicat
|
||||
* but they can have a `choices` one
|
||||
*/
|
||||
export interface APIApplicationCommandArgumentOptions extends Omit<APIApplicationCommandOptionBase, 'type'> {
|
||||
type: ApplicationCommandOptionType.STRING | ApplicationCommandOptionType.INTEGER;
|
||||
type: ApplicationCommandOptionType.String | ApplicationCommandOptionType.Integer;
|
||||
choices?: APIApplicationCommandOptionChoice[];
|
||||
}
|
||||
|
||||
@@ -80,15 +80,15 @@ export interface APIApplicationCommandArgumentOptions extends Omit<APIApplicatio
|
||||
* https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoptiontype
|
||||
*/
|
||||
export enum ApplicationCommandOptionType {
|
||||
SUB_COMMAND = 1,
|
||||
SUB_COMMAND_GROUP,
|
||||
STRING,
|
||||
INTEGER,
|
||||
BOOLEAN,
|
||||
USER,
|
||||
CHANNEL,
|
||||
ROLE,
|
||||
MENTIONABLE,
|
||||
SubCommand = 1,
|
||||
SubCommandGroup,
|
||||
String,
|
||||
Integer,
|
||||
Boolean,
|
||||
User,
|
||||
Channel,
|
||||
Role,
|
||||
Mentionable,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -249,8 +249,8 @@ export interface APIApplicationCommandPermission {
|
||||
* https://discord.com/developers/docs/interactions/slash-commands#applicationcommandpermissiontype
|
||||
*/
|
||||
export enum ApplicationCommandPermissionType {
|
||||
ROLE = 1,
|
||||
USER,
|
||||
Role = 1,
|
||||
User,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -292,13 +292,13 @@ export type APIApplicationCommandInteractionDataOption =
|
||||
|
||||
export interface ApplicationCommandInteractionDataOptionSubCommand {
|
||||
name: string;
|
||||
type: ApplicationCommandOptionType.SUB_COMMAND;
|
||||
type: ApplicationCommandOptionType.SubCommand;
|
||||
options: APIApplicationCommandInteractionDataOptionWithValues[];
|
||||
}
|
||||
|
||||
export interface ApplicationCommandInteractionDataOptionSubCommandGroup {
|
||||
name: string;
|
||||
type: ApplicationCommandOptionType.SUB_COMMAND_GROUP;
|
||||
type: ApplicationCommandOptionType.SubCommandGroup;
|
||||
options: ApplicationCommandInteractionDataOptionSubCommand[];
|
||||
}
|
||||
|
||||
@@ -312,37 +312,37 @@ export type APIApplicationCommandInteractionDataOptionWithValues =
|
||||
| ApplicationCommandInteractionDataOptionBoolean;
|
||||
|
||||
export type ApplicationCommandInteractionDataOptionString = InteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.STRING,
|
||||
ApplicationCommandOptionType.String,
|
||||
string
|
||||
>;
|
||||
|
||||
export type ApplicationCommandInteractionDataOptionRole = InteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.ROLE,
|
||||
ApplicationCommandOptionType.Role,
|
||||
Snowflake
|
||||
>;
|
||||
|
||||
export type ApplicationCommandInteractionDataOptionChannel = InteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.CHANNEL,
|
||||
ApplicationCommandOptionType.Channel,
|
||||
Snowflake
|
||||
>;
|
||||
|
||||
export type ApplicationCommandInteractionDataOptionUser = InteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.USER,
|
||||
ApplicationCommandOptionType.User,
|
||||
Snowflake
|
||||
>;
|
||||
|
||||
export type ApplicationCommandInteractionDataOptionMentionable = InteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.MENTIONABLE,
|
||||
ApplicationCommandOptionType.Mentionable,
|
||||
Snowflake
|
||||
>;
|
||||
|
||||
export type ApplicationCommandInteractionDataOptionInteger = InteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.INTEGER,
|
||||
ApplicationCommandOptionType.Integer,
|
||||
number
|
||||
>;
|
||||
|
||||
export type ApplicationCommandInteractionDataOptionBoolean = InteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.BOOLEAN,
|
||||
ApplicationCommandOptionType.Boolean,
|
||||
boolean
|
||||
>;
|
||||
|
||||
|
||||
@@ -69,8 +69,8 @@ export interface APIInvite {
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
*/
|
||||
export enum InviteTargetType {
|
||||
STREAM = 1,
|
||||
EMBEDDED_APPLICATION,
|
||||
Stream = 1,
|
||||
EmbeddedApplication,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,39 +12,39 @@ import type { Permissions, Snowflake } from '../../globals.ts';
|
||||
* replicate them in some way
|
||||
*/
|
||||
export const PermissionFlagsBits = {
|
||||
CREATE_INSTANT_INVITE: 1n << 0n,
|
||||
KICK_MEMBERS: 1n << 1n,
|
||||
BAN_MEMBERS: 1n << 2n,
|
||||
ADMINISTRATOR: 1n << 3n,
|
||||
MANAGE_CHANNELS: 1n << 4n,
|
||||
MANAGE_GUILD: 1n << 5n,
|
||||
ADD_REACTIONS: 1n << 6n,
|
||||
VIEW_AUDIT_LOG: 1n << 7n,
|
||||
PRIORITY_SPEAKER: 1n << 8n,
|
||||
STREAM: 1n << 9n,
|
||||
VIEW_CHANNEL: 1n << 10n,
|
||||
SEND_MESSAGES: 1n << 11n,
|
||||
SEND_TTS_MESSAGES: 1n << 12n,
|
||||
MANAGE_MESSAGES: 1n << 13n,
|
||||
EMBED_LINKS: 1n << 14n,
|
||||
ATTACH_FILES: 1n << 15n,
|
||||
READ_MESSAGE_HISTORY: 1n << 16n,
|
||||
MENTION_EVERYONE: 1n << 17n,
|
||||
USE_EXTERNAL_EMOJIS: 1n << 18n,
|
||||
VIEW_GUILD_INSIGHTS: 1n << 19n,
|
||||
CONNECT: 1n << 20n,
|
||||
SPEAK: 1n << 21n,
|
||||
MUTE_MEMBERS: 1n << 22n,
|
||||
DEAFEN_MEMBERS: 1n << 23n,
|
||||
MOVE_MEMBERS: 1n << 24n,
|
||||
USE_VAD: 1n << 25n,
|
||||
CHANGE_NICKNAME: 1n << 26n,
|
||||
MANAGE_NICKNAMES: 1n << 27n,
|
||||
MANAGE_ROLES: 1n << 28n,
|
||||
MANAGE_WEBHOOKS: 1n << 29n,
|
||||
MANAGE_EMOJIS: 1n << 30n,
|
||||
USE_SLASH_COMMANDS: 1n << 31n,
|
||||
REQUEST_TO_SPEAK: 1n << 32n,
|
||||
CreateInstantInvite: 1n << 0n,
|
||||
KickMembers: 1n << 1n,
|
||||
BanMembers: 1n << 2n,
|
||||
Administrator: 1n << 3n,
|
||||
ManageChannels: 1n << 4n,
|
||||
ManageGuild: 1n << 5n,
|
||||
AddReactions: 1n << 6n,
|
||||
ViewAuditLog: 1n << 7n,
|
||||
PrioritySpeaker: 1n << 8n,
|
||||
Stream: 1n << 9n,
|
||||
ViewChannel: 1n << 10n,
|
||||
SendMessages: 1n << 11n,
|
||||
SendTTSMessages: 1n << 12n,
|
||||
ManageMessages: 1n << 13n,
|
||||
EmbedLinks: 1n << 14n,
|
||||
AttachFiles: 1n << 15n,
|
||||
ReadMessageHistory: 1n << 16n,
|
||||
MentionEveryone: 1n << 17n,
|
||||
UseExternalEmojis: 1n << 18n,
|
||||
ViewGuildInsights: 1n << 19n,
|
||||
Connect: 1n << 20n,
|
||||
Speak: 1n << 21n,
|
||||
MuteMembers: 1n << 22n,
|
||||
DeafenMembers: 1n << 23n,
|
||||
MoveMembers: 1n << 24n,
|
||||
UseVAD: 1n << 25n,
|
||||
ChangeNickname: 1n << 26n,
|
||||
ManageNicknames: 1n << 27n,
|
||||
ManageRoles: 1n << 28n,
|
||||
ManageWebhooks: 1n << 29n,
|
||||
ManageEmojis: 1n << 30n,
|
||||
UseSlashCommands: 1n << 31n,
|
||||
RequestToSpeak: 1n << 32n,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
|
||||
@@ -57,6 +57,6 @@ export interface APITeamMember {
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
|
||||
*/
|
||||
export enum TeamMemberMembershipState {
|
||||
INVITED = 1,
|
||||
ACCEPTED,
|
||||
Invited = 1,
|
||||
Accepted,
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: text, news
|
||||
*/
|
||||
type?: ChannelType.GUILD_NEWS | ChannelType.GUILD_TEXT;
|
||||
type?: ChannelType.GuildNews | ChannelType.GuildText;
|
||||
/**
|
||||
* The position of the channel in the left-hand listing
|
||||
*
|
||||
|
||||
@@ -3,7 +3,7 @@ export const VoiceGatewayVersion = '4';
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes
|
||||
*/
|
||||
export enum VoiceOPCodes {
|
||||
export enum VoiceOpcodes {
|
||||
/**
|
||||
* Begin a voice websocket connection
|
||||
*/
|
||||
@@ -61,7 +61,7 @@ export enum VoiceCloseCodes {
|
||||
/**
|
||||
* You sent an invalid opcode
|
||||
*/
|
||||
UnknownOpCode = 4001,
|
||||
UnknownOpcode = 4001,
|
||||
/**
|
||||
* You sent a invalid payload in your identifying to the Gateway
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@ export const GatewayVersion = '8';
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
|
||||
*/
|
||||
export const enum GatewayOPCodes {
|
||||
export const enum GatewayOpcodes {
|
||||
/**
|
||||
* An event was dispatched
|
||||
*/
|
||||
@@ -91,7 +91,7 @@ export const enum GatewayCloseCodes {
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#payloads-and-opcodes
|
||||
*/
|
||||
UnknownOpCode,
|
||||
UnknownOpcode,
|
||||
/**
|
||||
* You sent an invalid payload to us. Don't do that!
|
||||
*
|
||||
@@ -165,21 +165,21 @@ export const enum GatewayCloseCodes {
|
||||
* https://discord.com/developers/docs/topics/gateway#list-of-intents
|
||||
*/
|
||||
export const enum GatewayIntentBits {
|
||||
GUILDS = 1 << 0,
|
||||
GUILD_MEMBERS = 1 << 1,
|
||||
GUILD_BANS = 1 << 2,
|
||||
GUILD_EMOJIS = 1 << 3,
|
||||
GUILD_INTEGRATIONS = 1 << 4,
|
||||
GUILD_WEBHOOKS = 1 << 5,
|
||||
GUILD_INVITES = 1 << 6,
|
||||
GUILD_VOICE_STATES = 1 << 7,
|
||||
GUILD_PRESENCES = 1 << 8,
|
||||
GUILD_MESSAGES = 1 << 9,
|
||||
GUILD_MESSAGE_REACTIONS = 1 << 10,
|
||||
GUILD_MESSAGE_TYPING = 1 << 11,
|
||||
DIRECT_MESSAGES = 1 << 12,
|
||||
DIRECT_MESSAGE_REACTIONS = 1 << 13,
|
||||
DIRECT_MESSAGE_TYPING = 1 << 14,
|
||||
Guilds = 1 << 0,
|
||||
GuildMembers = 1 << 1,
|
||||
GuildBans = 1 << 2,
|
||||
GuildEmojis = 1 << 3,
|
||||
GuildIntegrations = 1 << 4,
|
||||
GuildWebhooks = 1 << 5,
|
||||
GuildInvites = 1 << 6,
|
||||
GuildVoiceStates = 1 << 7,
|
||||
GuildPresences = 1 << 8,
|
||||
GuildMessages = 1 << 9,
|
||||
GuildMessageReactions = 1 << 10,
|
||||
GuildMessageTyping = 1 << 11,
|
||||
DirectMessages = 1 << 12,
|
||||
DirectMessageReactions = 1 << 13,
|
||||
DirectMessageTyping = 1 << 14,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -341,7 +341,7 @@ export type GatewayApplicationCommandDeleteDispatchData = GatewayApplicationComm
|
||||
* https://discord.com/developers/docs/topics/gateway#hello
|
||||
*/
|
||||
export interface GatewayHello extends NonDispatchPayload {
|
||||
op: GatewayOPCodes.Hello;
|
||||
op: GatewayOpcodes.Hello;
|
||||
d: GatewayHelloData;
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ export interface GatewayHelloData {
|
||||
* https://discord.com/developers/docs/topics/gateway#heartbeating
|
||||
*/
|
||||
export interface GatewayHeartbeatRequest extends NonDispatchPayload {
|
||||
op: GatewayOPCodes.Heartbeat;
|
||||
op: GatewayOpcodes.Heartbeat;
|
||||
d: never;
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ export interface GatewayHeartbeatRequest extends NonDispatchPayload {
|
||||
* https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack
|
||||
*/
|
||||
export interface GatewayHeartbeatAck extends NonDispatchPayload {
|
||||
op: GatewayOPCodes.HeartbeatAck;
|
||||
op: GatewayOpcodes.HeartbeatAck;
|
||||
d: never;
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ export interface GatewayHeartbeatAck extends NonDispatchPayload {
|
||||
* https://discord.com/developers/docs/topics/gateway#invalid-session
|
||||
*/
|
||||
export interface GatewayInvalidSession extends NonDispatchPayload {
|
||||
op: GatewayOPCodes.InvalidSession;
|
||||
op: GatewayOpcodes.InvalidSession;
|
||||
d: GatewayInvalidSessionData;
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ export type GatewayInvalidSessionData = boolean;
|
||||
* https://discord.com/developers/docs/topics/gateway#reconnect
|
||||
*/
|
||||
export interface GatewayReconnect extends NonDispatchPayload {
|
||||
op: GatewayOPCodes.Reconnect;
|
||||
op: GatewayOpcodes.Reconnect;
|
||||
d: never;
|
||||
}
|
||||
|
||||
@@ -1250,7 +1250,7 @@ export interface GatewayWebhooksUpdateDispatchData {
|
||||
* https://discord.com/developers/docs/topics/gateway#heartbeating
|
||||
*/
|
||||
export interface GatewayHeartbeat {
|
||||
op: GatewayOPCodes.Heartbeat;
|
||||
op: GatewayOpcodes.Heartbeat;
|
||||
d: GatewayHeartbeatData;
|
||||
}
|
||||
|
||||
@@ -1263,7 +1263,7 @@ export type GatewayHeartbeatData = number | null;
|
||||
* https://discord.com/developers/docs/topics/gateway#identify
|
||||
*/
|
||||
export interface GatewayIdentify {
|
||||
op: GatewayOPCodes.Identify;
|
||||
op: GatewayOpcodes.Identify;
|
||||
d: GatewayIdentifyData;
|
||||
}
|
||||
|
||||
@@ -1336,7 +1336,7 @@ export interface GatewayIdentifyProperties {
|
||||
* https://discord.com/developers/docs/topics/gateway#resume
|
||||
*/
|
||||
export interface GatewayResume {
|
||||
op: GatewayOPCodes.Resume;
|
||||
op: GatewayOpcodes.Resume;
|
||||
d: GatewayResumeData;
|
||||
}
|
||||
|
||||
@@ -1362,7 +1362,7 @@ export interface GatewayResumeData {
|
||||
* https://discord.com/developers/docs/topics/gateway#request-guild-members
|
||||
*/
|
||||
export interface GatewayRequestGuildMembers {
|
||||
op: GatewayOPCodes.RequestGuildMembers;
|
||||
op: GatewayOpcodes.RequestGuildMembers;
|
||||
d: GatewayRequestGuildMembersData;
|
||||
}
|
||||
|
||||
@@ -1405,7 +1405,7 @@ export interface GatewayRequestGuildMembersData {
|
||||
* https://discord.com/developers/docs/topics/gateway#update-voice-state
|
||||
*/
|
||||
export interface GatewayVoiceStateUpdate {
|
||||
op: GatewayOPCodes.VoiceStateUpdate;
|
||||
op: GatewayOpcodes.VoiceStateUpdate;
|
||||
d: GatewayVoiceStateUpdateData;
|
||||
}
|
||||
|
||||
@@ -1435,7 +1435,7 @@ export interface GatewayVoiceStateUpdateData {
|
||||
* https://discord.com/developers/docs/topics/gateway#update-status
|
||||
*/
|
||||
export interface GatewayUpdatePresence {
|
||||
op: GatewayOPCodes.PresenceUpdate;
|
||||
op: GatewayOpcodes.PresenceUpdate;
|
||||
d: GatewayPresenceUpdateData;
|
||||
}
|
||||
|
||||
@@ -1477,7 +1477,7 @@ interface BasePayload {
|
||||
/**
|
||||
* Opcode for the payload
|
||||
*/
|
||||
op: GatewayOPCodes;
|
||||
op: GatewayOpcodes;
|
||||
/**
|
||||
* Event data
|
||||
*/
|
||||
@@ -1495,7 +1495,7 @@ interface BasePayload {
|
||||
type NonDispatchPayload = Omit<BasePayload, 't'>;
|
||||
|
||||
interface DataPayload<Event extends GatewayDispatchEvents, D = unknown> extends BasePayload {
|
||||
op: GatewayOPCodes.Dispatch;
|
||||
op: GatewayOpcodes.Dispatch;
|
||||
t: Event;
|
||||
d: D;
|
||||
}
|
||||
|
||||
@@ -92,49 +92,49 @@ export interface APIAuditLogEntry {
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
|
||||
*/
|
||||
export const enum AuditLogEvent {
|
||||
GUILD_UPDATE = 1,
|
||||
GuildUpdate = 1,
|
||||
|
||||
CHANNEL_CREATE = 10,
|
||||
CHANNEL_UPDATE,
|
||||
CHANNEL_DELETE,
|
||||
CHANNEL_OVERWRITE_CREATE,
|
||||
CHANNEL_OVERWRITE_UPDATE,
|
||||
CHANNEL_OVERWRITE_DELETE,
|
||||
ChannelCreate = 10,
|
||||
ChannelUpdate,
|
||||
ChannelDelete,
|
||||
ChannelOverwriteCreate,
|
||||
ChannelOverwriteUpdate,
|
||||
ChannelOverwriteDelete,
|
||||
|
||||
MEMBER_KICK = 20,
|
||||
MEMBER_PRUNE,
|
||||
MEMBER_BAN_ADD,
|
||||
MEMBER_BAN_REMOVE,
|
||||
MEMBER_UPDATE,
|
||||
MEMBER_ROLE_UPDATE,
|
||||
MEMBER_MOVE,
|
||||
MEMBER_DISCONNECT,
|
||||
BOT_ADD,
|
||||
MemberKick = 20,
|
||||
MemberPrune,
|
||||
MemberBanAdd,
|
||||
MemberBanRemove,
|
||||
MemberUpdate,
|
||||
MemberRoleUpdate,
|
||||
MemberMove,
|
||||
MemberDisconnect,
|
||||
BotAdd,
|
||||
|
||||
ROLE_CREATE = 30,
|
||||
ROLE_UPDATE,
|
||||
ROLE_DELETE,
|
||||
RoleCreate = 30,
|
||||
RoleUpdate,
|
||||
RoleDelete,
|
||||
|
||||
INVITE_CREATE = 40,
|
||||
INVITE_UPDATE,
|
||||
INVITE_DELETE,
|
||||
InviteCreate = 40,
|
||||
InviteUpdate,
|
||||
InviteDelete,
|
||||
|
||||
WEBHOOK_CREATE = 50,
|
||||
WEBHOOK_UPDATE,
|
||||
WEBHOOK_DELETE,
|
||||
WebhookCreate = 50,
|
||||
WebhookUpdate,
|
||||
WebhookDelete,
|
||||
|
||||
EMOJI_CREATE = 60,
|
||||
EMOJI_UPDATE,
|
||||
EMOJI_DELETE,
|
||||
EmojiCreate = 60,
|
||||
EmojiUpdate,
|
||||
EmojiDelete,
|
||||
|
||||
MESSAGE_DELETE = 72,
|
||||
MESSAGE_BULK_DELETE,
|
||||
MESSAGE_PIN,
|
||||
MESSAGE_UNPIN,
|
||||
MessageDelete = 72,
|
||||
MessageBulkDelete,
|
||||
MessagePin,
|
||||
MessageUnpin,
|
||||
|
||||
INTEGRATION_CREATE = 80,
|
||||
INTEGRATION_UPDATE,
|
||||
INTEGRATION_DELETE,
|
||||
IntegrationCreate = 80,
|
||||
IntegrationUpdate,
|
||||
IntegrationDelete,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -121,7 +121,7 @@ export const enum ChannelType {
|
||||
/**
|
||||
* A text channel within a guild
|
||||
*/
|
||||
GUILD_TEXT,
|
||||
GuildText,
|
||||
/**
|
||||
* A direct message between users
|
||||
*/
|
||||
@@ -129,46 +129,46 @@ export const enum ChannelType {
|
||||
/**
|
||||
* A voice channel within a guild
|
||||
*/
|
||||
GUILD_VOICE,
|
||||
GuildVoice,
|
||||
/**
|
||||
* A direct message between multiple users
|
||||
*/
|
||||
GROUP_DM,
|
||||
GroupDM,
|
||||
/**
|
||||
* An organizational category that contains up to 50 channels
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/115001580171-Channel-Categories-101
|
||||
*/
|
||||
GUILD_CATEGORY,
|
||||
GuildCategory,
|
||||
/**
|
||||
* A channel that users can follow and crosspost into their own guild
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/360032008192
|
||||
*/
|
||||
GUILD_NEWS,
|
||||
GuildNews,
|
||||
/**
|
||||
* A channel in which game developers can sell their game on Discord
|
||||
*
|
||||
* See https://discord.com/developers/docs/game-and-server-management/special-channels
|
||||
*/
|
||||
GUILD_STORE,
|
||||
GuildStore,
|
||||
/**
|
||||
* A voice channel for hosting events with an audience
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/1500005513722
|
||||
*/
|
||||
GUILD_STAGE_VOICE = 13,
|
||||
GuildStageVoice = 13,
|
||||
}
|
||||
|
||||
export const enum VideoQualityMode {
|
||||
/**
|
||||
* Discord chooses the quality for optimal performance
|
||||
*/
|
||||
AUTO = 1,
|
||||
Auto = 1,
|
||||
/**
|
||||
* 720p
|
||||
*/
|
||||
FULL,
|
||||
Full,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -348,26 +348,26 @@ export interface APIMessage {
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-types
|
||||
*/
|
||||
export const enum MessageType {
|
||||
DEFAULT,
|
||||
RECIPIENT_ADD,
|
||||
RECIPIENT_REMOVE,
|
||||
CALL,
|
||||
CHANNEL_NAME_CHANGE,
|
||||
CHANNEL_ICON_CHANGE,
|
||||
CHANNEL_PINNED_MESSAGE,
|
||||
GUILD_MEMBER_JOIN,
|
||||
USER_PREMIUM_GUILD_SUBSCRIPTION,
|
||||
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1,
|
||||
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2,
|
||||
USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3,
|
||||
CHANNEL_FOLLOW_ADD,
|
||||
GUILD_DISCOVERY_DISQUALIFIED = 14,
|
||||
GUILD_DISCOVERY_REQUALIFIED,
|
||||
GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING,
|
||||
GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING,
|
||||
REPLY = 19,
|
||||
APPLICATION_COMMAND,
|
||||
GUILD_INVITE_REMINDER = 22,
|
||||
Default,
|
||||
RecipientAdd,
|
||||
RecipientRemove,
|
||||
Call,
|
||||
ChannelNameChange,
|
||||
ChannelIconChange,
|
||||
ChannelPinnedMessage,
|
||||
GuildMemberJoin,
|
||||
UserPremiumGuildSubscription,
|
||||
UserPremiumGuildSubscriptionTier1,
|
||||
UserPremiumGuildSubscriptionTier2,
|
||||
UserPremiumGuildSubscriptionTier3,
|
||||
ChannelFollowAdd,
|
||||
GuildDiscoveryDisqualified = 14,
|
||||
GuildDiscoveryRequalified,
|
||||
GuildDiscoveryGracePeriodInitialWarning,
|
||||
GuildDiscoveryGracePeriodFinalWarning,
|
||||
Reply = 19,
|
||||
ApplicationCommand,
|
||||
GuildInviteReminder = 22,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -410,10 +410,10 @@ export interface APIMessageReference {
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
|
||||
*/
|
||||
export const enum MessageActivityType {
|
||||
JOIN = 1,
|
||||
SPECTATE,
|
||||
LISTEN,
|
||||
JOIN_REQUEST = 5,
|
||||
Join = 1,
|
||||
Spectate,
|
||||
Listen,
|
||||
JoinRequest = 5,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -423,31 +423,31 @@ export const enum MessageFlags {
|
||||
/**
|
||||
* This message has been published to subscribed channels (via Channel Following)
|
||||
*/
|
||||
CROSSPOSTED = 1 << 0,
|
||||
Crossposted = 1 << 0,
|
||||
/**
|
||||
* This message originated from a message in another channel (via Channel Following)
|
||||
*/
|
||||
IS_CROSSPOST = 1 << 1,
|
||||
IsCrosspost = 1 << 1,
|
||||
/**
|
||||
* Do not include any embeds when serializing this message
|
||||
*/
|
||||
SUPPRESS_EMBEDS = 1 << 2,
|
||||
SuppressEmbeds = 1 << 2,
|
||||
/**
|
||||
* The source message for this crosspost has been deleted (via Channel Following)
|
||||
*/
|
||||
SOURCE_MESSAGE_DELETED = 1 << 3,
|
||||
SourceMessageDeleted = 1 << 3,
|
||||
/**
|
||||
* This message came from the urgent message system
|
||||
*/
|
||||
URGENT = 1 << 4,
|
||||
Urgent = 1 << 4,
|
||||
/**
|
||||
* This message is only visible to the user who invoked the Interaction
|
||||
*/
|
||||
EPHEMERAL = 1 << 6,
|
||||
Ephemeral = 1 << 6,
|
||||
/**
|
||||
* This message is an Interaction Response and the bot is "thinking"
|
||||
*/
|
||||
LOADING = 1 << 7,
|
||||
Loading = 1 << 7,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -670,7 +670,7 @@ export const enum EmbedType {
|
||||
/**
|
||||
* Animated gif image embed rendered as a video embed
|
||||
*/
|
||||
GifV = 'gifv',
|
||||
GIFV = 'gifv',
|
||||
/**
|
||||
* Article embed
|
||||
*/
|
||||
|
||||
@@ -292,12 +292,12 @@ export type GatewayActivitySecrets = Partial<Record<'join' | 'spectate' | 'match
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags
|
||||
*/
|
||||
export const enum ActivityFlags {
|
||||
INSTANCE = 1 << 0,
|
||||
JOIN = 1 << 1,
|
||||
SPECTATE = 1 << 2,
|
||||
JOIN_REQUEST = 1 << 3,
|
||||
SYNC = 1 << 4,
|
||||
PLAY = 1 << 5,
|
||||
Instance = 1 << 0,
|
||||
Join = 1 << 1,
|
||||
Spectate = 1 << 2,
|
||||
JoinRequest = 1 << 3,
|
||||
Sync = 1 << 4,
|
||||
Play = 1 << 5,
|
||||
}
|
||||
|
||||
export interface GatewayActivityButton {
|
||||
|
||||
@@ -315,25 +315,25 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
|
||||
*/
|
||||
export const enum GuildDefaultMessageNotifications {
|
||||
ALL_MESSAGES,
|
||||
ONLY_MENTIONS,
|
||||
AllMessages,
|
||||
OnlyMentions,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
|
||||
*/
|
||||
export const enum GuildExplicitContentFilter {
|
||||
DISABLED,
|
||||
MEMBERS_WITHOUT_ROLES,
|
||||
ALL_MEMBERS,
|
||||
Disabled,
|
||||
MembersWithoutRoles,
|
||||
AllMembers,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
|
||||
*/
|
||||
export const enum GuildMFALevel {
|
||||
NONE,
|
||||
ELEVATED,
|
||||
None,
|
||||
Elevated,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -343,33 +343,33 @@ export const enum GuildVerificationLevel {
|
||||
/**
|
||||
* Unrestricted
|
||||
*/
|
||||
NONE,
|
||||
None,
|
||||
/**
|
||||
* Must have verified email on account
|
||||
*/
|
||||
LOW,
|
||||
Low,
|
||||
/**
|
||||
* Must be registered on Discord for longer than 5 minutes
|
||||
*/
|
||||
MEDIUM,
|
||||
Medium,
|
||||
/**
|
||||
* Must be a member of the guild for longer than 10 minutes
|
||||
*/
|
||||
HIGH,
|
||||
High,
|
||||
/**
|
||||
* Must have a verified phone number
|
||||
*/
|
||||
VERY_HIGH,
|
||||
VeryHigh,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
|
||||
*/
|
||||
export const enum GuildPremiumTier {
|
||||
NONE,
|
||||
TIER_1,
|
||||
TIER_2,
|
||||
TIER_3,
|
||||
None,
|
||||
Tier1,
|
||||
Tier2,
|
||||
Tier3,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -379,15 +379,15 @@ export const enum GuildSystemChannelFlags {
|
||||
/**
|
||||
* Suppress member join notifications
|
||||
*/
|
||||
SUPPRESS_JOIN_NOTIFICATIONS = 1 << 0,
|
||||
SuppressJoinNotifications = 1 << 0,
|
||||
/**
|
||||
* Suppress server boost notifications
|
||||
*/
|
||||
SUPPRESS_PREMIUM_SUBSCRIPTIONS = 1 << 1,
|
||||
SuppressPremiumSubscriptions = 1 << 1,
|
||||
/**
|
||||
* Suppress server setup tips
|
||||
*/
|
||||
SUPPRESS_GUILD_REMINDER_NOTIFICATIONS = 1 << 2,
|
||||
SuppressGuildReminderNotifications = 1 << 2,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -397,64 +397,64 @@ export const enum GuildFeature {
|
||||
/**
|
||||
* Guild has access to set an animated guild icon
|
||||
*/
|
||||
ANIMATED_ICON = 'ANIMATED_ICON',
|
||||
AnimatedIcon = 'ANIMATED_ICON',
|
||||
/**
|
||||
* Guild has access to set a guild banner image
|
||||
*/
|
||||
BANNER = 'BANNER',
|
||||
Banner = 'BANNER',
|
||||
/**
|
||||
* Guild has access to use commerce features (i.e. create store channels)
|
||||
*/
|
||||
COMMERCE = 'COMMERCE',
|
||||
Commerce = 'COMMERCE',
|
||||
/**
|
||||
* Guild can enable welcome screen, Membership Screening and discovery, and receives community updates
|
||||
*/
|
||||
COMMUNITY = 'COMMUNITY',
|
||||
Community = 'COMMUNITY',
|
||||
/**
|
||||
* Guild is able to be discovered in the directory
|
||||
*/
|
||||
DISCOVERABLE = 'DISCOVERABLE',
|
||||
Discoverable = 'DISCOVERABLE',
|
||||
/**
|
||||
* Guild is able to be featured in the directory
|
||||
*/
|
||||
FEATURABLE = 'FEATURABLE',
|
||||
Featurable = 'FEATURABLE',
|
||||
/**
|
||||
* Guild has access to set an invite splash background
|
||||
*/
|
||||
INVITE_SPLASH = 'INVITE_SPLASH',
|
||||
InviteSplash = 'INVITE_SPLASH',
|
||||
/**
|
||||
* Guild has access to create news channels
|
||||
*/
|
||||
NEWS = 'NEWS',
|
||||
News = 'NEWS',
|
||||
/**
|
||||
* Guild is partnered
|
||||
*/
|
||||
PARTNERED = 'PARTNERED',
|
||||
RELAY_ENABLED = 'RELAY_ENABLED',
|
||||
Partnered = 'PARTNERED',
|
||||
RelayEnabled = 'RELAY_ENABLED',
|
||||
/**
|
||||
* Guild has access to set a vanity URL
|
||||
*/
|
||||
VANITY_URL = 'VANITY_URL',
|
||||
VanityURL = 'VANITY_URL',
|
||||
/**
|
||||
* Guild is verified
|
||||
*/
|
||||
VERIFIED = 'VERIFIED',
|
||||
Verified = 'VERIFIED',
|
||||
/**
|
||||
* Guild has access to set 384kbps bitrate in voice (previously VIP voice servers)
|
||||
*/
|
||||
VIP_REGIONS = 'VIP_REGIONS',
|
||||
VIPRegions = 'VIP_REGIONS',
|
||||
/**
|
||||
* Guild has enabled the welcome screen
|
||||
*/
|
||||
WELCOME_SCREEN_ENABLED = 'WELCOME_SCREEN_ENABLED',
|
||||
WelcomeScreenEnabled = 'WELCOME_SCREEN_ENABLED',
|
||||
/**
|
||||
* Guild has enabled Membership Screening
|
||||
*/
|
||||
MEMBER_VERIFICATION_GATE_ENABLED = 'MEMBER_VERIFICATION_GATE_ENABLED',
|
||||
MemberVerificationGateEnabled = 'MEMBER_VERIFICATION_GATE_ENABLED',
|
||||
/**
|
||||
* Guild can be previewed before joining via Membership Screening or the directory
|
||||
*/
|
||||
PREVIEW_ENABLED = 'PREVIEW_ENABLED',
|
||||
PreviewEnabled = 'PREVIEW_ENABLED',
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -872,5 +872,5 @@ export const enum MembershipScreeningFieldType {
|
||||
/**
|
||||
* Server Rules
|
||||
*/
|
||||
TERMS = 'TERMS',
|
||||
Terms = 'TERMS',
|
||||
}
|
||||
|
||||
@@ -36,11 +36,11 @@ export interface APIApplicationCommand {
|
||||
|
||||
interface APIApplicationCommandOptionBase {
|
||||
type:
|
||||
| ApplicationCommandOptionType.BOOLEAN
|
||||
| ApplicationCommandOptionType.USER
|
||||
| ApplicationCommandOptionType.CHANNEL
|
||||
| ApplicationCommandOptionType.ROLE
|
||||
| ApplicationCommandOptionType.MENTIONABLE;
|
||||
| ApplicationCommandOptionType.Boolean
|
||||
| ApplicationCommandOptionType.User
|
||||
| ApplicationCommandOptionType.Channel
|
||||
| ApplicationCommandOptionType.Role
|
||||
| ApplicationCommandOptionType.Mentionable;
|
||||
name: string;
|
||||
description: string;
|
||||
default?: boolean;
|
||||
@@ -61,7 +61,7 @@ export type APIApplicationCommandOption =
|
||||
* If the option is a `SUB_COMMAND` or `SUB_COMMAND_GROUP` type, this nested options will be the parameters
|
||||
*/
|
||||
export interface APIApplicationCommandSubCommandOptions extends Omit<APIApplicationCommandOptionBase, 'type'> {
|
||||
type: ApplicationCommandOptionType.SUB_COMMAND | ApplicationCommandOptionType.SUB_COMMAND_GROUP;
|
||||
type: ApplicationCommandOptionType.SubCommand | ApplicationCommandOptionType.SubCommandGroup;
|
||||
options?: APIApplicationCommandOption[];
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ export interface APIApplicationCommandSubCommandOptions extends Omit<APIApplicat
|
||||
* but they can have a `choices` one
|
||||
*/
|
||||
export interface APIApplicationCommandArgumentOptions extends Omit<APIApplicationCommandOptionBase, 'type'> {
|
||||
type: ApplicationCommandOptionType.STRING | ApplicationCommandOptionType.INTEGER;
|
||||
type: ApplicationCommandOptionType.String | ApplicationCommandOptionType.Integer;
|
||||
choices?: APIApplicationCommandOptionChoice[];
|
||||
}
|
||||
|
||||
@@ -80,15 +80,15 @@ export interface APIApplicationCommandArgumentOptions extends Omit<APIApplicatio
|
||||
* https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoptiontype
|
||||
*/
|
||||
export const enum ApplicationCommandOptionType {
|
||||
SUB_COMMAND = 1,
|
||||
SUB_COMMAND_GROUP,
|
||||
STRING,
|
||||
INTEGER,
|
||||
BOOLEAN,
|
||||
USER,
|
||||
CHANNEL,
|
||||
ROLE,
|
||||
MENTIONABLE,
|
||||
SubCommand = 1,
|
||||
SubCommandGroup,
|
||||
String,
|
||||
Integer,
|
||||
Boolean,
|
||||
User,
|
||||
Channel,
|
||||
Role,
|
||||
Mentionable,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -249,8 +249,8 @@ export interface APIApplicationCommandPermission {
|
||||
* https://discord.com/developers/docs/interactions/slash-commands#applicationcommandpermissiontype
|
||||
*/
|
||||
export const enum ApplicationCommandPermissionType {
|
||||
ROLE = 1,
|
||||
USER,
|
||||
Role = 1,
|
||||
User,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -292,13 +292,13 @@ export type APIApplicationCommandInteractionDataOption =
|
||||
|
||||
export interface ApplicationCommandInteractionDataOptionSubCommand {
|
||||
name: string;
|
||||
type: ApplicationCommandOptionType.SUB_COMMAND;
|
||||
type: ApplicationCommandOptionType.SubCommand;
|
||||
options: APIApplicationCommandInteractionDataOptionWithValues[];
|
||||
}
|
||||
|
||||
export interface ApplicationCommandInteractionDataOptionSubCommandGroup {
|
||||
name: string;
|
||||
type: ApplicationCommandOptionType.SUB_COMMAND_GROUP;
|
||||
type: ApplicationCommandOptionType.SubCommandGroup;
|
||||
options: ApplicationCommandInteractionDataOptionSubCommand[];
|
||||
}
|
||||
|
||||
@@ -312,37 +312,37 @@ export type APIApplicationCommandInteractionDataOptionWithValues =
|
||||
| ApplicationCommandInteractionDataOptionBoolean;
|
||||
|
||||
export type ApplicationCommandInteractionDataOptionString = InteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.STRING,
|
||||
ApplicationCommandOptionType.String,
|
||||
string
|
||||
>;
|
||||
|
||||
export type ApplicationCommandInteractionDataOptionRole = InteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.ROLE,
|
||||
ApplicationCommandOptionType.Role,
|
||||
Snowflake
|
||||
>;
|
||||
|
||||
export type ApplicationCommandInteractionDataOptionChannel = InteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.CHANNEL,
|
||||
ApplicationCommandOptionType.Channel,
|
||||
Snowflake
|
||||
>;
|
||||
|
||||
export type ApplicationCommandInteractionDataOptionUser = InteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.USER,
|
||||
ApplicationCommandOptionType.User,
|
||||
Snowflake
|
||||
>;
|
||||
|
||||
export type ApplicationCommandInteractionDataOptionMentionable = InteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.MENTIONABLE,
|
||||
ApplicationCommandOptionType.Mentionable,
|
||||
Snowflake
|
||||
>;
|
||||
|
||||
export type ApplicationCommandInteractionDataOptionInteger = InteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.INTEGER,
|
||||
ApplicationCommandOptionType.Integer,
|
||||
number
|
||||
>;
|
||||
|
||||
export type ApplicationCommandInteractionDataOptionBoolean = InteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.BOOLEAN,
|
||||
ApplicationCommandOptionType.Boolean,
|
||||
boolean
|
||||
>;
|
||||
|
||||
|
||||
@@ -69,8 +69,8 @@ export interface APIInvite {
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
*/
|
||||
export const enum InviteTargetType {
|
||||
STREAM = 1,
|
||||
EMBEDDED_APPLICATION,
|
||||
Stream = 1,
|
||||
EmbeddedApplication,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,39 +12,39 @@ import type { Permissions, Snowflake } from '../../globals';
|
||||
* replicate them in some way
|
||||
*/
|
||||
export const PermissionFlagsBits = {
|
||||
CREATE_INSTANT_INVITE: 1n << 0n,
|
||||
KICK_MEMBERS: 1n << 1n,
|
||||
BAN_MEMBERS: 1n << 2n,
|
||||
ADMINISTRATOR: 1n << 3n,
|
||||
MANAGE_CHANNELS: 1n << 4n,
|
||||
MANAGE_GUILD: 1n << 5n,
|
||||
ADD_REACTIONS: 1n << 6n,
|
||||
VIEW_AUDIT_LOG: 1n << 7n,
|
||||
PRIORITY_SPEAKER: 1n << 8n,
|
||||
STREAM: 1n << 9n,
|
||||
VIEW_CHANNEL: 1n << 10n,
|
||||
SEND_MESSAGES: 1n << 11n,
|
||||
SEND_TTS_MESSAGES: 1n << 12n,
|
||||
MANAGE_MESSAGES: 1n << 13n,
|
||||
EMBED_LINKS: 1n << 14n,
|
||||
ATTACH_FILES: 1n << 15n,
|
||||
READ_MESSAGE_HISTORY: 1n << 16n,
|
||||
MENTION_EVERYONE: 1n << 17n,
|
||||
USE_EXTERNAL_EMOJIS: 1n << 18n,
|
||||
VIEW_GUILD_INSIGHTS: 1n << 19n,
|
||||
CONNECT: 1n << 20n,
|
||||
SPEAK: 1n << 21n,
|
||||
MUTE_MEMBERS: 1n << 22n,
|
||||
DEAFEN_MEMBERS: 1n << 23n,
|
||||
MOVE_MEMBERS: 1n << 24n,
|
||||
USE_VAD: 1n << 25n,
|
||||
CHANGE_NICKNAME: 1n << 26n,
|
||||
MANAGE_NICKNAMES: 1n << 27n,
|
||||
MANAGE_ROLES: 1n << 28n,
|
||||
MANAGE_WEBHOOKS: 1n << 29n,
|
||||
MANAGE_EMOJIS: 1n << 30n,
|
||||
USE_SLASH_COMMANDS: 1n << 31n,
|
||||
REQUEST_TO_SPEAK: 1n << 32n,
|
||||
CreateInstantInvite: 1n << 0n,
|
||||
KickMembers: 1n << 1n,
|
||||
BanMembers: 1n << 2n,
|
||||
Administrator: 1n << 3n,
|
||||
ManageChannels: 1n << 4n,
|
||||
ManageGuild: 1n << 5n,
|
||||
AddReactions: 1n << 6n,
|
||||
ViewAuditLog: 1n << 7n,
|
||||
PrioritySpeaker: 1n << 8n,
|
||||
Stream: 1n << 9n,
|
||||
ViewChannel: 1n << 10n,
|
||||
SendMessages: 1n << 11n,
|
||||
SendTTSMessages: 1n << 12n,
|
||||
ManageMessages: 1n << 13n,
|
||||
EmbedLinks: 1n << 14n,
|
||||
AttachFiles: 1n << 15n,
|
||||
ReadMessageHistory: 1n << 16n,
|
||||
MentionEveryone: 1n << 17n,
|
||||
UseExternalEmojis: 1n << 18n,
|
||||
ViewGuildInsights: 1n << 19n,
|
||||
Connect: 1n << 20n,
|
||||
Speak: 1n << 21n,
|
||||
MuteMembers: 1n << 22n,
|
||||
DeafenMembers: 1n << 23n,
|
||||
MoveMembers: 1n << 24n,
|
||||
UseVAD: 1n << 25n,
|
||||
ChangeNickname: 1n << 26n,
|
||||
ManageNicknames: 1n << 27n,
|
||||
ManageRoles: 1n << 28n,
|
||||
ManageWebhooks: 1n << 29n,
|
||||
ManageEmojis: 1n << 30n,
|
||||
UseSlashCommands: 1n << 31n,
|
||||
RequestToSpeak: 1n << 32n,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
|
||||
@@ -57,6 +57,6 @@ export interface APITeamMember {
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
|
||||
*/
|
||||
export const enum TeamMemberMembershipState {
|
||||
INVITED = 1,
|
||||
ACCEPTED,
|
||||
Invited = 1,
|
||||
Accepted,
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: text, news
|
||||
*/
|
||||
type?: ChannelType.GUILD_NEWS | ChannelType.GUILD_TEXT;
|
||||
type?: ChannelType.GuildNews | ChannelType.GuildText;
|
||||
/**
|
||||
* The position of the channel in the left-hand listing
|
||||
*
|
||||
|
||||
@@ -3,7 +3,7 @@ export const VoiceGatewayVersion = '4';
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes
|
||||
*/
|
||||
export const enum VoiceOPCodes {
|
||||
export const enum VoiceOpcodes {
|
||||
/**
|
||||
* Begin a voice websocket connection
|
||||
*/
|
||||
@@ -61,7 +61,7 @@ export const enum VoiceCloseCodes {
|
||||
/**
|
||||
* You sent an invalid opcode
|
||||
*/
|
||||
UnknownOpCode = 4001,
|
||||
UnknownOpcode = 4001,
|
||||
/**
|
||||
* You sent a invalid payload in your identifying to the Gateway
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user