discord-typings
Advanced tools
Comparing version 9.0.4 to 9.0.5
652
index.d.ts
export type Snowflake = string; | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#message-delete | ||
*/ | ||
export type MessageDeleteData = { | ||
id: Snowflake; | ||
guild_id?: Snowflake; | ||
channel_id: Snowflake; | ||
id: Snowflake; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#message-reaction-add | ||
*/ | ||
export type MessageReactionAddData = { | ||
user_id: Snowflake; | ||
channel_id: Snowflake; | ||
message_id: Snowflake; | ||
guild_id?: Snowflake; | ||
channel_id: Snowflake; | ||
member: MemberData & { user: UserData }; | ||
emoji: ReactionEmojiData; | ||
member: MemberData & { user: UserData }; | ||
message_id: Snowflake; | ||
user_id: Snowflake; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove | ||
*/ | ||
export type MessageReactionRemoveData = { | ||
guild_id?: Snowflake; | ||
user_id: Snowflake; | ||
channel_id: Snowflake; | ||
emoji: { | ||
id: Snowflake | null; | ||
name: string; | ||
animated?: boolean; | ||
}; | ||
message_id: Snowflake; | ||
user_id: Snowflake; | ||
guild_id?: Snowflake; | ||
emoji: ReactionEmojiData; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all | ||
*/ | ||
export type MessageReactionRemoveAllData = { | ||
guild_id: Snowflake; | ||
channel_id: Snowflake; | ||
message_id: Snowflake; | ||
guild_id?: Snowflake; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#guild-emojis-update | ||
*/ | ||
export type GuildEmojisUpdateData = { | ||
guild_id: Snowflake; | ||
emojis: Array<EmojiData>; | ||
guild_id: Snowflake; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/resources/voice#voice-state-object | ||
*/ | ||
export type VoiceStateData = { | ||
channel_id?: Snowflake; | ||
guild_id?: Snowflake; | ||
channel_id: Snowflake | null; | ||
user_id: Snowflake; | ||
member?: MemberData & { user: UserData }; | ||
session_id: string; | ||
deaf: boolean; | ||
guild_id?: Snowflake; | ||
mute: boolean; | ||
@@ -50,30 +73,49 @@ self_deaf: boolean; | ||
self_stream?: boolean; | ||
session_id: string; | ||
suppress: boolean; | ||
user_id: Snowflake; | ||
member?: MemberData & { user: UserData } | null; | ||
request_to_speak_timestamp: string | null; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#channel-pins-update | ||
*/ | ||
export type ChannelPinData = { | ||
guild_id?: Snowflake; | ||
channel_id: Snowflake; | ||
last_pin_timestamp: string; | ||
last_pin_timestamp: string | null; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#ready | ||
*/ | ||
export type ReadyData = { | ||
user: UserData; | ||
guilds: Array<{ id: string, unavailable: boolean }>; | ||
session_id: string; | ||
shard?: Array<number>; | ||
application: { flags: number, id: string }; | ||
_trace: Array<string>; | ||
application: { flags: number, id: string }; | ||
guilds: Array<{ id: string, unavailable: boolean }>; | ||
private_channels: Array<any>; | ||
presences: Array<PresenceData>; | ||
private_channels: Array<any>; | ||
relationships: Array<any>; | ||
session_id: string; | ||
shard: Array<number>; | ||
user: UserData; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#resume | ||
*/ | ||
export type ResumeData = { | ||
token: string; | ||
session_id: string; | ||
seq: number; | ||
_trace: Array<string>; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#thread-list-sync | ||
*/ | ||
export type ThreadListSyncData = { | ||
@@ -86,2 +128,6 @@ guild_id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#thread-members-update | ||
*/ | ||
export type ThreadMembersUpdateData = { | ||
@@ -95,2 +141,6 @@ id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/resources/channel#thread-member-object | ||
*/ | ||
export type ThreadMemberData = { | ||
@@ -103,36 +153,47 @@ id?: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/resources/channel#message-object | ||
*/ | ||
export type MessageData = { | ||
id: Snowflake; | ||
channel_id: Snowflake; | ||
guild_id?: Snowflake; | ||
attachments: Array<AttachmentData>; | ||
author: UserData; | ||
channel_id: Snowflake; | ||
content?: string; | ||
edited_timestamp?: string; | ||
embeds: Array<EmbedData>; | ||
flags: number; | ||
id: Snowflake; | ||
member?: MemberData; | ||
content: string; | ||
timestamp: string; | ||
edited_timestamp: string | null; | ||
tts: boolean; | ||
mention_everyone: boolean; | ||
mentions: Array<UserData & { member: MemberData }>; | ||
mention_roles: Array<Snowflake>; | ||
mentions: Array<UserData & { member: MemberData }>; | ||
mention_channels?: Array<ChannelMentionData>; | ||
nonce: Snowflake; | ||
attachments: Array<AttachmentData>; | ||
embeds: Array<EmbedData>; | ||
reactions?: Array<ReactionData>; | ||
nonce: number | string; | ||
pinned: boolean; | ||
timestamp: string; | ||
tts: boolean; | ||
type: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22; | ||
webhook_id?: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/resources/channel#message-object-message-types | ||
*/ | ||
type: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 ; | ||
activity?: MessageActivityData; | ||
application?: ApplicationData; | ||
application_id?: Snowflake; | ||
message_reference?: MessageReferenceData | null; | ||
flags?: number; | ||
referenced_message?: MessageData | null; | ||
interaction?: MessageInteractionData; | ||
thread?: ThreadChannelData; | ||
components?: Array<MessageComponentData>; | ||
sticker_items?: Array<StickerItemData>; | ||
stickers?: Array<StickerData>; | ||
message_reference?: MessageReferenceData; | ||
referenced_message?: MessageData | null; | ||
reactions?: Array<ReactionData>; | ||
application_id?: Snowflake; | ||
interaction?: MessageInteractionData; | ||
components?: Array<MessageComponentData>; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object-message-interaction-structure | ||
*/ | ||
export type MessageInteractionData = { | ||
@@ -145,22 +206,31 @@ id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/resources/guild#guild-member-object | ||
*/ | ||
export type MemberData = { | ||
user?: UserData; | ||
nick?: string | null; | ||
avatar?: string | null; | ||
roles: Array<Snowflake>; | ||
joined_at: string; | ||
premium_since?: string | null; | ||
deaf: boolean; | ||
hoisted_role: Snowflake; | ||
joined_at: string; | ||
mute: boolean; | ||
nick: string | null; | ||
premium_since?: string; | ||
roles: Array<Snowflake>; | ||
avatar?: string | null; | ||
pending?: boolean; | ||
permissions?: string; | ||
communication_disabled_until?: string | null; | ||
hoisted_role: Snowflake; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/resources/user#user-object | ||
*/ | ||
export type UserData = { | ||
avatar: string | null; | ||
discriminator: string; | ||
id: Snowflake; | ||
public_flags?: number; | ||
username: string; | ||
discriminator: string; | ||
avatar: string | null; | ||
bot?: boolean; | ||
@@ -173,30 +243,25 @@ system?: boolean; | ||
verified?: boolean; | ||
email?: string | null | ||
premium_type?: number; | ||
public_flags?: number; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/resources/channel#embed-object | ||
*/ | ||
export type EmbedData = { | ||
author?: { | ||
url?: string; | ||
icon_url?: string; | ||
iconURL?: string; | ||
name?: string; | ||
proxy_icon_url?: string; | ||
proxyIconURL?: string; | ||
}; | ||
color?: number; | ||
description?: string; | ||
timestamp?: string; | ||
title?: string; | ||
type?: "rich" | "image" | "video" | "gifv" | "article" | "link"; | ||
description?: string; | ||
url?: string; | ||
icon_url?: string; | ||
name?: string; | ||
fields?: Array<{ name: string; value: string; inline?: boolean }>; | ||
timestamp?: string; | ||
color?: number; | ||
footer?: { | ||
text?: string; | ||
text: string; | ||
icon_url?: string; | ||
proxy_icon_url?: string; | ||
} | ||
thumbnail?: { | ||
url?: string; | ||
image?: { | ||
url: string; | ||
proxy_url?: string; | ||
@@ -206,4 +271,4 @@ height?: number; | ||
}; | ||
image?: { | ||
url?: string; | ||
thumbnail?: { | ||
url: string; | ||
proxy_url?: string; | ||
@@ -223,67 +288,91 @@ height?: number; | ||
}; | ||
author?: { | ||
name: string; | ||
url?: string; | ||
icon_url?: string; | ||
proxy_icon_url?: string; | ||
}; | ||
fields?: Array<{ name: string; value: string; inline?: boolean }>; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/resources/channel#attachment-object | ||
*/ | ||
export type AttachmentData = { | ||
id: Snowflake; | ||
filename: string; | ||
height?: number | null; | ||
id: Snowflake; | ||
proxy_url: string; | ||
description?: string; | ||
content_type?: string; | ||
size: number; | ||
url: string; | ||
proxy_url: string; | ||
height?: number | null; | ||
width?: number | null; | ||
content_type?: string; | ||
ephemeral?: boolean; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/resources/guild#guild-object | ||
*/ | ||
export type GuildData = { | ||
id: Snowflake; | ||
name: string; | ||
icon: string | null; | ||
icon_hash?: string | null; | ||
splash: string | null; | ||
discovery_splash: string | null; | ||
owner?: boolean; | ||
owner_id: Snowflake; | ||
permissions?: string; | ||
region?: string | null; | ||
afk_channel_id: Snowflake; | ||
afk_timeout: number; | ||
widget_enabled?: boolean; | ||
widget_channel_id?: Snowflake | null; | ||
verification_level: 0 | 1 | 2 | 3 | 4; | ||
default_message_notifications: 0 | 1; | ||
explicit_content_filter: 0 | 1 | 2; | ||
roles: Array<RoleData>; | ||
default_message_notifications: 0 | 1; | ||
rules_channel_id?: Snowflake; | ||
max_video_channel_users?: number; | ||
emojis: Array<EmojiData>; | ||
owner_id: Snowflake; | ||
discovery_splash: string | null; | ||
preferred_locale: string; | ||
features: Array<GuildFeature>; | ||
mfa_level: 0 | 1; | ||
application_id: Snowflake | null; | ||
system_channel_id: Snowflake | null; | ||
system_channel_flags: number; | ||
rules_channel_id: Snowflake | null; | ||
joined_at?: string; | ||
large?: boolean; | ||
unavailable?: boolean; | ||
member_count?: number; | ||
voice_states?: Array<VoiceStateData>; | ||
members?: Array<MemberData & { user: UserData }>; | ||
icon: string | null; | ||
channels?: Array<TextChannelData | VoiceChannelData | StageChannelData | CategoryChannelData | NewsChannelData | StoreChannelData>; | ||
threads?: Array<ThreadChannelData>; | ||
presences?: Array<PresenceData>; | ||
max_presences?: number | null; | ||
max_members?: number; | ||
vanity_url_code: string | null; | ||
description: string | null; | ||
banner: string | null; | ||
premium_tier: number; | ||
permissions?: string; | ||
features: Array<GuildFeature>; | ||
presences?: Array<PresenceData>; | ||
max_presences?: number; | ||
verification_level: 0 | 1 | 2 | 3 | 4; | ||
voice_states?: Array<VoiceStateData>; | ||
application_id?: Snowflake; | ||
vanity_url_code: string | null; | ||
premium_subscription_count?: number; | ||
name: string; | ||
channels?: Array<TextChannelData | VoiceChannelData | StageChannelData | CategoryChannelData | NewsChannelData | StoreChannelData>; | ||
threads?: Array<ThreadChannelData>; | ||
joined_at?: string; | ||
unavailable?: boolean; | ||
preferred_locale: string; | ||
public_updates_channel_id: Snowflake | null; | ||
mfa_level: 0 | 1; | ||
explicit_content_filter: number; | ||
system_channel_id?: Snowflake; | ||
afk_timeout: number; | ||
member_count?: number; | ||
splash: string | null; | ||
system_channel_flags: number; | ||
region?: string; | ||
description: string | null; | ||
large?: boolean; | ||
afk_channel_id?: Snowflake; | ||
id: Snowflake; | ||
widget_enabled?: boolean; | ||
widget_channel_id?: Snowflake; | ||
max_video_channel_users?: number; | ||
approximate_member_count?: number; | ||
approximate_presence_count?: number; | ||
welcome_screen?: WelcomeScreenData; | ||
nsfw: boolean; | ||
owner?: boolean; | ||
max_members?: number; | ||
nsfw_level: 0 | 1 | 2 | 3; | ||
stage_instances?: Array<StageInstanceData>; | ||
stickers?: Array<StickerData>; | ||
guild_scheduled_events?: Array<GuildScheduleEventData>; | ||
premium_progress_bar_enabled: boolean; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/resources/stage-instance#stage-instance-object | ||
*/ | ||
export type StageInstanceData = { | ||
@@ -294,6 +383,16 @@ id: Snowflake; | ||
topic: string; | ||
privacy_level: 1 | 2; | ||
discoverable_disabled: boolean; | ||
} | ||
export type GuildFeature = "ANIMATED_ICON" | "BANNER" | "COMMERCE" | "COMMUNITY" | "DISCOVERABLE" | "FEATURABLE" | "INVITE_SPLASH" | "MEMBER_VERIFICATION_GATE_ENABLED" | "MONITIZATION_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"; | ||
/* | ||
* https://discord.com/developers/docs/resources/guild#guild-object-guild-features | ||
*/ | ||
export type GuildFeature = "ANIMATED_ICON" | "BANNER" | "COMMERCE" | "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"; | ||
/* | ||
* https://discord.com/developers/docs/resources/guild#welcome-screen-object | ||
*/ | ||
export type WelcomeScreenData = { | ||
@@ -306,3 +405,3 @@ description: string | null; | ||
channel_id: Snowflake; | ||
description?: string; | ||
description: string; | ||
emoji_id: Snowflake | null; | ||
@@ -312,13 +411,17 @@ emoji_name: string | null; | ||
/* | ||
* https://discord.com/developers/docs/topics/permissions#role-object | ||
*/ | ||
export type RoleData = { | ||
id: Snowflake; | ||
name: string; | ||
color: number; | ||
hoist: boolean; | ||
id: Snowflake; | ||
icon?: string | null; | ||
unicode_emoji?: string | null; | ||
position: number; | ||
permissions: string; | ||
managed: boolean; | ||
mentionable: boolean; | ||
name: string; | ||
permissions: string; | ||
position: number; | ||
icon: string | null; | ||
unicode_emoji: string | null; | ||
tags?: RoleTags; | ||
@@ -333,19 +436,28 @@ } | ||
/* | ||
* https://discord.com/developers/docs/resources/emoji#emoji-object | ||
*/ | ||
export type EmojiData = { | ||
animated?: boolean; | ||
available?: boolean; | ||
id: Snowflake | null; | ||
managed?: boolean; | ||
name: string; | ||
require_colons?: boolean; | ||
name: string | null; | ||
roles?: Array<Snowflake>; | ||
user?: UserData; | ||
require_colons?: boolean; | ||
managed?: boolean; | ||
animated?: boolean; | ||
available?: boolean; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#presence-update-presence-update-event-fields | ||
*/ | ||
export type PresenceData = { | ||
user: UserData; | ||
roles: Array<Snowflake>; | ||
user: UserData & { id: Snowflake }; | ||
guild_id: Snowflake; | ||
status: string; | ||
activities: Array<ActivityData>; | ||
client_status: ClientStatusData; | ||
premium_since?: string; | ||
@@ -355,6 +467,10 @@ nick?: string; | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#activity-object | ||
*/ | ||
export type ActivityData = { | ||
name: string; | ||
type: number; | ||
url?: string; | ||
url?: string | null; | ||
created_at: number; | ||
@@ -368,3 +484,3 @@ timestamps?: { | ||
state?: string | null; | ||
emoji?: ReactionEmojiData; | ||
emoji?: ReactionEmojiData | null; | ||
party?: { | ||
@@ -390,6 +506,10 @@ id?: string; | ||
/* | ||
* https://discord.com/developers/docs/resources/channel#channel-object | ||
*/ | ||
export interface ChannelData { | ||
id: Snowflake; | ||
name: string; | ||
type: ChannelType; | ||
name?: string; | ||
} | ||
@@ -401,3 +521,3 @@ | ||
last_message_id: Snowflake | null; | ||
last_pin_timestamp?: string; | ||
last_pin_timestamp?: string | null; | ||
} | ||
@@ -407,3 +527,3 @@ | ||
rate_limit_per_user: number; | ||
topic?: string; | ||
topic?: string | null; | ||
nsfw: boolean; | ||
@@ -415,3 +535,3 @@ type: 0; | ||
rate_limit_per_user: number; | ||
topic?: string; | ||
topic?: string | null; | ||
nsfw: boolean; | ||
@@ -426,9 +546,14 @@ owner_id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/resources/channel#thread-metadata-object | ||
*/ | ||
export interface ThreadMetaData { | ||
archived: boolean; | ||
auto_archive_duration: number; | ||
archive_timestamp: string; | ||
archiver_id?: Snowflake; | ||
auto_archive_duration: number; | ||
locked: boolean; | ||
invitable?: boolean; | ||
archiver_id?: Snowflake; | ||
} | ||
@@ -477,2 +602,6 @@ | ||
/* | ||
* https://discord.com/developers/docs/resources/channel#overwrite-object | ||
*/ | ||
export type PermissionOverwriteData = { | ||
@@ -485,2 +614,6 @@ id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/resources/application#application-resource | ||
*/ | ||
export type ApplicationData = { | ||
@@ -500,14 +633,18 @@ id: Snowflake; | ||
team: TeamData | null; | ||
guild_id: Snowflake | null; | ||
guild_id?: Snowflake; | ||
primary_sku_id?: Snowflake; | ||
slug?: string; | ||
cover_image?: string; | ||
flags: number; | ||
flags?: number; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/topics/teams#data-models-team-object | ||
*/ | ||
export type TeamData = { | ||
icon: string | null; | ||
id: Snowflake; | ||
members: Array<TeamMemberData>; | ||
name: string; | ||
members: Array<TeamMemberData>; | ||
owner_user_id: Snowflake; | ||
@@ -523,2 +660,6 @@ } | ||
/* | ||
* https://discord.com/developers/docs/resources/sticker#sticker-item-object | ||
*/ | ||
export type StickerItemData = { | ||
@@ -530,2 +671,6 @@ id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/resources/sticker#sticker-resource | ||
*/ | ||
export type StickerData = { | ||
@@ -549,2 +694,6 @@ id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/resources/channel#message-reference-object | ||
*/ | ||
export type MessageReferenceData = { | ||
@@ -557,2 +706,6 @@ message_id?: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure | ||
*/ | ||
export type MessageActivityData = { | ||
@@ -563,2 +716,6 @@ type: 1 | 2 | 3 | 5; | ||
/* | ||
* https://discord.com/developers/docs/resources/channel#channel-mention-object | ||
*/ | ||
export type ChannelMentionData = { | ||
@@ -571,2 +728,6 @@ id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/resources/channel#reaction-object | ||
*/ | ||
export type ReactionData = { | ||
@@ -578,6 +739,10 @@ count: number; | ||
/* | ||
* https://discord.com/developers/docs/resources/invite#invite-resource | ||
*/ | ||
export type InviteData = { | ||
code: string; | ||
guild?: Partial<GuildData>; | ||
channel: GuildChannelData; | ||
channel: GuildChannelData | null ; | ||
inviter?: UserData; | ||
@@ -590,4 +755,10 @@ target_type?: 1 | 2; | ||
expires_at?: string | null; | ||
stage_instance?: InviteStageInstanceData; | ||
guild_scheduled_event: GuildScheduleEventData; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#guild-delete | ||
*/ | ||
export type GuildDeleteData = { | ||
@@ -598,2 +769,6 @@ id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#guild-ban-add-guild-ban-add-event-fields | ||
*/ | ||
export type GuildBanAddData = { | ||
@@ -604,2 +779,6 @@ guild_id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#guild-ban-remove-guild-ban-remove-event-fields | ||
*/ | ||
export type GuildBanRemoveData = { | ||
@@ -610,2 +789,6 @@ guild_id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#guild-member-remove-guild-member-remove-event-fields | ||
*/ | ||
export type GuildMemberRemoveData = { | ||
@@ -616,2 +799,6 @@ guild_id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#guild-members-chunk-guild-members-chunk-event-fields | ||
*/ | ||
export type GuildMembersChunkData = { | ||
@@ -627,2 +814,6 @@ guild_id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#invite-create-invite-create-event-fields | ||
*/ | ||
export type InviteCreateData = { | ||
@@ -638,2 +829,3 @@ channel_id: Snowflake; | ||
target_user?: UserData; | ||
target_application: ApplicationData; | ||
temporary: boolean; | ||
@@ -643,2 +835,6 @@ uses: number; | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#invite-delete | ||
*/ | ||
export type InviteDeleteData = { | ||
@@ -650,2 +846,6 @@ channel_id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#message-delete-bulk | ||
*/ | ||
export type MessageBulkDeleteData = { | ||
@@ -657,9 +857,18 @@ ids: Array<Snowflake>; | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-message-reaction-remove-event-fields | ||
*/ | ||
export type MessageReactionRemoveEmojiData = { | ||
user_id: Snowflake; | ||
channel_id: Snowflake; | ||
message_id: Snowflake; | ||
guild_id?: Snowflake; | ||
message_id: Snowflake; | ||
emoji: ReactionEmojiData; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/resources/emoji#emoji-object | ||
*/ | ||
export type ReactionEmojiData = { | ||
@@ -671,2 +880,6 @@ id: Snowflake | null; | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#presence-update | ||
*/ | ||
export type PresenceUpdateData = { | ||
@@ -686,2 +899,6 @@ user: UserData; | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#typing-start | ||
*/ | ||
export type TypingStartData = { | ||
@@ -695,8 +912,16 @@ channel_id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/topics/gateway#voice-server-update | ||
*/ | ||
export type VoiceServerUpdateData = { | ||
token: string; | ||
guild_id: Snowflake; | ||
endpoint: string; | ||
endpoint: string | null; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object | ||
*/ | ||
export type ApplicationCommand = { | ||
@@ -731,2 +956,6 @@ id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure | ||
*/ | ||
export type ApplicationCommandOptionChoice = { | ||
@@ -738,2 +967,6 @@ name: string; | ||
/* | ||
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object | ||
*/ | ||
export type GuildApplicationCommandPermissions = { | ||
@@ -752,3 +985,3 @@ id: Snowflake; | ||
export type ApplicationCommandPermissionType = 1 | 2 | 3; | ||
export type ApplicationCommandPermissionType = 1 | 2 ; | ||
@@ -769,3 +1002,6 @@ export type InteractionData = { | ||
export type InteractionType = 1 | 2 | 3; | ||
/* | ||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type | ||
*/ | ||
export type InteractionType = 1 | 2 | 3 | 4; | ||
@@ -775,6 +1011,8 @@ export type ApplicationCommandInteractionData = { | ||
name: string; | ||
type?: ApplicationCommandType; | ||
resolved?: ApplicationCommandInteractionDataResolved; | ||
options?: Array<ApplicationCommandInteractionDataOption>; | ||
custom_id?: string; | ||
component_type?: 1 | 2; | ||
component_type?: 1 | 2 | 3; | ||
values?: Array<SelectOptionData> | ||
target_id?: Snowflake; | ||
@@ -785,5 +1023,6 @@ } | ||
users?: { [id: string]: UserData }; | ||
members?: { [id: string]: MemberData }; | ||
members?: { [id: string]: Partial<MemberData> }; | ||
roles?: { [id: string]: RoleData }; | ||
channels?: { [id: string]: ChannelData; }; | ||
channels?: { [id: string]: Partial<ChannelData>; }; | ||
messages?: { [id: string]: Partial<MessageData>; }; | ||
} | ||
@@ -809,8 +1048,13 @@ | ||
content?: string; | ||
components?: Array<MessageComponentData>; | ||
embeds?: Array<EmbedData>; | ||
allowed_mentions?: AllowedMentionsData; | ||
flags?: number; | ||
components?: Array<MessageComponentData>; | ||
attachments: Array<AttachmentData>; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/resources/channel#allowed-mentions-object | ||
*/ | ||
export type AllowedMentionsData = { | ||
@@ -830,7 +1074,11 @@ parse: Array<"roles" | "users" | "everyone">; | ||
/* | ||
* https://discord.com/developers/docs/resources/webhook#webhook-resource | ||
*/ | ||
export type WebhookData = { | ||
id: Snowflake; | ||
type: 1 | 2 | 3; | ||
guild_id?: Snowflake; | ||
channel_id: Snowflake; | ||
type: WebhookType; | ||
guild_id?: Snowflake | null; | ||
channel_id: Snowflake | null; | ||
user?: UserData; | ||
@@ -846,10 +1094,21 @@ name: string | null; | ||
export type WebhookType = 1 | 2 | 3 | ||
/* | ||
* https://discord.com/developers/docs/resources/audit-log#audit-log-object | ||
*/ | ||
export type AuditLogObject = { | ||
webhooks: Array<any>; | ||
users: Array<UserData>; | ||
audit_log_entries: Array<AuditLogEntry>; | ||
guild_scheduled_events: Array<GuildScheduleEventData>; | ||
integrations: Array<IntegrationData>; | ||
threads: Array<ThreadChannelData>; | ||
users: Array<UserData>; | ||
webhooks: Array<any>; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info | ||
*/ | ||
export type AuditLogEntry = { | ||
@@ -862,10 +1121,10 @@ target_id: string | null; | ||
options?: { | ||
delete_member_days?: string; | ||
members_removed?: string; | ||
channel_id?: Snowflake; | ||
message_id?: Snowflake; | ||
count?: string; | ||
id?: Snowflake; | ||
type?: "0" | "1"; | ||
role_name?: string; | ||
channel_id: Snowflake; | ||
count: string; | ||
delete_member_days: string; | ||
members_removed: string; | ||
message_id: Snowflake; | ||
id: Snowflake; | ||
type: "0" | "1"; | ||
role_name: string; | ||
}; | ||
@@ -875,2 +1134,6 @@ reason?: string; | ||
/* | ||
* https://discord.com/developers/docs/resources/audit-log#audit-log-change-object | ||
*/ | ||
export type AuditLogChange = { | ||
@@ -882,6 +1145,10 @@ new_value?: string | number | boolean | Array<RoleData> | Array<PermissionOverwriteData>; | ||
export type AuditLogEventType = 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 | 110 | 111 | 112; | ||
export type AuditLogEventType = 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; | ||
export type GuildPreviewData = Pick<GuildData, "id" | "name" | "icon" | "splash" | "discovery_splash" | "emojis" | "features" | "approximate_member_count" | "approximate_presence_count" | "description">; | ||
/* | ||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget | ||
*/ | ||
export type GuildWidgetData = { | ||
@@ -896,2 +1163,6 @@ id: Snowflake; | ||
/* | ||
* https://discord.com/developers/docs/resources/voice#voice-region-object | ||
*/ | ||
export type VoiceRegionData = { | ||
@@ -906,21 +1177,28 @@ id: string; | ||
/* | ||
* https://discord.com/developers/docs/interactions/message-components#component-object | ||
*/ | ||
export type MessageComponentData = { | ||
type: MessageComponentType; | ||
custom_id?: string; | ||
disabled?: boolean; | ||
style?: 1 | 2 | 3 | 4 | 5; | ||
components?: Array<ButtonData>; | ||
label?: string; | ||
emoji?: { | ||
id: Snowflake | null; | ||
name: string; | ||
id?: Snowflake | null; | ||
name?: string; | ||
animated?: boolean; | ||
}; | ||
custom_id?: string; | ||
url?: string; | ||
disabled?: boolean; | ||
options?: Array<SelectOptionData>; | ||
placeholder?: string; | ||
min_values?: number; | ||
max_values?: number; | ||
options?: Array<SelectOptionData>; | ||
components?: Array<ButtonData>; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-option-structure | ||
*/ | ||
export type SelectOptionData = { | ||
@@ -954,2 +1232,6 @@ label: string; | ||
/* | ||
* https://discord.com/developers/docs/resources/guild-template#guild-template-object | ||
*/ | ||
export type GuildTemplateData = { | ||
@@ -969,2 +1251,6 @@ code: string; | ||
/* | ||
* https://discord.com/developers/docs/resources/guild#integration-object | ||
*/ | ||
export type IntegrationData = { | ||
@@ -1001,1 +1287,31 @@ id: Snowflake; | ||
} | ||
/* | ||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object | ||
*/ | ||
export type GuildScheduleEventData = { | ||
id: Snowflake; | ||
guild_id: Snowflake; | ||
channel_id: Snowflake | null; | ||
creator_id: Snowflake | null; | ||
name: string; | ||
description?: string; | ||
scheduled_start_time: string; | ||
scheduled_end_time: string | null; | ||
privacy_level: 2; | ||
status: 1 | 2 | 3 | 4; | ||
entity_type: 1 | 2 | 3; | ||
entity_metadata: { location?: string } | null; | ||
creator?: UserData; | ||
user_count?: number; | ||
} | ||
/** | ||
* https://discord.com/developers/docs/resources/invite#invite-stage-instance-object | ||
*/ | ||
export type InviteStageInstanceData = { | ||
members: Array<Partial<MemberData>>; | ||
participant_count: number; | ||
speaker_count: number; | ||
topic: string; | ||
} |
{ | ||
"name": "discord-typings", | ||
"version": "9.0.4", | ||
"version": "9.0.5", | ||
"description": "Typings for data returned by Discord (unofficial)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
31916
1114