Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion packages/discord-types/enums/activity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,35 @@ export const enum ActivityFlags {
PARTY_PRIVACY_FRIENDS = 1 << 6,
PARTY_PRIVACY_VOICE_CHANNEL = 1 << 7,
EMBEDDED = 1 << 8,
CONTEXTLESS = 1 << 9
CONTEXTLESS = 1 << 9,
SUPPORTS_GATEWAY_ACTIVITY_ACTION_JOIN = 1 << 10,
}

export const enum ActivityStatusDisplayType {
NAME = 0,
STATE = 1,
DETAILS = 2
}

export const enum OrientationLockState {
UNLOCKED = 1,
PORTRAIT = 2,
LANDSCAPE = 3,
}

export const enum ActivityGameMode {
PLAY = 0,
SPECTATE = 1,
}

export const enum ActivityLayout {
FOCUSED = 0,
PIP = 1,
GRID = 2,
}

export const enum ActivityLabelType {
NONE = 0,
NEW = 1,
UPDATED = 2,
}
41 changes: 41 additions & 0 deletions packages/discord-types/enums/application.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
export const enum ApplicationType {
DEPRECATED_GAME = 1,
TICKETED_EVENTS = 3,
GUILD_ROLE_SUBSCRIPTIONS = 4,
GAME = 5,
NON_GAME_DETECTABLE = 6,
}

export const enum LinkedGameType {
LINKED = 1,
OFFICIAL = 2,
NVIDIA = 3,
}

export const enum CarouselItemType {
IMG = 1,
YOUTUBE_VIDEO = 2,
VIDEO = 3,
}

export const enum ApplicationFlags {
EMBEDDED_RELEASED = 1 << 1,
EMBEDDED_IAP = 1 << 3,
APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE = 1 << 6,
GAME_PROFILE_DISABLED = 1 << 7,
CONTEXTLESS_ACTIVITY = 1 << 9,
SOCIAL_LAYER_INTEGRATION_LIMITED = 1 << 10,
CLOUD_GAMING_DEMO = 1 << 11,
GATEWAY_PRESENCE = 1 << 12,
GATEWAY_PRESENCE_LIMITED = 1 << 13,
GATEWAY_GUILD_MEMBERS = 1 << 14,
GATEWAY_GUILD_MEMBERS_LIMITED = 1 << 15,
EMBEDDED = 1 << 17,
GATEWAY_MESSAGE_CONTENT = 1 << 18,
GATEWAY_MESSAGE_CONTENT_LIMITED = 1 << 19,
EMBEDDED_FIRST_PARTY = 1 << 20,
APPLICATION_COMMAND_BADGE = 1 << 23,
SOCIAL_LAYER_INTEGRATION = 1 << 27,
PROMOTED = 1 << 29,
PARTNER = 1 << 30,
}
146 changes: 145 additions & 1 deletion packages/discord-types/enums/channel.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,159 @@
export const enum PermissionOverwriteType {
ROLE = 0,
MEMBER = 1,
OWNER = 2
}

export const enum PermissionOverwriteRowType {
EMPTY_STATE = 0,
ADMINISTRATOR = 1,
ROLE = 2,
OWNER = 3,
MEMBER = 4,
USER = 5,
GUILD = 6,
}

export const enum PermissionOverwriteSectionType {
ROLES = 0,
MEMBERS = 1,
USERS = 2,
GUILDS = 3,
}

export const enum ForumLayout {
DEFAULT = 0,
LIST = 1,
GRID = 2,
}

export const enum SafetyWarningType {
STRANGER_DANGER = 1,
INAPPROPRIATE_CONVERSATION_TIER_1 = 2,
INAPPROPRIATE_CONVERSATION_TIER_2 = 3,
LIKELY_ATO = 4,
}

export const enum ChannelFlags {
GUILD_FEED_REMOVED = 1,
PINNED = 2,
ACTIVE_CHANNELS_REMOVED = 4,
REQUIRE_TAG = 16,
IS_SPAM = 32,
IS_GUILD_RESOURCE_CHANNEL = 128,
CLYDE_AI = 256,
IS_SCHEDULED_FOR_DELETION = 512,
IS_MEDIA_CHANNEL = 1024,
SUMMARIES_DISABLED = 2048,
IS_ROLE_SUBSCRIPTION_TEMPLATE_PREVIEW_CHANNEL = 8192,
IS_BROADCASTING = 16384,
HIDE_MEDIA_DOWNLOAD_OPTIONS = 32768,
IS_JOIN_REQUEST_INTERVIEW_CHANNEL = 65536,
OBFUSCATED = 131072,
IS_MODERATOR_REPORT_CHANNEL = 524288,
}

export const enum ChannelType {
GUILD_TEXT = 0,
DM = 1,
GUILD_VOICE = 2,
GROUP_DM = 3,
GUILD_CATEGORY = 4,
GUILD_ANNOUNCEMENT = 5,
GUILD_STORE = 6,
ANNOUNCEMENT_THREAD = 10,
PUBLIC_THREAD = 11,
PRIVATE_THREAD = 12,
GUILD_STAGE_VOICE = 13,
GUILD_DIRECTORY = 14,
GUILD_FORUM = 15,
GUILD_MEDIA = 16
GUILD_MEDIA = 16,
LOBBY = 17,
DM_SDK = 18,
UNKNOWN = 10000,
}

/**
* Pre-defined Sets of channel types for grouping related channels.
* Each property is a Set<ChannelType> containing channel type numbers.
*/
export interface ChannelTypesSets {
/** DM and GROUP_DM, channels that support calling. */
CALLABLE: Set<ChannelType>;
/** Channels that support text messages. */
TEXTUAL: Set<ChannelType>;
/** Forum and media channels, threads only, no direct messages. */
GUILD_THREADS_ONLY: Set<ChannelType>;
/** Channels that support stickers. */
STICKERS: Set<ChannelType>;
/** Channels that can be read/viewed. */
READABLE: Set<ChannelType>;
/** All guild channel types including threads. */
GUILD: Set<ChannelType>;
/** Guild channels excluding threads. */
GUILD_CHANNEL: Set<ChannelType>;
/** All thread types (announcement, public, private). */
THREADS: Set<ChannelType>;
/** DM and GROUP_DM, private/non-guild channels. */
PRIVATE_CHANNEL: Set<ChannelType>;
/** Announcement and public threads only. */
PUBLIC_THREADS: Set<ChannelType>;
/** Guild channels that can have threads. */
GUILD_THREADED: Set<ChannelType>;
/** Guild channels that are persisted/stored. */
GUILD_STORED: Set<ChannelType>;
/** Guild channels with text capability. */
GUILD_TEXTUAL: Set<ChannelType>;
/** Guild voice and stage channels. */
GUILD_VOCAL: Set<ChannelType>;
/** Thread types that support voice. */
VOCAL_THREAD: Set<ChannelType>;
/** All channels with voice capability. */
VOCAL: Set<ChannelType>;
/** Channels that support voice effects. */
VOICE_EFFECTS: Set<ChannelType>;
/** Guild text-only channels (no voice). */
GUILD_TEXT_ONLY: Set<ChannelType>;
/** Channels with character-limited names. */
LIMITED_CHANNEL_NAME: Set<ChannelType>;
/** Channels that support message search. */
SEARCHABLE: Set<ChannelType>;
/** Guild channels with user-generated content. */
GUILD_USER_CONTENT: Set<ChannelType>;
/** Guild channels that can have topics. */
GUILD_TOPICAL: Set<ChannelType>;
/** Guild channels that support webhooks. */
GUILD_WEBHOOKS: Set<ChannelType>;
/** Guild channels usable as system message channel. */
GUILD_SYSTEM_CHANNEL: Set<ChannelType>;
/** Guild channels that can have a parent category. */
GUILD_PARENTABLE: Set<ChannelType>;
/** Guild channels subject to auto-moderation. */
GUILD_AUTO_MODERATED: Set<ChannelType>;
/** Basic guild channel types for creation. */
GUILD_BASIC: Set<ChannelType>;
/** Guild channel types that can be created. */
CREATEABLE_GUILD_CHANNELS: Set<ChannelType>;
/** GROUP_DM only, multi-user DMs. */
MULTI_USER_DMS: Set<ChannelType>;
/** DM and GROUP_DM. */
ALL_DMS: Set<ChannelType>;
/** Channels that support invites. */
INVITABLE: Set<ChannelType>;
/** Guild channels supporting feed-featurable messages. */
GUILD_FEED_FEATURABLE_MESSAGES: Set<ChannelType>;
/** Channels supporting role subscriptions. */
ROLE_SUBSCRIPTIONS: Set<ChannelType>;
/** Channels supporting icon emojis. */
ICON_EMOJIS: Set<ChannelType>;
/** Channels that can be summarized. */
SUMMARIZEABLE: Set<ChannelType>;
/** Channels supporting content entry embeds. */
CONTENT_ENTRY_EMBEDS: Set<ChannelType>;
/** Channels that support polls. */
POLLS: Set<ChannelType>;
/** Channels that can launch activities. */
ACTIVITY_LAUNCHABLE: Set<ChannelType>;
/** All known channel types. */
ALL: Set<ChannelType>;
}
35 changes: 34 additions & 1 deletion packages/discord-types/enums/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,45 @@ export const enum ApplicationCommandInputType {
}

export const enum ApplicationCommandType {
/**
* @remarks Discord API calls this just CHAT
*/
CHAT_INPUT = 1,
USER = 2,
MESSAGE = 3,
PRIMARY_ENTRY_POINT = 4,
}

export const enum ApplicationIntegrationType {
GUILD_INSTALL = 0,
USER_INSTALL = 1
USER_INSTALL = 1,
}

export const enum InteractionType {
APPLICATION_COMMAND = 2,
MESSAGE_COMPONENT = 3,
APPLICATION_COMMAND_AUTOCOMPLETE = 4,
MODAL_SUBMIT = 5,
}

export const enum ApplicationCommandSectionType {
BUILT_IN = 0,
APPLICATION = 1,
}

export const enum ApplicationCommandPermissionType {
ROLE = 1,
USER = 2,
CHANNEL = 3,
}

export const enum InteractionContextType {
GUILD = 0,
BOT_DM = 1,
PRIVATE_CHANNEL = 2,
}

export const enum ApplicationCommandHandlerType {
APP_HANDLER = 1,
DISCORD_LAUNCH_ACTIVITY = 2,
}
103 changes: 103 additions & 0 deletions packages/discord-types/enums/guild.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
export const enum GuildScheduledEventStatus {
SCHEDULED = 1,
ACTIVE = 2,
COMPLETED = 3,
CANCELED = 4,
}

export const enum GuildScheduledEventEntityType {
NONE = 0,
STAGE_INSTANCE = 1,
VOICE = 2,
EXTERNAL = 3,
PRIME_TIME = 4,
}

export const enum GuildScheduledEventPrivacyLevel {
PUBLIC = 1,
GUILD_ONLY = 2,
}

export const enum GuildNSFWLevel {
DEFAULT = 0,
EXPLICIT = 1,
SAFE = 2,
AGE_RESTRICTED = 3,
}

export const enum GuildVerificationLevel {
NONE = 0,
LOW = 1,
MEDIUM = 2,
HIGH = 3,
VERY_HIGH = 4,
}

export const enum GuildExplicitContentFilter {
DISABLED = 0,
MEMBERS_WITHOUT_ROLES = 1,
ALL_MEMBERS = 2,
}

export const enum GuildMFALevel {
NONE = 0,
ELEVATED = 1,
}

export const enum GuildDefaultMessageNotifications {
ALL_MESSAGES = 0,
ONLY_MENTIONS = 1,
}

export const enum GuildPremiumTier {
NONE = 0,
TIER_1 = 1,
TIER_2 = 2,
TIER_3 = 3,
}

export const enum GuildSettingsFlags {
UNREADS_ALL_MESSAGES = 2048,
UNREADS_ONLY_MENTIONS = 4096,
OPT_IN_CHANNELS_OFF = 8192,
OPT_IN_CHANNELS_ON = 16384,
}

export const enum SystemChannelFlags {
SUPPRESS_JOIN_NOTIFICATIONS = 1,
SUPPRESS_PREMIUM_SUBSCRIPTIONS = 2,
SUPPRESS_GUILD_REMINDER_NOTIFICATIONS = 4,
SUPPRESS_JOIN_NOTIFICATION_REPLIES = 8,
SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATIONS = 16,
SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATION_REPLIES = 32,
SUPPRESS_CHANNEL_PROMPT_DEADCHAT = 128,
SUPPRESS_UGC_ADDED_NOTIFICATIONS = 256,
}

export const enum GuildMemberFlags {
DID_REJOIN = 1,
COMPLETED_ONBOARDING = 2,
BYPASSES_VERIFICATION = 4,
STARTED_ONBOARDING = 8,
IS_GUEST = 16,
STARTED_HOME_ACTIONS = 32,
COMPLETED_HOME_ACTIONS = 64,
AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME = 128,
AUTOMOD_QUARANTINED_BIO = 256,
DM_SETTINGS_UPSELL_ACKNOWLEDGED = 512,
AUTOMOD_QUARANTINED_SERVER_TAG = 1024,
}

export const enum RoleFlags {
IN_PROMPT = 1,
}

export const enum RecurrenceRuleFrequency {
YEARLY = 0,
MONTHLY = 1,
WEEKLY = 2,
DAILY = 3,
HOURLY = 4,
MINUTELY = 5,
SECONDLY = 6,
}
Loading
Loading