Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

discord-typings

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-typings - npm Package Compare versions

Comparing version 10.3.0 to 10.4.0

33

Interactions/ApplicationCommands.d.ts

@@ -197,34 +197,1 @@ import { Snowflake, Locale } from "../Reference";

export type ApplicationCommandPermissionType = 1 | 2;
type ApplicationCommandInteractionDataOptionBase = {
name: string;
focused?: boolean;
}
export interface ApplicationCommandInteractionDataOptionAsTypeString extends ApplicationCommandInteractionDataOptionBase {
type: 3;
value: string;
}
export interface ApplicationCommandInteractionDataOptionAsTypeNumber extends ApplicationCommandInteractionDataOptionBase {
type: 4 | 10;
value: number;
}
export interface ApplicationCommandInteractionDataOptionAsTypeSub extends ApplicationCommandInteractionDataOptionBase {
type: 1 | 2;
options: Array<ApplicationCommandInteractionDataOptionSub>;
}
export interface ApplicationCommandInteractionDataOptionAsTypeBoolean extends ApplicationCommandInteractionDataOptionBase {
type: 5;
value: boolean;
}
export interface ApplicationCommandInteractionDataOptionNotTypeNarrowed extends ApplicationCommandInteractionDataOptionBase {
type: Exclude<ApplicationCommandOptionType, 1 | 2 | 3 | 4 | 5 | 10>;
}
export type ApplicationCommandInteractionDataOptionSub = ApplicationCommandInteractionDataOptionAsTypeString | ApplicationCommandInteractionDataOptionAsTypeNumber | ApplicationCommandInteractionDataOptionAsTypeBoolean | ApplicationCommandInteractionDataOptionNotTypeNarrowed;
export type ApplicationCommandInteractionDataOption = ApplicationCommandInteractionDataOptionAsTypeString | ApplicationCommandInteractionDataOptionAsTypeNumber | ApplicationCommandInteractionDataOptionAsTypeBoolean | ApplicationCommandInteractionDataOptionAsTypeSub | ApplicationCommandInteractionDataOptionNotTypeNarrowed;

35

Interactions/ReceivingAndResponding.d.ts

@@ -36,3 +36,3 @@ import { Snowflake } from "../Reference";

resolved?: ResolvedData;
options?: Array<import("./ApplicationCommands").ApplicationCommandInteractionDataOption>;
options?: Array<ApplicationCommandInteractionDataOption>;
guild_id?: Snowflake;

@@ -117,1 +117,34 @@ custom_id?: string;

