mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-30 15:30:09 +00:00
fix: wrong exports reported by ae (#1239)
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -56,5 +56,9 @@ voice/**/*.map
|
||||
voice/**/*.d.ts
|
||||
voice/**/*.mjs
|
||||
|
||||
# Don't commit generated docs
|
||||
tsdoc-metadata.json
|
||||
docs/*
|
||||
|
||||
# macOS files
|
||||
.DS_Store
|
||||
|
||||
107
api-extractor.json
Normal file
107
api-extractor.json
Normal file
@@ -0,0 +1,107 @@
|
||||
{
|
||||
"$schema": "../discord.js/packages/api-extractor/src/schemas/api-extractor.schema.json",
|
||||
|
||||
"mainEntryPointFilePath": "<projectFolder>/globals.d.ts",
|
||||
|
||||
"additionalEntryPoints": [
|
||||
{ "modulePath": "v10", "filePath": "<projectFolder>/v10.d.ts" },
|
||||
{ "modulePath": "v9", "filePath": "<projectFolder>/v9.d.ts" },
|
||||
{ "modulePath": "v8", "filePath": "<projectFolder>/v8.d.ts" },
|
||||
{ "modulePath": "v6", "filePath": "<projectFolder>/v6.d.ts" },
|
||||
{ "modulePath": "payloads", "filePath": "<projectFolder>/payloads/index.d.ts" },
|
||||
{ "modulePath": "payloads/v6", "filePath": "<projectFolder>/payloads/v6/index.d.ts" },
|
||||
{ "modulePath": "payloads/v8", "filePath": "<projectFolder>/payloads/v8/index.d.ts" },
|
||||
{ "modulePath": "payloads/v9", "filePath": "<projectFolder>/payloads/v9/index.d.ts" },
|
||||
{ "modulePath": "payloads/v10", "filePath": "<projectFolder>/payloads/v10/index.d.ts" }
|
||||
],
|
||||
|
||||
"bundledPackages": [],
|
||||
|
||||
"compiler": {
|
||||
"overrideTsconfig": {
|
||||
"compilerOptions": {
|
||||
"allowUnreachableCode": false,
|
||||
"allowUnusedLabels": false,
|
||||
"exactOptionalPropertyTypes": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noImplicitOverride": true,
|
||||
"noImplicitReturns": true,
|
||||
"noPropertyAccessFromIndexSignature": false,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"strict": true,
|
||||
|
||||
"allowArbitraryExtensions": false,
|
||||
"allowImportingTsExtensions": false,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "nodenext",
|
||||
"resolveJsonModule": true,
|
||||
"resolvePackageJsonExports": false,
|
||||
"resolvePackageJsonImports": false,
|
||||
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"importHelpers": false,
|
||||
"newLine": "lf",
|
||||
"noEmitHelpers": true,
|
||||
"outDir": "dist",
|
||||
"removeComments": false,
|
||||
"sourceMap": true,
|
||||
|
||||
"esModuleInterop": false,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"isolatedModules": true,
|
||||
|
||||
"experimentalDecorators": true,
|
||||
"lib": ["ESNext"],
|
||||
"target": "ES2022",
|
||||
"useDefineForClassFields": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiReport": {
|
||||
"enabled": false
|
||||
},
|
||||
|
||||
"docModel": {
|
||||
"enabled": true,
|
||||
|
||||
"apiJsonFilePath": "<projectFolder>/docs/docs.api.json",
|
||||
"projectFolderUrl": "https://github.com/discordjs/discord-api-types/tree/main"
|
||||
},
|
||||
|
||||
"dtsRollup": {
|
||||
"enabled": false,
|
||||
|
||||
"untrimmedFilePath": "<projectFolder>/v10.d.ts"
|
||||
},
|
||||
|
||||
"tsdocMetadata": {},
|
||||
|
||||
"newlineKind": "lf",
|
||||
|
||||
"messages": {
|
||||
"compilerMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "warning"
|
||||
}
|
||||
},
|
||||
|
||||
"extractorMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "warning"
|
||||
},
|
||||
|
||||
"ae-missing-release-tag": {
|
||||
"logLevel": "none"
|
||||
}
|
||||
},
|
||||
|
||||
"tsdocMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
deno/payloads/v10/auditLog.ts
generated
2
deno/payloads/v10/auditLog.ts
generated
@@ -325,7 +325,7 @@ export interface APIAuditLogOptions {
|
||||
* - CHANNEL_OVERWRITE_UPDATE
|
||||
* - CHANNEL_OVERWRITE_DELETE
|
||||
*
|
||||
* **Present only if the {@link APIAuditLogOptions.type | entry type} is "0"**
|
||||
* **Present only if the {@link APIAuditLogOptions."type" | entry type} is "0"**
|
||||
*/
|
||||
role_name?: string;
|
||||
|
||||
|
||||
2
deno/rest/v10/mod.ts
generated
2
deno/rest/v10/mod.ts
generated
@@ -549,7 +549,7 @@ export const Routes = {
|
||||
* - GET `/users/{user.id}`
|
||||
* - PATCH `/users/@me`
|
||||
*
|
||||
* @param [userId] - The user ID, defaulted to `@me`
|
||||
* @param userId - The user ID, defaulted to `@me`
|
||||
*/
|
||||
user(userId: Snowflake | '@me' = '@me') {
|
||||
return `/users/${userId}` as const;
|
||||
|
||||
2
deno/rest/v9/mod.ts
generated
2
deno/rest/v9/mod.ts
generated
@@ -558,7 +558,7 @@ export const Routes = {
|
||||
* - GET `/users/{user.id}`
|
||||
* - PATCH `/users/@me`
|
||||
*
|
||||
* @param [userId] - The user ID, defaulted to `@me`
|
||||
* @param userId - The user ID, defaulted to `@me`
|
||||
*/
|
||||
user(userId: Snowflake | '@me' = '@me') {
|
||||
return `/users/${userId}` as const;
|
||||
|
||||
37
deno/rpc/common.ts
generated
37
deno/rpc/common.ts
generated
@@ -1,5 +1,4 @@
|
||||
import type { Snowflake } from '../globals.ts';
|
||||
import type { APIMessage, APIUser, RPCVoiceConnectionStatusDispatchData } from '../v10.ts';
|
||||
|
||||
/**
|
||||
* @unstable The ping object for the `VOICE_CONNECTION_STATUS` dispatched {@link RPCVoiceConnectionStatusDispatchData.pings} field,
|
||||
@@ -48,24 +47,6 @@ export interface RPCAPIMessageParsedContentMention {
|
||||
content: Omit<RPCAPIMessageParsedContentText, 'originalMatch'>;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface RPCAPIMessage extends Omit<APIMessage, 'channel_id'> {
|
||||
/**
|
||||
* The nickname of the user who sent the message
|
||||
*/
|
||||
nick?: string;
|
||||
/**
|
||||
* The color of the author's name
|
||||
*/
|
||||
author_color?: number;
|
||||
/**
|
||||
* The content of the message parsed into an array
|
||||
*/
|
||||
content_parsed: (RPCAPIMessageParsedContentMention | RPCAPIMessageParsedContentText)[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/rpc#authenticate-oauth2-application-structure}
|
||||
*/
|
||||
@@ -329,24 +310,6 @@ export enum RelationshipType {
|
||||
Implicit,
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface Relationship {
|
||||
/**
|
||||
* The id of the user
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Relationship type
|
||||
*/
|
||||
type: RelationshipType;
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-error-codes}
|
||||
*/
|
||||
|
||||
47
deno/rpc/v10.ts
generated
47
deno/rpc/v10.ts
generated
@@ -9,8 +9,12 @@ import type {
|
||||
ChannelType,
|
||||
GatewayActivity,
|
||||
OAuth2Scopes,
|
||||
Relationship,
|
||||
RPCAPIMessage,
|
||||
Snowflake,
|
||||
} from '../v10.ts';
|
||||
import type {
|
||||
RelationshipType,
|
||||
RPCAPIMessageParsedContentMention,
|
||||
RPCAPIMessageParsedContentText,
|
||||
RPCCertifiedDevice,
|
||||
RPCErrorCodes,
|
||||
RPCOAuth2Application,
|
||||
@@ -18,14 +22,49 @@ import type {
|
||||
RPCVoiceSettingsInput,
|
||||
RPCVoiceSettingsMode,
|
||||
RPCVoiceSettingsOutput,
|
||||
Snowflake,
|
||||
VoiceConnectionStates,
|
||||
} from '../v10.ts';
|
||||
} from './common.ts';
|
||||
|
||||
export * from './common.ts';
|
||||
|
||||
export const RPCVersion = '1';
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface Relationship {
|
||||
/**
|
||||
* The id of the user
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Relationship type
|
||||
*/
|
||||
type: RelationshipType;
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface RPCAPIMessage extends Omit<APIMessage, 'channel_id'> {
|
||||
/**
|
||||
* The nickname of the user who sent the message
|
||||
*/
|
||||
nick?: string;
|
||||
/**
|
||||
* The color of the author's name
|
||||
*/
|
||||
author_color?: number;
|
||||
/**
|
||||
* The content of the message parsed into an array
|
||||
*/
|
||||
content_parsed: (RPCAPIMessageParsedContentMention | RPCAPIMessageParsedContentText)[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/rpc#commands-and-events-rpc-commands}
|
||||
*/
|
||||
|
||||
40
deno/rpc/v8.ts
generated
40
deno/rpc/v8.ts
generated
@@ -1 +1,41 @@
|
||||
import type { Snowflake } from '../globals.ts';
|
||||
import type { APIMessage, APIUser } from '../v8.ts';
|
||||
import type { RelationshipType, RPCAPIMessageParsedContentMention, RPCAPIMessageParsedContentText } from './common.ts';
|
||||
|
||||
export * from './common.ts';
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface Relationship {
|
||||
/**
|
||||
* The id of the user
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Relationship type
|
||||
*/
|
||||
type: RelationshipType;
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface RPCAPIMessage extends Omit<APIMessage, 'channel_id'> {
|
||||
/**
|
||||
* The nickname of the user who sent the message
|
||||
*/
|
||||
nick?: string;
|
||||
/**
|
||||
* The color of the author's name
|
||||
*/
|
||||
author_color?: number;
|
||||
/**
|
||||
* The content of the message parsed into an array
|
||||
*/
|
||||
content_parsed: (RPCAPIMessageParsedContentMention | RPCAPIMessageParsedContentText)[];
|
||||
}
|
||||
40
deno/rpc/v9.ts
generated
40
deno/rpc/v9.ts
generated
@@ -1 +1,41 @@
|
||||
import type { Snowflake } from '../globals.ts';
|
||||
import type { APIMessage, APIUser } from '../v9.ts';
|
||||
import type { RelationshipType, RPCAPIMessageParsedContentMention, RPCAPIMessageParsedContentText } from './common.ts';
|
||||
|
||||
export * from './common.ts';
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface Relationship {
|
||||
/**
|
||||
* The id of the user
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Relationship type
|
||||
*/
|
||||
type: RelationshipType;
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface RPCAPIMessage extends Omit<APIMessage, 'channel_id'> {
|
||||
/**
|
||||
* The nickname of the user who sent the message
|
||||
*/
|
||||
nick?: string;
|
||||
/**
|
||||
* The color of the author's name
|
||||
*/
|
||||
author_color?: number;
|
||||
/**
|
||||
* The content of the message parsed into an array
|
||||
*/
|
||||
content_parsed: (RPCAPIMessageParsedContentMention | RPCAPIMessageParsedContentText)[];
|
||||
}
|
||||
|
||||
16
deno/utils/v8.ts
generated
16
deno/utils/v8.ts
generated
@@ -19,7 +19,7 @@ import { ButtonStyle } from '../payloads/v8/mod.ts';
|
||||
/**
|
||||
* A type-guard check for DM interactions
|
||||
*
|
||||
* @param interaction The interaction to check against
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction was received in a DM channel
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ export function isDMInteraction(interaction: APIInteraction): interaction is API
|
||||
/**
|
||||
* A type-guard check for guild interactions
|
||||
*
|
||||
* @param interaction The interaction to check against
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction was received in a guild
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
@@ -43,7 +43,7 @@ export function isGuildInteraction(interaction: APIInteraction): interaction is
|
||||
/**
|
||||
* A type-guard check for DM application command interactions
|
||||
*
|
||||
* @param interaction The application command interaction to check against
|
||||
* @param interaction - The application command interaction to check against
|
||||
* @returns A boolean that indicates if the application command interaction was received in a DM channel
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
@@ -56,7 +56,7 @@ export function isApplicationCommandDMInteraction(
|
||||
/**
|
||||
* A type-guard check for guild application command interactions
|
||||
*
|
||||
* @param interaction The interaction to check against
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the application command interaction was received in a guild
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
@@ -71,7 +71,7 @@ export function isApplicationCommandGuildInteraction(
|
||||
/**
|
||||
* A type-guard check for DM message component interactions
|
||||
*
|
||||
* @param interaction The message component interaction to check against
|
||||
* @param interaction - The message component interaction to check against
|
||||
* @returns A boolean that indicates if the message component interaction was received in a DM channel
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
@@ -84,7 +84,7 @@ export function isMessageComponentDMInteraction(
|
||||
/**
|
||||
* A type-guard check for guild message component interactions
|
||||
*
|
||||
* @param interaction The interaction to check against
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the message component interaction was received in a guild
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
@@ -99,7 +99,7 @@ export function isMessageComponentGuildInteraction(
|
||||
/**
|
||||
* A type-guard check for buttons that have a `url` attached to them.
|
||||
*
|
||||
* @param component The button to check against
|
||||
* @param component - The button to check against
|
||||
* @returns A boolean that indicates if the button has a `url` attached to it
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
@@ -110,7 +110,7 @@ export function isLinkButton(component: APIButtonComponent): component is APIBut
|
||||
/**
|
||||
* A type-guard check for buttons that have a `custom_id` attached to them.
|
||||
*
|
||||
* @param component The button to check against
|
||||
* @param component - The button to check against
|
||||
* @returns A boolean that indicates if the button has a `custom_id` attached to it
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
|
||||
@@ -325,7 +325,7 @@ export interface APIAuditLogOptions {
|
||||
* - CHANNEL_OVERWRITE_UPDATE
|
||||
* - CHANNEL_OVERWRITE_DELETE
|
||||
*
|
||||
* **Present only if the {@link APIAuditLogOptions.type | entry type} is "0"**
|
||||
* **Present only if the {@link APIAuditLogOptions."type" | entry type} is "0"**
|
||||
*/
|
||||
role_name?: string;
|
||||
|
||||
|
||||
@@ -549,7 +549,7 @@ export const Routes = {
|
||||
* - GET `/users/{user.id}`
|
||||
* - PATCH `/users/@me`
|
||||
*
|
||||
* @param [userId] - The user ID, defaulted to `@me`
|
||||
* @param userId - The user ID, defaulted to `@me`
|
||||
*/
|
||||
user(userId: Snowflake | '@me' = '@me') {
|
||||
return `/users/${userId}` as const;
|
||||
|
||||
@@ -558,7 +558,7 @@ export const Routes = {
|
||||
* - GET `/users/{user.id}`
|
||||
* - PATCH `/users/@me`
|
||||
*
|
||||
* @param [userId] - The user ID, defaulted to `@me`
|
||||
* @param userId - The user ID, defaulted to `@me`
|
||||
*/
|
||||
user(userId: Snowflake | '@me' = '@me') {
|
||||
return `/users/${userId}` as const;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { Snowflake } from '../globals';
|
||||
import type { APIMessage, APIUser, RPCVoiceConnectionStatusDispatchData } from '../v10';
|
||||
|
||||
/**
|
||||
* @unstable The ping object for the `VOICE_CONNECTION_STATUS` dispatched {@link RPCVoiceConnectionStatusDispatchData.pings} field,
|
||||
@@ -48,24 +47,6 @@ export interface RPCAPIMessageParsedContentMention {
|
||||
content: Omit<RPCAPIMessageParsedContentText, 'originalMatch'>;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface RPCAPIMessage extends Omit<APIMessage, 'channel_id'> {
|
||||
/**
|
||||
* The nickname of the user who sent the message
|
||||
*/
|
||||
nick?: string;
|
||||
/**
|
||||
* The color of the author's name
|
||||
*/
|
||||
author_color?: number;
|
||||
/**
|
||||
* The content of the message parsed into an array
|
||||
*/
|
||||
content_parsed: (RPCAPIMessageParsedContentMention | RPCAPIMessageParsedContentText)[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/rpc#authenticate-oauth2-application-structure}
|
||||
*/
|
||||
@@ -329,24 +310,6 @@ export enum RelationshipType {
|
||||
Implicit,
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface Relationship {
|
||||
/**
|
||||
* The id of the user
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Relationship type
|
||||
*/
|
||||
type: RelationshipType;
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#rpc-rpc-error-codes}
|
||||
*/
|
||||
|
||||
47
rpc/v10.ts
47
rpc/v10.ts
@@ -9,8 +9,12 @@ import type {
|
||||
ChannelType,
|
||||
GatewayActivity,
|
||||
OAuth2Scopes,
|
||||
Relationship,
|
||||
RPCAPIMessage,
|
||||
Snowflake,
|
||||
} from '../v10';
|
||||
import type {
|
||||
RelationshipType,
|
||||
RPCAPIMessageParsedContentMention,
|
||||
RPCAPIMessageParsedContentText,
|
||||
RPCCertifiedDevice,
|
||||
RPCErrorCodes,
|
||||
RPCOAuth2Application,
|
||||
@@ -18,14 +22,49 @@ import type {
|
||||
RPCVoiceSettingsInput,
|
||||
RPCVoiceSettingsMode,
|
||||
RPCVoiceSettingsOutput,
|
||||
Snowflake,
|
||||
VoiceConnectionStates,
|
||||
} from '../v10';
|
||||
} from './common';
|
||||
|
||||
export * from './common';
|
||||
|
||||
export const RPCVersion = '1';
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface Relationship {
|
||||
/**
|
||||
* The id of the user
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Relationship type
|
||||
*/
|
||||
type: RelationshipType;
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface RPCAPIMessage extends Omit<APIMessage, 'channel_id'> {
|
||||
/**
|
||||
* The nickname of the user who sent the message
|
||||
*/
|
||||
nick?: string;
|
||||
/**
|
||||
* The color of the author's name
|
||||
*/
|
||||
author_color?: number;
|
||||
/**
|
||||
* The content of the message parsed into an array
|
||||
*/
|
||||
content_parsed: (RPCAPIMessageParsedContentMention | RPCAPIMessageParsedContentText)[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/rpc#commands-and-events-rpc-commands}
|
||||
*/
|
||||
|
||||
40
rpc/v8.ts
40
rpc/v8.ts
@@ -1 +1,41 @@
|
||||
import type { Snowflake } from '../globals';
|
||||
import type { APIMessage, APIUser } from '../v8';
|
||||
import type { RelationshipType, RPCAPIMessageParsedContentMention, RPCAPIMessageParsedContentText } from './common';
|
||||
|
||||
export * from './common';
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface Relationship {
|
||||
/**
|
||||
* The id of the user
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Relationship type
|
||||
*/
|
||||
type: RelationshipType;
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface RPCAPIMessage extends Omit<APIMessage, 'channel_id'> {
|
||||
/**
|
||||
* The nickname of the user who sent the message
|
||||
*/
|
||||
nick?: string;
|
||||
/**
|
||||
* The color of the author's name
|
||||
*/
|
||||
author_color?: number;
|
||||
/**
|
||||
* The content of the message parsed into an array
|
||||
*/
|
||||
content_parsed: (RPCAPIMessageParsedContentMention | RPCAPIMessageParsedContentText)[];
|
||||
}
|
||||
40
rpc/v9.ts
40
rpc/v9.ts
@@ -1 +1,41 @@
|
||||
import type { Snowflake } from '../globals';
|
||||
import type { APIMessage, APIUser } from '../v9';
|
||||
import type { RelationshipType, RPCAPIMessageParsedContentMention, RPCAPIMessageParsedContentText } from './common';
|
||||
|
||||
export * from './common';
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface Relationship {
|
||||
/**
|
||||
* The id of the user
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Relationship type
|
||||
*/
|
||||
type: RelationshipType;
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export interface RPCAPIMessage extends Omit<APIMessage, 'channel_id'> {
|
||||
/**
|
||||
* The nickname of the user who sent the message
|
||||
*/
|
||||
nick?: string;
|
||||
/**
|
||||
* The color of the author's name
|
||||
*/
|
||||
author_color?: number;
|
||||
/**
|
||||
* The content of the message parsed into an array
|
||||
*/
|
||||
content_parsed: (RPCAPIMessageParsedContentMention | RPCAPIMessageParsedContentText)[];
|
||||
}
|
||||
|
||||
71
tsdoc.json
Normal file
71
tsdoc.json
Normal file
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
|
||||
"tagDefinitions": [
|
||||
{
|
||||
"tagName": "@betaDocumentation",
|
||||
"syntaxKind": "modifier"
|
||||
},
|
||||
{
|
||||
"tagName": "@internalRemarks",
|
||||
"syntaxKind": "block"
|
||||
},
|
||||
{
|
||||
"tagName": "@preapproved",
|
||||
"syntaxKind": "modifier"
|
||||
},
|
||||
{
|
||||
"tagName": "@mixes",
|
||||
"syntaxKind": "block"
|
||||
},
|
||||
{
|
||||
"tagName": "@unstable",
|
||||
"syntaxKind": "modifier"
|
||||
},
|
||||
{
|
||||
"tagName": "@default",
|
||||
"syntaxKind": "block"
|
||||
}
|
||||
],
|
||||
|
||||
/**
|
||||
* TSDoc tags implemented by API Extractor:
|
||||
*/
|
||||
"supportForTags": {
|
||||
"@alpha": true,
|
||||
"@beta": true,
|
||||
"@defaultValue": true,
|
||||
"@decorator": true,
|
||||
"@deprecated": true,
|
||||
"@eventProperty": true,
|
||||
"@example": true,
|
||||
"@experimental": true,
|
||||
"@inheritDoc": true,
|
||||
"@internal": true,
|
||||
"@label": true,
|
||||
"@link": true,
|
||||
"@override": true,
|
||||
"@packageDocumentation": true,
|
||||
"@param": true,
|
||||
"@privateRemarks": true,
|
||||
"@public": true,
|
||||
"@readonly": true,
|
||||
"@remarks": true,
|
||||
"@returns": true,
|
||||
"@sealed": true,
|
||||
"@see": true,
|
||||
"@throws": true,
|
||||
"@typeParam": true,
|
||||
"@virtual": true,
|
||||
|
||||
"@betaDocumentation": true,
|
||||
"@internalRemarks": true,
|
||||
"@mixes": true,
|
||||
"@preapproved": true,
|
||||
|
||||
/**
|
||||
* additional tags for discord-api-types:
|
||||
*/
|
||||
"@unstable": true,
|
||||
"@default": true
|
||||
}
|
||||
}
|
||||
16
utils/v8.ts
16
utils/v8.ts
@@ -19,7 +19,7 @@ import { ButtonStyle } from '../payloads/v8/index';
|
||||
/**
|
||||
* A type-guard check for DM interactions
|
||||
*
|
||||
* @param interaction The interaction to check against
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction was received in a DM channel
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ export function isDMInteraction(interaction: APIInteraction): interaction is API
|
||||
/**
|
||||
* A type-guard check for guild interactions
|
||||
*
|
||||
* @param interaction The interaction to check against
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the interaction was received in a guild
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
@@ -43,7 +43,7 @@ export function isGuildInteraction(interaction: APIInteraction): interaction is
|
||||
/**
|
||||
* A type-guard check for DM application command interactions
|
||||
*
|
||||
* @param interaction The application command interaction to check against
|
||||
* @param interaction - The application command interaction to check against
|
||||
* @returns A boolean that indicates if the application command interaction was received in a DM channel
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
@@ -56,7 +56,7 @@ export function isApplicationCommandDMInteraction(
|
||||
/**
|
||||
* A type-guard check for guild application command interactions
|
||||
*
|
||||
* @param interaction The interaction to check against
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the application command interaction was received in a guild
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
@@ -71,7 +71,7 @@ export function isApplicationCommandGuildInteraction(
|
||||
/**
|
||||
* A type-guard check for DM message component interactions
|
||||
*
|
||||
* @param interaction The message component interaction to check against
|
||||
* @param interaction - The message component interaction to check against
|
||||
* @returns A boolean that indicates if the message component interaction was received in a DM channel
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
@@ -84,7 +84,7 @@ export function isMessageComponentDMInteraction(
|
||||
/**
|
||||
* A type-guard check for guild message component interactions
|
||||
*
|
||||
* @param interaction The interaction to check against
|
||||
* @param interaction - The interaction to check against
|
||||
* @returns A boolean that indicates if the message component interaction was received in a guild
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
@@ -99,7 +99,7 @@ export function isMessageComponentGuildInteraction(
|
||||
/**
|
||||
* A type-guard check for buttons that have a `url` attached to them.
|
||||
*
|
||||
* @param component The button to check against
|
||||
* @param component - The button to check against
|
||||
* @returns A boolean that indicates if the button has a `url` attached to it
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
@@ -110,7 +110,7 @@ export function isLinkButton(component: APIButtonComponent): component is APIBut
|
||||
/**
|
||||
* A type-guard check for buttons that have a `custom_id` attached to them.
|
||||
*
|
||||
* @param component The button to check against
|
||||
* @param component - The button to check against
|
||||
* @returns A boolean that indicates if the button has a `custom_id` attached to it
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user