mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-22 19:30:09 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e196e65254 | ||
|
|
21b9ae4aaf | ||
|
|
39ea1f4429 | ||
|
|
fde45f9235 | ||
|
|
2ee557a598 |
@@ -92,6 +92,8 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
CannotDeleteChannelRequiredForCommunityGuilds = 50074,
|
||||
|
||||
InvalidStickerSent = 50081,
|
||||
|
||||
TwoFactorAuthenticationIsRequired = 60003,
|
||||
|
||||
ReactionWasBlocked = 90001,
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.8.0",
|
||||
"version": "0.9.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.8.0",
|
||||
"version": "0.9.0",
|
||||
"description": "Discord API typings that are kept up to date for use in bot library creation.",
|
||||
"main": "default/index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -79,6 +79,7 @@ export interface APIMessage {
|
||||
message_reference?: APIMessageReference;
|
||||
flags?: MessageFlags;
|
||||
referenced_message?: APIMessage | null;
|
||||
stickers?: APISticker[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,7 +103,7 @@ export enum MessageType {
|
||||
GUILD_DISCOVERY_REQUALIFIED,
|
||||
GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING,
|
||||
GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING,
|
||||
INLINE_REPLY = 19,
|
||||
REPLY = 19,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -129,7 +130,7 @@ export interface APIMessageApplication {
|
||||
*/
|
||||
export interface APIMessageReference {
|
||||
message_id?: string;
|
||||
channel_id: string;
|
||||
channel_id?: string;
|
||||
guild_id?: string;
|
||||
}
|
||||
|
||||
@@ -154,6 +155,29 @@ export enum MessageFlags {
|
||||
URGENT = 1 << 4,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-sticker-structure
|
||||
*/
|
||||
export interface APISticker {
|
||||
id: string;
|
||||
pack_id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
tags?: string;
|
||||
asset: string;
|
||||
preview_asset: string | null;
|
||||
format_type: StickerFormatType;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-sticker-format-types
|
||||
*/
|
||||
export enum StickerFormatType {
|
||||
PNG = 1,
|
||||
APNG,
|
||||
LOTTIE,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure
|
||||
*/
|
||||
|
||||
@@ -31,6 +31,7 @@ export interface APIAllowedMentionsSend {
|
||||
parse?: AllowedMentionsTypes[];
|
||||
roles?: string[];
|
||||
users?: string[];
|
||||
replied_user?: boolean;
|
||||
}
|
||||
|
||||
// #endregion TypeDefs
|
||||
@@ -66,6 +67,8 @@ export interface RESTGetAPIChannelMessagesQuery {
|
||||
|
||||
export type RESTGetAPIChannelMessagesResult = APIMessage[];
|
||||
|
||||
export type APIMessageReferenceSend = APIMessageReference & Required<Pick<APIMessageReference, 'message_id'>>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#create-message
|
||||
*/
|
||||
@@ -75,7 +78,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
tts?: boolean;
|
||||
embed?: APIEmbed;
|
||||
allowed_mentions?: APIAllowedMentionsSend;
|
||||
message_reference?: Required<Omit<APIMessageReference, 'guild_id'>> & Pick<APIMessageReference, 'guild_id'>;
|
||||
message_reference?: APIMessageReferenceSend;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,7 +101,7 @@ export type RESTPostAPIChannelMessageFormDataBody =
|
||||
tts?: boolean;
|
||||
embed?: APIEmbed;
|
||||
allowed_mentions?: APIAllowedMentionsSend;
|
||||
message_reference?: APIMessageReference;
|
||||
message_reference?: APIMessageReferenceSend;
|
||||
/**
|
||||
* The file contents
|
||||
*/
|
||||
|
||||
@@ -308,13 +308,6 @@ export type RESTGetAPIGuildVoiceRegionsResult = APIVoiceRegion[];
|
||||
*/
|
||||
export type RESTGetAPIGuildInvitesResult = APIInvite[];
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-integrations
|
||||
*/
|
||||
export interface RESTGetAPIGuildIntegrationsQuery {
|
||||
include_applications?: boolean;
|
||||
}
|
||||
|
||||
export type RESTGetAPIGuildIntegrationsResult = APIGuildIntegration[];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user