export type InteractionCallbackData = MessageInteractionCallbackData | AutocompleteInteractionCallbackData | ModalInteractionCallbackData;
type ApplicationCommandInteractionDataOptionBase = {
name: string;
focused?: boolean;
}
export interface ApplicationCommandInteractionDataOptionAsTypeString extends ApplicationCommandInteractionDataOptionBase {
type: 3;
value: string;
}
export interface ApplicationCommandInteractionDataOptionAsTypeNumber extends ApplicationCommandInteractionDataOptionBase {
type: 4 | 10;
value: number;
}
export interface ApplicationCommandInteractionDataOptionAsTypeSub extends ApplicationCommandInteractionDataOptionBase {
type: 1 | 2;
options: Array<ApplicationCommandInteractionDataOptionSub>;
}
export interface ApplicationCommandInteractionDataOptionAsTypeBoolean extends ApplicationCommandInteractionDataOptionBase {
type: 5;
value: boolean;
}
export interface ApplicationCommandInteractionDataOptionNotTypeNarrowed extends ApplicationCommandInteractionDataOptionBase {
type: Exclude<import("./ApplicationCommands").ApplicationCommandOptionType, 1 | 2 | 3 | 4 | 5 | 10>;
}
export type ApplicationCommandInteractionDataOptionSub = ApplicationCommandInteractionDataOptionAsTypeString | ApplicationCommandInteractionDataOptionAsTypeNumber | ApplicationCommandInteractionDataOptionAsTypeBoolean | ApplicationCommandInteractionDataOptionNotTypeNarrowed;
export type ApplicationCommandInteractionDataOption = ApplicationCommandInteractionDataOptionAsTypeString | ApplicationCommandInteractionDataOptionAsTypeNumber | ApplicationCommandInteractionDataOptionAsTypeBoolean | ApplicationCommandInteractionDataOptionAsTypeSub | ApplicationCommandInteractionDataOptionNotTypeNarrowed;
{
"name": "discord-typings",
"version": "10.3.0",
"version": "10.4.0",
"description": "Typings for data returned by Discord (unofficial)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,2 +7,3 @@ import { Snowflake } from "../Reference";

export type AuditLog = {
application_commands: Array<import("../Interactions/ApplicationCommands").ApplicationCommand>
audit_log_entries: Array<AuditLogEntry>;

@@ -43,3 +44,3 @@ guild_scheduled_event: Array<import("./GuildScheduledEvent").GuildScheduledEvent>;

*/
export type AuditLogEvent = 1 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | 40 | 41 | 42 | 50 | 51 | 52 | 60 | 61 | 62 | 72 | 73 | 74 | 75 | 80 | 81 | 82 | 83 | 84 | 85 | 90 | 91 | 92 | 100 | 101 | 102 | 110 | 111 | 112 | 121;
export type AuditLogEvent = 1 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | 40 | 41 | 42 | 50 | 51 | 52 | 60 | 61 | 62 | 72 | 73 | 74 | 75 | 80 | 81 | 82 | 83 | 84 | 85 | 90 | 91 | 92 | 100 | 101 | 102 | 110 | 111 | 112 | 121 | 140 | 141 | 142 | 143 | 144 | 145;

@@ -50,2 +51,5 @@ /**

export type OptionalAuditEntryInfo = {
application_id?: string;
auto_moderation_rule_name?: string;
auto_moderation_rule_trigger_type?: string;
channel_id?: Snowflake;

@@ -52,0 +56,0 @@ count?: string;

@@ -36,2 +36,3 @@ import { Snowflake } from "../Reference";

rate_limit_per_user: number;
default_thread_rate_limit_per_user?: number;
}

@@ -75,5 +76,6 @@

*/
export interface NewsChannel extends TextBasedChannel, GuildBasedChannel {
export interface AnnouncementChannel extends TextBasedChannel, GuildBasedChannel {
type: 5;
topic: string | null;
default_thread_rate_limit_per_user?: number;
}

@@ -97,3 +99,3 @@

*/
export interface NewsThread extends ThreadBasedChannel {
export interface AnnouncementThread extends ThreadBasedChannel {
type: 10;

@@ -134,2 +136,7 @@ }

type: 15;
available_tags?: Array<ForumTag>;
applied_tags?: Array<Snowflake>;
default_reaction_emoji?: DefaultReaction | null;
default_thread_rate_limit_per_user?: number;
default_sort_order?: ThreadSortOrder | null;
}

@@ -140,3 +147,3 @@

*/
export type Channel = TextChannel | DMChannel | VoiceChannel | CategoryChannel | NewsChannel | NewsThread | PublicThread | PrivateThread | StageChannel | DirectoryChannel | ForumChannel;
export type Channel = TextChannel | DMChannel | VoiceChannel | CategoryChannel | AnnouncementChannel | AnnouncementThread | PublicThread | PrivateThread | StageChannel | DirectoryChannel | ForumChannel;

@@ -146,5 +153,5 @@ /**

*/
export type GuildChannel = Exclude<Channel, DMChannel | NewsThread | PublicThread | PrivateThread>;
export type GuildChannel = Exclude<Channel, DMChannel | AnnouncementThread | PublicThread | PrivateThread>;
export type ThreadChannel = NewsThread | PublicThread | PrivateThread;
export type ThreadChannel = AnnouncementThread | PublicThread | PrivateThread;

@@ -224,3 +231,3 @@ /**

interaction?: import("../Interactions/ReceivingAndResponding").MessageInteraction;
thread?: NewsThread | PublicThread | PrivateThread;
thread?: AnnouncementThread | PublicThread | PrivateThread;
components?: Array<import("../Interactions/MessageComponents").ActionRow>;

@@ -396,1 +403,25 @@ sticker_items?: Array<import("./Sticker").StickerItem>;

}
/**
* https://discord.com/developers/docs/resources/channel#default-reaction-object
*/
export type DefaultReaction = {
emoji_id: Snowflake | null;
emoji_name: string | null;
}
/**
* https://discord.com/developers/docs/resources/channel#forum-tag-object
*/
export type ForumTag = {
id: Snowflake;
name: string;
moderated: boolean;
emoji_id: Snowflake;
emoji_name: string | null;
}
/**
* https://discord.com/developers/docs/resources/channel#channel-object-sort-order-types
*/
export type ThreadSortOrder = 0 | 1;

@@ -78,4 +78,6 @@ import { Snowflake } from "../Reference";

*/
export type GuildFeature = "ANIMATION_BANNER" | "ANIMATED_ICON" | "AUTO_MODERATION" | "BANNER" | "COMMUNITY" | "DISCOVERABLE" | "FEATURABLE" | "INVITE_SPLASH" | "MEMBER_VERIFICATION_GATE_ENABLED" | "MONETIZATION_ENABLED" | "MORE_STICKERS" | "NEWS" | "PARTNERED" | "PREVIEW_ENABLED" | "PRIVATE_THREADS" | "ROLE_ICONS" | "SEVEN_DAY_THREAD_ARCHIVE" | "THREE_DAY_THREAD_ARCHIVE" | "TICKETED_EVENTS_ENABLED" | "VANITY_URL" | "VERIFIED" | "VIP_REGIONS" | "WELCOME_SCREEN_ENABLED";
export type GuildFeature = "ANIMATION_BANNER" | "ANIMATED_ICON" | "AUTO_MODERATION" | "BANNER" | "COMMUNITY" | "DISCOVERABLE" | "FEATURABLE" | "INVITES_DISABLED" | "INVITE_SPLASH" | "MEMBER_VERIFICATION_GATE_ENABLED" | "MONETIZATION_ENABLED" | "MORE_STICKERS" | "NEWS" | "PARTNERED" | "PREVIEW_ENABLED" | "PRIVATE_THREADS" | "ROLE_ICONS" | "SEVEN_DAY_THREAD_ARCHIVE" | "THREE_DAY_THREAD_ARCHIVE" | "TICKETED_EVENTS_ENABLED" | "VANITY_URL" | "VERIFIED" | "VIP_REGIONS" | "WELCOME_SCREEN_ENABLED";
export type MutableGuildFeature = Extract<GuildFeature, "COMMUNITY" | "INVITES_DISABLED" | "DISCOVERABLE">
/**

@@ -175,2 +177,3 @@ * https://discord.com/developers/docs/resources/guild#guild-object-mfa-level

application?: IntegrationApplication;
scopes?: Array<import("../Topics/OAuth2").OAuth2Scope>;
}

@@ -177,0 +180,0 @@

@@ -41,2 +41,3 @@ import { Snowflake } from "../Reference";

show_activity: boolean;
two_way_link: boolean;
visibility: Visibility;

@@ -49,2 +50,3 @@ }

export type ConnectionService = "battlenet"
| "ebay"
| "epicgames"

@@ -54,5 +56,6 @@ | "facebook"

| "leagueoflegends"
| "paypal"
| "playstation"
| "reddit"
| "samsunggalaxy"
| "riotgames"
| "spotify"

@@ -59,0 +62,0 @@ | "skype"

@@ -17,3 +17,3 @@ import { Snowflake } from "../Reference";

source_guild?: import("./Guild").Guild;
source_channel?: import("./Channel").TextChannel | import("./Channel").NewsChannel;
source_channel?: import("./Channel").TextChannel | import("./Channel").AnnouncementChannel;
url?: string;

@@ -20,0 +20,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc