refactor: vendor content as regular files (remove git submodules) so CI builds don't need GitHub auth
This commit is contained in:
+437
@@ -0,0 +1,437 @@
|
||||
// These are enums that are used in the typings file but do not exist as actual exported values. To prevent them from
|
||||
// showing up in an editor, they are imported from here instead of exporting them there directly.
|
||||
|
||||
export const enum ActivityTypes {
|
||||
PLAYING = 0,
|
||||
STREAMING = 1,
|
||||
LISTENING = 2,
|
||||
WATCHING = 3,
|
||||
CUSTOM = 4,
|
||||
COMPETING = 5,
|
||||
HANG = 6,
|
||||
}
|
||||
|
||||
export const enum ApplicationCommandTypes {
|
||||
CHAT_INPUT = 1,
|
||||
USER = 2,
|
||||
MESSAGE = 3,
|
||||
}
|
||||
|
||||
export const enum ApplicationCommandOptionTypes {
|
||||
SUB_COMMAND = 1,
|
||||
SUB_COMMAND_GROUP = 2,
|
||||
STRING = 3,
|
||||
INTEGER = 4,
|
||||
BOOLEAN = 5,
|
||||
USER = 6,
|
||||
CHANNEL = 7,
|
||||
ROLE = 8,
|
||||
MENTIONABLE = 9,
|
||||
NUMBER = 10,
|
||||
ATTACHMENT = 11,
|
||||
}
|
||||
|
||||
export const enum ApplicationCommandPermissionTypes {
|
||||
ROLE = 1,
|
||||
USER = 2,
|
||||
}
|
||||
|
||||
export const enum AutoModerationRuleTriggerTypes {
|
||||
KEYWORD = 1,
|
||||
SPAM = 2,
|
||||
KEYWORD_PRESET = 3,
|
||||
MENTION_SPAM = 4,
|
||||
}
|
||||
|
||||
export const enum AutoModerationRuleKeywordPresetTypes {
|
||||
PROFANITY = 1,
|
||||
SEXUAL_CONTENT = 2,
|
||||
SLURS = 3,
|
||||
}
|
||||
|
||||
export const enum AutoModerationActionTypes {
|
||||
BLOCK_MESSAGE = 1,
|
||||
SEND_ALERT_MESSAGE = 2,
|
||||
TIMEOUT = 3,
|
||||
}
|
||||
|
||||
export const enum AutoModerationRuleEventTypes {
|
||||
MESSAGE_SEND = 1,
|
||||
}
|
||||
|
||||
export const enum ChannelTypes {
|
||||
GUILD_TEXT = 0,
|
||||
DM = 1,
|
||||
GUILD_VOICE = 2,
|
||||
GROUP_DM = 3,
|
||||
GUILD_CATEGORY = 4,
|
||||
GUILD_NEWS = 5,
|
||||
GUILD_STORE = 6,
|
||||
UNKNOWN = 7,
|
||||
GUILD_NEWS_THREAD = 10,
|
||||
GUILD_PUBLIC_THREAD = 11,
|
||||
GUILD_PRIVATE_THREAD = 12,
|
||||
GUILD_STAGE_VOICE = 13,
|
||||
GUILD_DIRECTORY = 14,
|
||||
GUILD_FORUM = 15,
|
||||
GUILD_MEDIA = 16,
|
||||
}
|
||||
|
||||
export const enum SortOrderTypes {
|
||||
LATEST_ACTIVITY = 1,
|
||||
CREATION_DATE = 2,
|
||||
}
|
||||
|
||||
export const enum ForumLayoutTypes {
|
||||
NOT_SET = 0,
|
||||
LIST_VIEW = 1,
|
||||
GALLERY_VIEW = 2,
|
||||
}
|
||||
|
||||
export const enum PollLayoutTypes {
|
||||
DEFAULT = 1,
|
||||
IMAGE_ONLY_ANSWERS,
|
||||
}
|
||||
|
||||
export const enum MessageTypes {
|
||||
DEFAULT = 0,
|
||||
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,
|
||||
THREAD_CREATED,
|
||||
REPLY,
|
||||
APPLICATION_COMMAND,
|
||||
THREAD_STARTER_MESSAGE,
|
||||
GUILD_INVITE_REMINDER,
|
||||
CONTEXT_MENU_COMMAND,
|
||||
AUTO_MODERATION_ACTION,
|
||||
ROLE_SUBSCRIPTION_PURCHASE,
|
||||
INTERACTION_PREMIUM_UPSELL,
|
||||
STAGE_START,
|
||||
STAGE_END,
|
||||
STAGE_SPEAKER,
|
||||
STAGE_RAISE_HAND,
|
||||
STAGE_TOPIC,
|
||||
GUILD_APPLICATION_PREMIUM_SUBSCRIPTION,
|
||||
PREMIUM_REFERRAL = 35,
|
||||
GUILD_INCIDENT_ALERT_MODE_ENABLED,
|
||||
GUILD_INCIDENT_ALERT_MODE_DISABLED,
|
||||
GUILD_INCIDENT_REPORT_RAID,
|
||||
GUILD_INCIDENT_REPORT_FALSE_ALARM,
|
||||
GUILD_DEADCHAT_REVIVE_PROMPT,
|
||||
CUSTOM_GIFT,
|
||||
GUILD_GAMING_STATS_PROMPT,
|
||||
PURCHASE_NOTIFICATION = 44,
|
||||
POLL_RESULT = 46,
|
||||
CHANGELOG,
|
||||
NITRO_NOTIFICATION,
|
||||
}
|
||||
|
||||
export const enum MessageReferenceTypes {
|
||||
DEFAULT = 0,
|
||||
FORWARD,
|
||||
}
|
||||
|
||||
export const enum DefaultMessageNotificationLevels {
|
||||
ALL_MESSAGES = 0,
|
||||
ONLY_MENTIONS = 1,
|
||||
}
|
||||
|
||||
export const enum ExplicitContentFilterLevels {
|
||||
DISABLED = 0,
|
||||
MEMBERS_WITHOUT_ROLES = 1,
|
||||
ALL_MEMBERS = 2,
|
||||
}
|
||||
|
||||
export const enum GuildScheduledEventEntityTypes {
|
||||
STAGE_INSTANCE = 1,
|
||||
VOICE = 2,
|
||||
EXTERNAL = 3,
|
||||
}
|
||||
|
||||
export const enum GuildScheduledEventPrivacyLevels {
|
||||
GUILD_ONLY = 2,
|
||||
}
|
||||
|
||||
export const enum GuildScheduledEventStatuses {
|
||||
SCHEDULED = 1,
|
||||
ACTIVE = 2,
|
||||
COMPLETED = 3,
|
||||
CANCELED = 4,
|
||||
}
|
||||
|
||||
export const enum InteractionResponseTypes {
|
||||
PONG = 1,
|
||||
CHANNEL_MESSAGE_WITH_SOURCE = 4,
|
||||
DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE = 5,
|
||||
DEFERRED_MESSAGE_UPDATE = 6,
|
||||
UPDATE_MESSAGE = 7,
|
||||
APPLICATION_COMMAND_AUTOCOMPLETE_RESULT = 8,
|
||||
MODAL = 9,
|
||||
}
|
||||
|
||||
export const enum InteractionTypes {
|
||||
PING = 1,
|
||||
APPLICATION_COMMAND = 2,
|
||||
MESSAGE_COMPONENT = 3,
|
||||
APPLICATION_COMMAND_AUTOCOMPLETE = 4,
|
||||
MODAL_SUBMIT = 5,
|
||||
}
|
||||
|
||||
export const enum InviteTargetTypes {
|
||||
STREAM = 1,
|
||||
EMBEDDED_APPLICATION,
|
||||
ROLE_SUBSCRIPTIONS,
|
||||
CREATOR_PAGE,
|
||||
}
|
||||
|
||||
export const enum InviteTypes {
|
||||
GUILD,
|
||||
GROUP_DM,
|
||||
FRIEND,
|
||||
}
|
||||
|
||||
export const enum MembershipStates {
|
||||
INVITED = 1,
|
||||
ACCEPTED = 2,
|
||||
}
|
||||
|
||||
export const enum MessageButtonStyles {
|
||||
PRIMARY = 1,
|
||||
SECONDARY = 2,
|
||||
SUCCESS = 3,
|
||||
DANGER = 4,
|
||||
LINK = 5,
|
||||
}
|
||||
|
||||
export const enum MessageComponentTypes {
|
||||
ACTION_ROW = 1,
|
||||
BUTTON = 2,
|
||||
STRING_SELECT = 3,
|
||||
TEXT_INPUT = 4,
|
||||
USER_SELECT = 5,
|
||||
ROLE_SELECT = 6,
|
||||
MENTIONABLE_SELECT = 7,
|
||||
CHANNEL_SELECT = 8,
|
||||
SECTION = 9,
|
||||
TEXT_DISPLAY = 10,
|
||||
THUMBNAIL = 11,
|
||||
MEDIA_GALLERY = 12,
|
||||
FILE = 13,
|
||||
SEPARATOR = 14,
|
||||
CONTAINER = 17,
|
||||
}
|
||||
|
||||
export const enum MessageComponentInteractables {
|
||||
ACTION_ROW = 1,
|
||||
BUTTON = 2,
|
||||
STRING_SELECT = 3,
|
||||
TEXT_INPUT = 4,
|
||||
USER_SELECT = 5,
|
||||
ROLE_SELECT = 6,
|
||||
MENTIONABLE_SELECT = 7,
|
||||
CHANNEL_SELECT = 8,
|
||||
}
|
||||
|
||||
export const enum SelectMenuComponentTypes {
|
||||
STRING_SELECT = 3,
|
||||
USER_SELECT = 5,
|
||||
ROLE_SELECT = 6,
|
||||
MENTIONABLE_SELECT = 7,
|
||||
CHANNEL_SELECT = 8,
|
||||
}
|
||||
|
||||
export const enum MFALevels {
|
||||
NONE = 0,
|
||||
ELEVATED = 1,
|
||||
}
|
||||
|
||||
export const enum NSFWLevels {
|
||||
DEFAULT = 0,
|
||||
EXPLICIT = 1,
|
||||
SAFE = 2,
|
||||
AGE_RESTRICTED = 3,
|
||||
}
|
||||
|
||||
/**
|
||||
* Background color of a nameplate.
|
||||
* @see {@link https://docs.discord.food/resources/user#nameplate-color-palette}
|
||||
*/
|
||||
export enum NameplatePalette {
|
||||
/**
|
||||
* Value: none
|
||||
* Name: None
|
||||
*/
|
||||
None = 'none',
|
||||
/**
|
||||
* Value: crimson
|
||||
* Name: Crimson
|
||||
*/
|
||||
Crimson = 'crimson',
|
||||
/**
|
||||
* Value: berry
|
||||
* Name: Berry
|
||||
*/
|
||||
Berry = 'berry',
|
||||
/**
|
||||
* Value: sky
|
||||
* Name: Sky
|
||||
*/
|
||||
Sky = 'sky',
|
||||
/**
|
||||
* Value: teal
|
||||
* Name: Teal
|
||||
*/
|
||||
Teal = 'teal',
|
||||
/**
|
||||
* Value: forest
|
||||
* Name: Forest
|
||||
*/
|
||||
Forest = 'forest',
|
||||
/**
|
||||
* Value: bubble_gum
|
||||
* Name: BubbleGum
|
||||
*/
|
||||
BubbleGum = 'bubble_gum',
|
||||
/**
|
||||
* Value: violet
|
||||
* Name: Violet
|
||||
*/
|
||||
Violet = 'violet',
|
||||
/**
|
||||
* Value: cobalt
|
||||
* Name: Cobalt
|
||||
*/
|
||||
Cobalt = 'cobalt',
|
||||
/**
|
||||
* Value: clover
|
||||
* Name: Clover
|
||||
*/
|
||||
Clover = 'clover',
|
||||
/**
|
||||
* Value: lemon
|
||||
* Name: Lemon
|
||||
*/
|
||||
Lemon = 'lemon',
|
||||
/**
|
||||
* Value: white
|
||||
* Name: White
|
||||
*/
|
||||
White = 'white',
|
||||
}
|
||||
|
||||
export const enum OverwriteTypes {
|
||||
role = 0,
|
||||
member = 1,
|
||||
}
|
||||
|
||||
export const enum PremiumTiers {
|
||||
NONE = 0,
|
||||
TIER_1 = 1,
|
||||
TIER_2 = 2,
|
||||
TIER_3 = 3,
|
||||
}
|
||||
|
||||
export const enum PrivacyLevels {
|
||||
PUBLIC = 1,
|
||||
GUILD_ONLY = 2,
|
||||
}
|
||||
|
||||
export const enum StickerFormatTypes {
|
||||
PNG = 1,
|
||||
APNG = 2,
|
||||
LOTTIE = 3,
|
||||
GIF = 4,
|
||||
}
|
||||
|
||||
export const enum StickerTypes {
|
||||
STANDARD = 1,
|
||||
GUILD = 2,
|
||||
}
|
||||
|
||||
export const enum TextInputStyles {
|
||||
SHORT = 1,
|
||||
PARAGRAPH = 2,
|
||||
}
|
||||
|
||||
export const enum VerificationLevels {
|
||||
NONE = 0,
|
||||
LOW = 1,
|
||||
MEDIUM = 2,
|
||||
HIGH = 3,
|
||||
VERY_HIGH = 4,
|
||||
}
|
||||
|
||||
export const enum VideoQualityModes {
|
||||
AUTO = 1,
|
||||
FULL = 2,
|
||||
}
|
||||
|
||||
export const enum ReactionTypes {
|
||||
NORMAL = 0,
|
||||
BURST = 1,
|
||||
}
|
||||
|
||||
export const enum WebhookTypes {
|
||||
Incoming = 1,
|
||||
'Channel Follower' = 2,
|
||||
Application = 3,
|
||||
}
|
||||
|
||||
export enum ApplicationRoleConnectionMetadataTypes {
|
||||
INTEGER_LESS_THAN_OR_EQUAL = 1,
|
||||
INTEGER_GREATER_THAN_OR_EQUAL,
|
||||
INTEGER_EQUAL,
|
||||
INTEGER_NOT_EQUAL,
|
||||
DATATIME_LESS_THAN_OR_EQUAL,
|
||||
DATATIME_GREATER_THAN_OR_EQUAL,
|
||||
BOOLEAN_EQUAL,
|
||||
BOOLEAN_NOT_EQUAL,
|
||||
}
|
||||
|
||||
export const enum RelationshipTypes {
|
||||
NONE = 0,
|
||||
FRIEND = 1,
|
||||
BLOCKED = 2,
|
||||
PENDING_INCOMING = 3,
|
||||
PENDING_OUTGOING = 4,
|
||||
IMPLICIT = 5,
|
||||
}
|
||||
|
||||
export const enum SeparatorSpacingSizes {
|
||||
SMALL = 1,
|
||||
LARGE = 2,
|
||||
}
|
||||
|
||||
export const enum ApplicationType {
|
||||
/**
|
||||
* A game integrating with Discord
|
||||
*/
|
||||
GAME = 1,
|
||||
/**
|
||||
* A music service integrating with Discord
|
||||
* @deprecated
|
||||
*/
|
||||
MUSIC = 2,
|
||||
/**
|
||||
* A limited application used for ticketed event SKUs
|
||||
*/
|
||||
TICKETED_EVENTS = 3,
|
||||
/**
|
||||
* A limited application used for creator monetization (e.g. role subscription) SKUs
|
||||
*/
|
||||
CREATOR_MONETIZATION = 4,
|
||||
}
|
||||
+10332
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,429 @@
|
||||
// These are aggregate types that are used in the typings file but do not exist as actual exported values.
|
||||
// To prevent them from showing up in an editor, they are imported from here instead of exporting them there directly.
|
||||
|
||||
import {
|
||||
APIActionRowComponent,
|
||||
APIActionRowComponentTypes,
|
||||
APIApplication,
|
||||
APIApplicationCommand,
|
||||
APIApplicationCommandInteraction,
|
||||
APIAuditLog,
|
||||
APIAuditLogEntry,
|
||||
APIBan,
|
||||
APIChannel,
|
||||
APIEmoji,
|
||||
APIExtendedInvite,
|
||||
APIGuildIntegration,
|
||||
APIGuildIntegrationApplication,
|
||||
APIGuildMember,
|
||||
APIGuildPreview,
|
||||
APIGuildScheduledEvent,
|
||||
APIGuildWelcomeScreen,
|
||||
APIGuildWelcomeScreenChannel,
|
||||
APIGuildWidget,
|
||||
APIGuildWidgetMember,
|
||||
APIInteractionDataResolvedChannel,
|
||||
APIInteractionDataResolvedGuildMember,
|
||||
APIInteractionGuildMember,
|
||||
APIInvite,
|
||||
APIInviteStageInstance,
|
||||
APIMessage,
|
||||
APIMessageButtonInteractionData,
|
||||
APIMessageComponentInteraction,
|
||||
APIMessageSelectMenuInteractionData,
|
||||
APIModalSubmitInteraction,
|
||||
APIOverwrite,
|
||||
APIPartialChannel,
|
||||
APIPartialEmoji,
|
||||
APIPartialGuild,
|
||||
APIReaction,
|
||||
APIRole,
|
||||
APIStageInstance,
|
||||
APISticker,
|
||||
APIStickerItem,
|
||||
APIStickerPack,
|
||||
APITeam,
|
||||
APITeamMember,
|
||||
APITemplate,
|
||||
APITextInputComponent,
|
||||
APIThreadMember,
|
||||
APIUnavailableGuild,
|
||||
APIUser,
|
||||
APIVoiceRegion,
|
||||
APIWebhook,
|
||||
GatewayActivity,
|
||||
GatewayActivityAssets,
|
||||
GatewayActivityEmoji,
|
||||
GatewayGuildBanAddDispatchData,
|
||||
GatewayGuildMemberAddDispatchData,
|
||||
GatewayGuildMemberUpdateDispatchData,
|
||||
GatewayInteractionCreateDispatchData,
|
||||
GatewayInviteCreateDispatchData,
|
||||
GatewayInviteDeleteDispatchData,
|
||||
GatewayMessageReactionAddDispatchData,
|
||||
GatewayMessageUpdateDispatchData,
|
||||
GatewayPresenceUpdate,
|
||||
GatewayReadyDispatchData,
|
||||
GatewayTypingStartDispatchData,
|
||||
GatewayVoiceState,
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildFeature,
|
||||
GuildHubType,
|
||||
GuildMFALevel,
|
||||
GuildNSFWLevel,
|
||||
GuildPremiumTier,
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
LocalizationMap,
|
||||
Permissions,
|
||||
RESTAPIPartialCurrentUserGuild,
|
||||
RESTGetAPIWebhookWithTokenResult,
|
||||
RESTPatchAPIChannelMessageJSONBody,
|
||||
RESTPatchAPICurrentGuildMemberNicknameJSONBody,
|
||||
RESTPatchAPIInteractionFollowupJSONBody,
|
||||
RESTPatchAPIInteractionOriginalResponseJSONBody,
|
||||
RESTPatchAPIWebhookWithTokenJSONBody,
|
||||
RESTPostAPIChannelMessageJSONBody,
|
||||
RESTPostAPIInteractionCallbackFormDataBody,
|
||||
RESTPostAPIInteractionFollowupJSONBody,
|
||||
RESTPostAPIWebhookWithTokenJSONBody,
|
||||
Snowflake,
|
||||
} from 'discord-api-types/v10';
|
||||
import { Guild, GuildChannel, PermissionOverwrites } from '.';
|
||||
import type {
|
||||
ApplicationRoleConnectionMetadataTypes,
|
||||
AutoModerationActionTypes,
|
||||
AutoModerationRuleEventTypes,
|
||||
AutoModerationRuleKeywordPresetTypes,
|
||||
AutoModerationRuleTriggerTypes,
|
||||
MessageComponentTypes,
|
||||
SeparatorSpacingSizes,
|
||||
} from './enums';
|
||||
|
||||
export type RawActivityData = GatewayActivity;
|
||||
|
||||
export type RawApplicationData =
|
||||
| RawClientApplicationData
|
||||
| RawIntegrationApplicationData;
|
||||
export type RawClientApplicationData =
|
||||
| GatewayReadyDispatchData['application']
|
||||
| APIMessage['application'];
|
||||
export type RawIntegrationApplicationData =
|
||||
| APIGuildIntegrationApplication
|
||||
| Partial<APIApplication>;
|
||||
|
||||
export type RawApplicationCommandData = APIApplicationCommand;
|
||||
|
||||
export type RawChannelData =
|
||||
| RawGuildChannelData
|
||||
| RawThreadChannelData
|
||||
| RawDMChannelData
|
||||
| RawPartialGroupDMChannelData;
|
||||
export type RawDMChannelData = APIChannel | APIInteractionDataResolvedChannel;
|
||||
export type RawGuildChannelData =
|
||||
| APIChannel
|
||||
| APIInteractionDataResolvedChannel
|
||||
| Required<APIPartialChannel>;
|
||||
export type RawPartialGroupDMChannelData =
|
||||
| APIChannel
|
||||
| Required<APIPartialChannel>;
|
||||
export type RawThreadChannelData =
|
||||
| APIChannel
|
||||
| APIInteractionDataResolvedChannel;
|
||||
|
||||
export type RawEmojiData =
|
||||
| RawGuildEmojiData
|
||||
| RawReactionEmojiData
|
||||
| GatewayActivityEmoji
|
||||
| Omit<Partial<APIPartialEmoji>, 'animated'>;
|
||||
export type RawGuildEmojiData = APIEmoji;
|
||||
export type RawReactionEmojiData = APIEmoji | APIPartialEmoji;
|
||||
|
||||
export type RawGuildAuditLogData = APIAuditLog;
|
||||
|
||||
export type RawGuildAuditLogEntryData = APIAuditLogEntry;
|
||||
|
||||
export type RawGuildBanData = GatewayGuildBanAddDispatchData | APIBan;
|
||||
|
||||
export type RawGuildData = APIGuild | APIUnavailableGuild;
|
||||
export type RawAnonymousGuildData = RawGuildData | RawInviteGuildData;
|
||||
export type RawBaseGuildData = RawAnonymousGuildData | RawOAuth2GuildData;
|
||||
export type RawInviteGuildData = APIPartialGuild;
|
||||
export type RawOAuth2GuildData = RESTAPIPartialCurrentUserGuild;
|
||||
|
||||
export type RawGuildMemberData =
|
||||
| APIGuildMember
|
||||
| APIInteractionGuildMember
|
||||
| APIInteractionDataResolvedGuildMember
|
||||
| GatewayGuildMemberAddDispatchData
|
||||
| GatewayGuildMemberUpdateDispatchData
|
||||
| Required<RESTPatchAPICurrentGuildMemberNicknameJSONBody>
|
||||
| { user: { id: Snowflake } };
|
||||
export type RawThreadMemberData = APIThreadMember;
|
||||
|
||||
export type RawGuildPreviewData = APIGuildPreview;
|
||||
|
||||
export type RawGuildScheduledEventData = APIGuildScheduledEvent;
|
||||
|
||||
export type RawGuildTemplateData = APITemplate;
|
||||
|
||||
export type RawIntegrationData = APIGuildIntegration;
|
||||
|
||||
export type RawInteractionData = GatewayInteractionCreateDispatchData;
|
||||
export type RawCommandInteractionData = APIApplicationCommandInteraction;
|
||||
export type RawMessageComponentInteractionData = APIMessageComponentInteraction;
|
||||
export type RawMessageButtonInteractionData = APIMessageButtonInteractionData;
|
||||
export type RawMessageSelectMenuInteractionData =
|
||||
APIMessageSelectMenuInteractionData;
|
||||
|
||||
export type RawTextInputComponentData = APITextInputComponent;
|
||||
export type RawModalSubmitInteractionData = APIModalSubmitInteraction;
|
||||
|
||||
export type RawInviteData =
|
||||
| APIExtendedInvite
|
||||
| APIInvite
|
||||
| (GatewayInviteCreateDispatchData & { channel: GuildChannel; guild: Guild })
|
||||
| (GatewayInviteDeleteDispatchData & { channel: GuildChannel; guild: Guild });
|
||||
|
||||
export type RawInviteStageInstance = APIInviteStageInstance;
|
||||
|
||||
export type RawMessageData = APIMessage;
|
||||
export type RawPartialMessageData = GatewayMessageUpdateDispatchData;
|
||||
|
||||
export interface RawMessageAttachmentData {
|
||||
id: Snowflake;
|
||||
filename: string;
|
||||
description?: string;
|
||||
content_type?: string;
|
||||
size: number;
|
||||
url: string;
|
||||
proxy_url: string;
|
||||
height?: number | null;
|
||||
width?: number | null;
|
||||
ephemeral?: boolean;
|
||||
duration_secs?: number;
|
||||
waveform?: string;
|
||||
}
|
||||
|
||||
export type RawMessagePayloadData =
|
||||
| RESTPostAPIChannelMessageJSONBody
|
||||
| RESTPatchAPIChannelMessageJSONBody
|
||||
| RESTPostAPIWebhookWithTokenJSONBody
|
||||
| RESTPatchAPIWebhookWithTokenJSONBody
|
||||
| RESTPostAPIInteractionCallbackFormDataBody
|
||||
| RESTPatchAPIInteractionOriginalResponseJSONBody
|
||||
| RESTPostAPIInteractionFollowupJSONBody
|
||||
| RESTPatchAPIInteractionFollowupJSONBody;
|
||||
|
||||
export type RawMessageReactionData =
|
||||
| APIReaction
|
||||
| GatewayMessageReactionAddDispatchData;
|
||||
|
||||
export type RawPermissionOverwriteData = APIOverwrite | PermissionOverwrites;
|
||||
|
||||
export type RawPresenceData = GatewayPresenceUpdate;
|
||||
|
||||
export type RawRoleData = APIRole;
|
||||
|
||||
export type RawRichPresenceAssets = GatewayActivityAssets;
|
||||
|
||||
export type RawStageInstanceData =
|
||||
| APIStageInstance
|
||||
| (Partial<APIStageInstance> &
|
||||
Pick<APIStageInstance, 'id' | 'channel_id' | 'guild_id'>);
|
||||
|
||||
export type RawStickerData = APISticker | APIStickerItem;
|
||||
|
||||
export type RawStickerPackData = APIStickerPack;
|
||||
|
||||
export type RawTeamData = APITeam;
|
||||
|
||||
export type RawTeamMemberData = APITeamMember;
|
||||
|
||||
export type RawTypingData = GatewayTypingStartDispatchData;
|
||||
|
||||
export type RawUserData =
|
||||
| (APIUser & { member?: Omit<APIGuildMember, 'user'> })
|
||||
| (GatewayPresenceUpdate['user'] & Pick<APIUser, 'username'>);
|
||||
|
||||
export type RawVoiceRegionData = APIVoiceRegion;
|
||||
|
||||
export type RawVoiceStateData =
|
||||
| GatewayVoiceState
|
||||
| Omit<GatewayVoiceState, 'guild_id'>;
|
||||
|
||||
export type RawWebhookData =
|
||||
| APIWebhook
|
||||
| RESTGetAPIWebhookWithTokenResult
|
||||
| (Partial<APIWebhook> & Required<Pick<APIWebhook, 'id' | 'guild_id'>>);
|
||||
|
||||
export type RawWelcomeChannelData = APIGuildWelcomeScreenChannel;
|
||||
|
||||
export type RawWelcomeScreenData = APIGuildWelcomeScreen;
|
||||
|
||||
export type RawWidgetData = APIGuildWidget;
|
||||
|
||||
export type RawWidgetMemberData = APIGuildWidgetMember;
|
||||
|
||||
export interface GatewayAutoModerationActionExecutionDispatchData {
|
||||
guild_id: Snowflake;
|
||||
action: APIAutoModerationAction;
|
||||
rule_id: Snowflake;
|
||||
rule_trigger_type: AutoModerationRuleTriggerTypes;
|
||||
user_id: Snowflake;
|
||||
channel_id?: Snowflake;
|
||||
message_id?: Snowflake;
|
||||
alert_system_message_id?: Snowflake;
|
||||
content: string;
|
||||
matched_keyword: string | null;
|
||||
matched_content: string | null;
|
||||
}
|
||||
|
||||
export interface APIAutoModerationAction {
|
||||
type: AutoModerationActionTypes;
|
||||
metadata?: APIAutoModerationActionMetadata;
|
||||
}
|
||||
export interface APIAutoModerationActionMetadata {
|
||||
channel_id?: Snowflake;
|
||||
duration_seconds?: number;
|
||||
custom_message?: string;
|
||||
}
|
||||
|
||||
export interface APIAutoModerationRule {
|
||||
id: Snowflake;
|
||||
guild_id: Snowflake;
|
||||
name: string;
|
||||
creator_id: Snowflake;
|
||||
event_type: AutoModerationRuleEventTypes;
|
||||
trigger_type: AutoModerationRuleTriggerTypes;
|
||||
trigger_metadata: APIAutoModerationRuleTriggerMetadata;
|
||||
actions: APIAutoModerationAction[];
|
||||
enabled: boolean;
|
||||
exempt_roles: Snowflake[];
|
||||
exempt_channels: Snowflake[];
|
||||
}
|
||||
|
||||
export interface APIAutoModerationRuleTriggerMetadata {
|
||||
keyword_filter?: string[];
|
||||
presets?: AutoModerationRuleKeywordPresetTypes[];
|
||||
allow_list?: string[];
|
||||
regex_patterns?: string[];
|
||||
mention_total_limit?: number;
|
||||
mention_raid_protection_enabled?: boolean;
|
||||
}
|
||||
|
||||
export interface APIGuild extends APIPartialGuild {
|
||||
icon_hash?: string | null;
|
||||
discovery_splash: string | null;
|
||||
owner?: boolean;
|
||||
owner_id: Snowflake;
|
||||
permissions?: Permissions;
|
||||
region: string;
|
||||
afk_channel_id: Snowflake | null;
|
||||
afk_timeout: number;
|
||||
widget_enabled?: boolean;
|
||||
widget_channel_id?: Snowflake | null;
|
||||
verification_level: GuildVerificationLevel;
|
||||
default_message_notifications: GuildDefaultMessageNotifications;
|
||||
explicit_content_filter: GuildExplicitContentFilter;
|
||||
roles: APIRole[];
|
||||
emojis: APIEmoji[];
|
||||
features: GuildFeature[];
|
||||
mfa_level: GuildMFALevel;
|
||||
application_id: Snowflake | null;
|
||||
system_channel_id: Snowflake | null;
|
||||
system_channel_flags: GuildSystemChannelFlags;
|
||||
rules_channel_id: Snowflake | null;
|
||||
max_presences?: number | null;
|
||||
max_members?: number;
|
||||
vanity_url_code: string | null;
|
||||
description: string | null;
|
||||
banner: string | null;
|
||||
premium_tier: GuildPremiumTier;
|
||||
premium_subscription_count?: number;
|
||||
preferred_locale: string;
|
||||
public_updates_channel_id: Snowflake | null;
|
||||
max_video_channel_users?: number;
|
||||
approximate_member_count?: number;
|
||||
approximate_presence_count?: number;
|
||||
welcome_screen?: APIGuildWelcomeScreen;
|
||||
nsfw_level: GuildNSFWLevel;
|
||||
stickers: APISticker[];
|
||||
premium_progress_bar_enabled: boolean;
|
||||
hub_type: GuildHubType | null;
|
||||
safety_alerts_channel_id: Snowflake | null;
|
||||
}
|
||||
|
||||
export interface APIApplicationRoleConnectionMetadata {
|
||||
type: ApplicationRoleConnectionMetadataTypes;
|
||||
key: string;
|
||||
name: string;
|
||||
name_localizations?: LocalizationMap;
|
||||
description: string;
|
||||
description_localizations?: LocalizationMap;
|
||||
}
|
||||
|
||||
export interface APIBaseComponent<T extends MessageComponentTypes> {
|
||||
type: T;
|
||||
id?: number;
|
||||
}
|
||||
|
||||
export interface APIUnfurledMediaItem {
|
||||
url: string;
|
||||
}
|
||||
|
||||
export interface APIMediaGalleryItem {
|
||||
media: APIUnfurledMediaItem;
|
||||
description: string;
|
||||
spoiler: boolean;
|
||||
}
|
||||
|
||||
export interface APISeparatorComponent
|
||||
extends APIBaseComponent<MessageComponentTypes.SEPARATOR> {
|
||||
spacing: SeparatorSpacingSizes;
|
||||
divider: boolean;
|
||||
}
|
||||
|
||||
export interface APITextDisplayComponent
|
||||
extends APIBaseComponent<MessageComponentTypes.TEXT_DISPLAY> {
|
||||
content: string;
|
||||
}
|
||||
|
||||
export interface APIThumbnailComponent
|
||||
extends APIBaseComponent<MessageComponentTypes.THUMBNAIL> {
|
||||
media: APIUnfurledMediaItem;
|
||||
description: string;
|
||||
spoiler: boolean;
|
||||
}
|
||||
|
||||
export interface APIFileComponent
|
||||
extends APIBaseComponent<MessageComponentTypes.FILE> {
|
||||
file: APIUnfurledMediaItem;
|
||||
spoiler: boolean;
|
||||
}
|
||||
|
||||
export interface APIMediaGalleryComponent
|
||||
extends APIBaseComponent<MessageComponentTypes.MEDIA_GALLERY> {
|
||||
items: APIMediaGalleryItem;
|
||||
}
|
||||
|
||||
export interface APISectionComponent
|
||||
extends APIBaseComponent<MessageComponentTypes.SECTION> {
|
||||
components: APITextDisplayComponent[];
|
||||
accessory: APIThumbnailComponent | APIMessageButtonInteractionData;
|
||||
}
|
||||
|
||||
export type APIContainerComponents =
|
||||
| APIActionRowComponent<APIActionRowComponentTypes>
|
||||
| APITextDisplayComponent
|
||||
| APISectionComponent
|
||||
| APIMediaGalleryComponent
|
||||
| APISeparatorComponent
|
||||
| APIFileComponent;
|
||||
export interface APIContainerComponent
|
||||
extends APIBaseComponent<MessageComponentTypes.CONTAINER> {
|
||||
components: APIContainerComponents[];
|
||||
accent_color: number;
|
||||
spoiler: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user