diff --git a/deno/gateway/v8.ts b/deno/gateway/v8.ts index 4cbc4107..8a4971c1 100644 --- a/deno/gateway/v8.ts +++ b/deno/gateway/v8.ts @@ -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; interface DataPayload extends BasePayload { - op: GatewayOPCodes.Dispatch; + op: GatewayOpcodes.Dispatch; t: Event; d: D; } diff --git a/deno/payloads/v8/auditLog.ts b/deno/payloads/v8/auditLog.ts index 5cf9174a..ef5f389e 100644 --- a/deno/payloads/v8/auditLog.ts +++ b/deno/payloads/v8/auditLog.ts @@ -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, } /** diff --git a/deno/payloads/v8/channel.ts b/deno/payloads/v8/channel.ts index b0d42857..27311a17 100644 --- a/deno/payloads/v8/channel.ts +++ b/deno/payloads/v8/channel.ts @@ -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 */ diff --git a/deno/payloads/v8/gateway.ts b/deno/payloads/v8/gateway.ts index e083700c..d33fc41b 100644 --- a/deno/payloads/v8/gateway.ts +++ b/deno/payloads/v8/gateway.ts @@ -292,12 +292,12 @@ export type GatewayActivitySecrets = Partial { - type: ApplicationCommandOptionType.SUB_COMMAND | ApplicationCommandOptionType.SUB_COMMAND_GROUP; + type: ApplicationCommandOptionType.SubCommand | ApplicationCommandOptionType.SubCommandGroup; options?: APIApplicationCommandOption[]; } @@ -72,7 +72,7 @@ export interface APIApplicationCommandSubCommandOptions extends Omit { - type: ApplicationCommandOptionType.STRING | ApplicationCommandOptionType.INTEGER; + type: ApplicationCommandOptionType.String | ApplicationCommandOptionType.Integer; choices?: APIApplicationCommandOptionChoice[]; } @@ -80,15 +80,15 @@ export interface APIApplicationCommandArgumentOptions extends Omit; 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 >; diff --git a/deno/payloads/v8/invite.ts b/deno/payloads/v8/invite.ts index 93404dbf..95a4177c 100644 --- a/deno/payloads/v8/invite.ts +++ b/deno/payloads/v8/invite.ts @@ -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, } /** diff --git a/deno/payloads/v8/permissions.ts b/deno/payloads/v8/permissions.ts index c8e2131f..ed1de1c2 100644 --- a/deno/payloads/v8/permissions.ts +++ b/deno/payloads/v8/permissions.ts @@ -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; /** diff --git a/deno/payloads/v8/teams.ts b/deno/payloads/v8/teams.ts index b9d5f00c..6a5b752a 100644 --- a/deno/payloads/v8/teams.ts +++ b/deno/payloads/v8/teams.ts @@ -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, } diff --git a/deno/rest/v8/channel.ts b/deno/rest/v8/channel.ts index 5290963d..c2dcd202 100644 --- a/deno/rest/v8/channel.ts +++ b/deno/rest/v8/channel.ts @@ -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 * diff --git a/deno/voice/v4.ts b/deno/voice/v4.ts index b81a9196..cad02ffa 100644 --- a/deno/voice/v4.ts +++ b/deno/voice/v4.ts @@ -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 */ diff --git a/gateway/v8.ts b/gateway/v8.ts index 5550639a..ed53bec4 100644 --- a/gateway/v8.ts +++ b/gateway/v8.ts @@ -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; interface DataPayload extends BasePayload { - op: GatewayOPCodes.Dispatch; + op: GatewayOpcodes.Dispatch; t: Event; d: D; } diff --git a/payloads/v8/auditLog.ts b/payloads/v8/auditLog.ts index 1ffe7d5a..a4b52b58 100644 --- a/payloads/v8/auditLog.ts +++ b/payloads/v8/auditLog.ts @@ -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, } /** diff --git a/payloads/v8/channel.ts b/payloads/v8/channel.ts index c46a7047..1c8f03e5 100644 --- a/payloads/v8/channel.ts +++ b/payloads/v8/channel.ts @@ -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 */ diff --git a/payloads/v8/gateway.ts b/payloads/v8/gateway.ts index 6d3705dc..b26561d2 100644 --- a/payloads/v8/gateway.ts +++ b/payloads/v8/gateway.ts @@ -292,12 +292,12 @@ export type GatewayActivitySecrets = Partial { - type: ApplicationCommandOptionType.SUB_COMMAND | ApplicationCommandOptionType.SUB_COMMAND_GROUP; + type: ApplicationCommandOptionType.SubCommand | ApplicationCommandOptionType.SubCommandGroup; options?: APIApplicationCommandOption[]; } @@ -72,7 +72,7 @@ export interface APIApplicationCommandSubCommandOptions extends Omit { - type: ApplicationCommandOptionType.STRING | ApplicationCommandOptionType.INTEGER; + type: ApplicationCommandOptionType.String | ApplicationCommandOptionType.Integer; choices?: APIApplicationCommandOptionChoice[]; } @@ -80,15 +80,15 @@ export interface APIApplicationCommandArgumentOptions extends Omit; 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 >; diff --git a/payloads/v8/invite.ts b/payloads/v8/invite.ts index 2a8f7683..156e55fd 100644 --- a/payloads/v8/invite.ts +++ b/payloads/v8/invite.ts @@ -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, } /** diff --git a/payloads/v8/permissions.ts b/payloads/v8/permissions.ts index 07f11be0..44618540 100644 --- a/payloads/v8/permissions.ts +++ b/payloads/v8/permissions.ts @@ -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; /** diff --git a/payloads/v8/teams.ts b/payloads/v8/teams.ts index d2d7f7dc..cadf539b 100644 --- a/payloads/v8/teams.ts +++ b/payloads/v8/teams.ts @@ -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, } diff --git a/rest/v8/channel.ts b/rest/v8/channel.ts index cedf31c7..962a38db 100644 --- a/rest/v8/channel.ts +++ b/rest/v8/channel.ts @@ -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 * diff --git a/voice/v4.ts b/voice/v4.ts index 4a2397d6..61a6f87c 100644 --- a/voice/v4.ts +++ b/voice/v4.ts @@ -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 */