mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-21 02:40:08 +00:00
feat: api v10 (#331)
Co-authored-by: Superchupu <53496941+SuperchupuDev@users.noreply.github.com> Co-authored-by: Almeida <almeidx@pm.me> Co-authored-by: advaith <advaithj1@gmail.com>
This commit is contained in:
1
.eslintignore
Normal file
1
.eslintignore
Normal file
@@ -0,0 +1 @@
|
||||
deno/
|
||||
14
README.md
14
README.md
@@ -24,23 +24,23 @@ pnpm add discord-api-types
|
||||
You can only import this module by specifying the API version you want to target. Append `/v*` to the import path, where the `*` represents the API version. Below are some examples
|
||||
|
||||
```js
|
||||
const { APIUser } = require('discord-api-types/v9');
|
||||
const { APIUser } = require('discord-api-types/v10');
|
||||
```
|
||||
|
||||
```ts
|
||||
// TypeScript/ES Module support
|
||||
import { APIUser } from 'discord-api-types/v9';
|
||||
import { APIUser } from 'discord-api-types/v10';
|
||||
```
|
||||
|
||||
You may also import just certain parts of the module that you need. The possible values are: `globals`, `gateway`, `gateway/v*`, `payloads`, `payloads/v*`, `rest`, `rest/v*`, `rpc`, `rpc/v*`, `utils`, `utils/v*`, `voice`, and `voice/v*`. Below are some examples
|
||||
|
||||
```js
|
||||
const { GatewayVersion } = require('discord-api-types/gateway/v9');
|
||||
const { GatewayVersion } = require('discord-api-types/gateway/v10');
|
||||
```
|
||||
|
||||
```ts
|
||||
// TypeScript/ES Module support
|
||||
import { GatewayVersion } from 'discord-api-types/gateway/v9';
|
||||
import { GatewayVersion } from 'discord-api-types/gateway/v10';
|
||||
```
|
||||
|
||||
> _**Note:** The `v*` exports (`discord-api-type/v*`) include the appropriate version of `gateway`, `payloads`, `rest`, `rpc`, and `utils` you specified, alongside the `globals` exports_
|
||||
@@ -53,21 +53,21 @@ We also provide typings compatible with the [deno](https://deno.land/) runtime.
|
||||
|
||||
```ts
|
||||
// Importing a specific API version
|
||||
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/v9.ts';
|
||||
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/v10.ts';
|
||||
```
|
||||
|
||||
2. From [deno.land/x](https://deno.land/x)
|
||||
|
||||
```ts
|
||||
// Importing a specific API version
|
||||
import { APIUser } from 'https://deno.land/x/discord_api_types/v9.ts';
|
||||
import { APIUser } from 'https://deno.land/x/discord_api_types/v10.ts';
|
||||
```
|
||||
|
||||
3. From [skypack.dev](https://www.skypack.dev/)
|
||||
|
||||
```ts
|
||||
// Importing a specific API version
|
||||
import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v9?dts';
|
||||
import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v10?dts';
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
|
||||
@@ -24,23 +24,23 @@ pnpm add discord-api-types
|
||||
You can only import this module by specifying the API version you want to target. Append `/v*` to the import path, where the `*` represents the API version. Below are some examples
|
||||
|
||||
```js
|
||||
const { APIUser } = require('discord-api-types/v9');
|
||||
const { APIUser } = require('discord-api-types/v10');
|
||||
```
|
||||
|
||||
```ts
|
||||
// TypeScript/ES Module support
|
||||
import { APIUser } from 'discord-api-types/v9';
|
||||
import { APIUser } from 'discord-api-types/v10';
|
||||
```
|
||||
|
||||
You may also import just certain parts of the module that you need. The possible values are: `globals`, `gateway`, `gateway/v*`, `payloads`, `payloads/v*`, `rest`, `rest/v*`, `rpc`, `rpc/v*`, `utils`, `utils/v*`, `voice`, and `voice/v*`. Below are some examples
|
||||
|
||||
```js
|
||||
const { GatewayVersion } = require('discord-api-types/gateway/v9');
|
||||
const { GatewayVersion } = require('discord-api-types/gateway/v10');
|
||||
```
|
||||
|
||||
```ts
|
||||
// TypeScript/ES Module support
|
||||
import { GatewayVersion } from 'discord-api-types/gateway/v9';
|
||||
import { GatewayVersion } from 'discord-api-types/gateway/v10';
|
||||
```
|
||||
|
||||
> _**Note:** The `v*` exports (`discord-api-type/v*`) include the appropriate version of `gateway`, `payloads`, `rest`, `rpc`, and `utils` you specified, alongside the `globals` exports_
|
||||
@@ -53,21 +53,21 @@ We also provide typings compatible with the [deno](https://deno.land/) runtime.
|
||||
|
||||
```ts
|
||||
// Importing a specific API version
|
||||
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/v9.ts';
|
||||
import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/v10.ts';
|
||||
```
|
||||
|
||||
2. From [deno.land/x](https://deno.land/x)
|
||||
|
||||
```ts
|
||||
// Importing a specific API version
|
||||
import { APIUser } from 'https://deno.land/x/discord_api_types/v9.ts';
|
||||
import { APIUser } from 'https://deno.land/x/discord_api_types/v10.ts';
|
||||
```
|
||||
|
||||
3. From [skypack.dev](https://www.skypack.dev/)
|
||||
|
||||
```ts
|
||||
// Importing a specific API version
|
||||
import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v9?dts';
|
||||
import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v10?dts';
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// This file exports all the types available in the recommended gateway version
|
||||
// Thereby, things MAY break in the future. Try sticking to imports from a specific version
|
||||
|
||||
export * from './v9.ts';
|
||||
export * from './v10.ts';
|
||||
|
||||
1731
deno/gateway/v10.ts
Normal file
1731
deno/gateway/v10.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -5,15 +5,14 @@
|
||||
import type { Snowflake } from '../globals.ts';
|
||||
import type {
|
||||
APIApplication,
|
||||
APIApplicationCommandInteraction,
|
||||
APIChannel,
|
||||
APIEmoji,
|
||||
APIGuild,
|
||||
APIGuildScheduledEvent,
|
||||
APIGuildIntegration,
|
||||
APIGuildMember,
|
||||
APIGuildScheduledEvent,
|
||||
APIInteraction,
|
||||
APIMessage,
|
||||
APIMessageComponentInteraction,
|
||||
APIRole,
|
||||
APIStageInstance,
|
||||
APISticker,
|
||||
@@ -29,10 +28,14 @@ import type { Nullable } from '../utils/internals.ts';
|
||||
|
||||
export * from './common.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export const GatewayVersion = '8';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GatewayOpcodes {
|
||||
/**
|
||||
@@ -84,6 +87,7 @@ export enum GatewayOpcodes {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GatewayCloseCodes {
|
||||
/**
|
||||
@@ -167,6 +171,7 @@ export enum GatewayCloseCodes {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#list-of-intents
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GatewayIntentBits {
|
||||
Guilds = 1 << 0,
|
||||
@@ -189,6 +194,7 @@ export enum GatewayIntentBits {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GatewayDispatchEvents {
|
||||
ChannelCreate = 'CHANNEL_CREATE',
|
||||
@@ -242,6 +248,9 @@ export enum GatewayDispatchEvents {
|
||||
GuildScheduledEventUserRemove = 'GUILD_SCHEDULED_EVENT_USER_REMOVE',
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewaySendPayload =
|
||||
| GatewayHeartbeat
|
||||
| GatewayIdentify
|
||||
@@ -250,6 +259,9 @@ export type GatewaySendPayload =
|
||||
| GatewayResume
|
||||
| GatewayRequestGuildMembers;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayReceivePayload =
|
||||
| GatewayHello
|
||||
| GatewayHeartbeatRequest
|
||||
@@ -258,6 +270,9 @@ export type GatewayReceivePayload =
|
||||
| GatewayReconnect
|
||||
| GatewayDispatchPayload;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayDispatchPayload =
|
||||
| GatewayChannelModifyDispatch
|
||||
| GatewayChannelPinsUpdateDispatch
|
||||
@@ -308,6 +323,7 @@ export type GatewayDispatchPayload =
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#hello
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayHello extends NonDispatchPayload {
|
||||
op: GatewayOpcodes.Hello;
|
||||
@@ -316,6 +332,7 @@ export interface GatewayHello extends NonDispatchPayload {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#hello
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayHelloData {
|
||||
/**
|
||||
@@ -326,6 +343,7 @@ export interface GatewayHelloData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#heartbeating
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayHeartbeatRequest extends NonDispatchPayload {
|
||||
op: GatewayOpcodes.Heartbeat;
|
||||
@@ -334,6 +352,7 @@ export interface GatewayHeartbeatRequest extends NonDispatchPayload {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayHeartbeatAck extends NonDispatchPayload {
|
||||
op: GatewayOpcodes.HeartbeatAck;
|
||||
@@ -342,6 +361,7 @@ export interface GatewayHeartbeatAck extends NonDispatchPayload {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#invalid-session
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayInvalidSession extends NonDispatchPayload {
|
||||
op: GatewayOpcodes.InvalidSession;
|
||||
@@ -350,11 +370,13 @@ export interface GatewayInvalidSession extends NonDispatchPayload {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#invalid-session
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayInvalidSessionData = boolean;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#reconnect
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayReconnect extends NonDispatchPayload {
|
||||
op: GatewayOpcodes.Reconnect;
|
||||
@@ -363,11 +385,13 @@ export interface GatewayReconnect extends NonDispatchPayload {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#ready
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayReadyDispatch = DataPayload<GatewayDispatchEvents.Ready, GatewayReadyDispatchData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#ready
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayReadyDispatchData {
|
||||
/**
|
||||
@@ -408,6 +432,7 @@ export interface GatewayReadyDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#resumed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed, never>;
|
||||
|
||||
@@ -415,6 +440,7 @@ export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed,
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-create
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-update
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-delete
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayChannelModifyDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ChannelCreate | GatewayDispatchEvents.ChannelDelete | GatewayDispatchEvents.ChannelUpdate,
|
||||
@@ -425,41 +451,49 @@ export type GatewayChannelModifyDispatch = DataPayload<
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-create
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-update
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-delete
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayChannelModifyDispatchData = APIChannel;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-delete
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-delete
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayChannelDeleteDispatchData = GatewayChannelModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-pins-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayChannelPinsUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ChannelPinsUpdate,
|
||||
@@ -468,6 +502,7 @@ export type GatewayChannelPinsUpdateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-pins-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayChannelPinsUpdateDispatchData {
|
||||
/**
|
||||
@@ -487,6 +522,7 @@ export interface GatewayChannelPinsUpdateDispatchData {
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-create
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildModifyDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildCreate | GatewayDispatchEvents.GuildUpdate,
|
||||
@@ -496,42 +532,50 @@ export type GatewayGuildModifyDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-create
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildModifyDispatchData = APIGuild;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildCreateDispatch = GatewayGuildModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildCreateDispatchData = GatewayGuildModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildUpdateDispatchData = GatewayGuildModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-delete
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildDeleteDispatch = DataPayload<GatewayDispatchEvents.GuildDelete, GatewayGuildDeleteDispatchData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-delete
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildDeleteDispatchData = APIUnavailableGuild;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-ban-add
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-ban-remove
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildBanModifyDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildBanAdd | GatewayDispatchEvents.GuildBanRemove,
|
||||
@@ -541,6 +585,7 @@ export type GatewayGuildBanModifyDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-ban-add
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-ban-remove
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayGuildBanModifyDispatchData {
|
||||
/**
|
||||
@@ -557,26 +602,31 @@ export interface GatewayGuildBanModifyDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-ban-add
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-ban-add
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-ban-remove
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-ban-remove
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildBanRemoveDispatchData = GatewayGuildBanModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-emojis-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildEmojisUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildEmojisUpdate,
|
||||
@@ -585,6 +635,7 @@ export type GatewayGuildEmojisUpdateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-emojis-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayGuildEmojisUpdateDispatchData {
|
||||
/**
|
||||
@@ -601,6 +652,7 @@ export interface GatewayGuildEmojisUpdateDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-stickers-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildStickersUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildStickersUpdate,
|
||||
@@ -609,6 +661,7 @@ export type GatewayGuildStickersUpdateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-stickers-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayGuildStickersUpdateDispatchData {
|
||||
/**
|
||||
@@ -625,6 +678,7 @@ export interface GatewayGuildStickersUpdateDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-integrations-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildIntegrationsUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildIntegrationsUpdate,
|
||||
@@ -633,6 +687,7 @@ export type GatewayGuildIntegrationsUpdateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-integrations-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayGuildIntegrationsUpdateDispatchData {
|
||||
/**
|
||||
@@ -643,6 +698,7 @@ export interface GatewayGuildIntegrationsUpdateDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-member-add
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildMemberAddDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildMemberAdd,
|
||||
@@ -651,6 +707,7 @@ export type GatewayGuildMemberAddDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-member-add
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayGuildMemberAddDispatchData extends APIGuildMember {
|
||||
/**
|
||||
@@ -661,6 +718,7 @@ export interface GatewayGuildMemberAddDispatchData extends APIGuildMember {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-member-remove
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildMemberRemoveDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildMemberRemove,
|
||||
@@ -669,6 +727,7 @@ export type GatewayGuildMemberRemoveDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-member-remove
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayGuildMemberRemoveDispatchData {
|
||||
/**
|
||||
@@ -685,6 +744,7 @@ export interface GatewayGuildMemberRemoveDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-member-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildMemberUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildMemberUpdate,
|
||||
@@ -693,6 +753,7 @@ export type GatewayGuildMemberUpdateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-member-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildMemberUpdateDispatchData = Omit<APIGuildMember, 'deaf' | 'mute' | 'user' | 'joined_at'> &
|
||||
Partial<Pick<APIGuildMember, 'deaf' | 'mute'>> &
|
||||
@@ -706,6 +767,7 @@ export type GatewayGuildMemberUpdateDispatchData = Omit<APIGuildMember, 'deaf' |
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-members-chunk
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildMembersChunkDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildMembersChunk,
|
||||
@@ -714,6 +776,7 @@ export type GatewayGuildMembersChunkDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-members-chunk
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayGuildMembersChunkDispatchData {
|
||||
/**
|
||||
@@ -755,6 +818,7 @@ export interface GatewayGuildMembersChunkDispatchData {
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-role-create
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-role-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildRoleModifyDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleCreate | GatewayDispatchEvents.GuildRoleUpdate,
|
||||
@@ -764,6 +828,7 @@ export type GatewayGuildRoleModifyDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-role-create
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-role-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayGuildRoleModifyDispatchData {
|
||||
/**
|
||||
@@ -780,26 +845,31 @@ export interface GatewayGuildRoleModifyDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-role-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-role-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-role-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-role-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildRoleUpdateDispatchData = GatewayGuildRoleModifyDispatchData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-role-delete
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildRoleDeleteDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleDelete,
|
||||
@@ -808,6 +878,7 @@ export type GatewayGuildRoleDeleteDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#guild-role-delete
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayGuildRoleDeleteDispatchData {
|
||||
/**
|
||||
@@ -820,43 +891,73 @@ export interface GatewayGuildRoleDeleteDispatchData {
|
||||
role_id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildScheduledEventCreateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildScheduledEventCreate,
|
||||
GatewayGuildScheduledEventCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildScheduledEventCreateDispatchData = APIGuildScheduledEvent;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildScheduledEventUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildScheduledEventUpdate,
|
||||
GatewayGuildScheduledEventUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildScheduledEventUpdateDispatchData = APIGuildScheduledEvent;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildScheduledEventDeleteDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildScheduledEventDelete,
|
||||
GatewayGuildScheduledEventDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildScheduledEventDeleteDispatchData = APIGuildScheduledEvent;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildScheduledEventUserAddDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildScheduledEventUserAdd,
|
||||
GatewayGuildScheduledEventUserAddDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayGuildScheduledEventUserAddDispatchData {
|
||||
guild_scheduled_event_id: Snowflake;
|
||||
user_id: Snowflake;
|
||||
guild_id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildScheduledEventUserRemoveDispatch = DataPayload<
|
||||
GatewayDispatchEvents.GuildScheduledEventUserRemove,
|
||||
GatewayGuildScheduledEventUserAddDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayGuildScheduledEventUserRemoveDispatchData {
|
||||
guild_scheduled_event_id: Snowflake;
|
||||
user_id: Snowflake;
|
||||
@@ -865,6 +966,7 @@ export interface GatewayGuildScheduledEventUserRemoveDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#integration-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayIntegrationCreateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.IntegrationCreate,
|
||||
@@ -873,11 +975,13 @@ export type GatewayIntegrationCreateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#integration-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayIntegrationCreateDispatchData = APIGuildIntegration & { guild_id: Snowflake };
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#integration-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayIntegrationUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.IntegrationUpdate,
|
||||
@@ -886,11 +990,13 @@ export type GatewayIntegrationUpdateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#integration-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayIntegrationUpdateDispatchData = APIGuildIntegration & { guild_id: Snowflake };
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#integration-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayIntegrationDeleteDispatch = DataPayload<
|
||||
GatewayDispatchEvents.IntegrationDelete,
|
||||
@@ -899,6 +1005,7 @@ export type GatewayIntegrationDeleteDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#integration-delete
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayIntegrationDeleteDispatchData {
|
||||
/**
|
||||
@@ -917,6 +1024,7 @@ export interface GatewayIntegrationDeleteDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#interaction-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayInteractionCreateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.InteractionCreate,
|
||||
@@ -925,11 +1033,13 @@ export type GatewayInteractionCreateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#interaction-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayInteractionCreateDispatchData = APIApplicationCommandInteraction | APIMessageComponentInteraction;
|
||||
export type GatewayInteractionCreateDispatchData = APIInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#invite-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayInviteCreateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.InviteCreate,
|
||||
@@ -938,6 +1048,7 @@ export type GatewayInviteCreateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#invite-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayInviteCreateDispatchData {
|
||||
/**
|
||||
@@ -1000,6 +1111,7 @@ export interface GatewayInviteCreateDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#invite-delete
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayInviteDeleteDispatch = DataPayload<
|
||||
GatewayDispatchEvents.InviteDelete,
|
||||
@@ -1008,6 +1120,7 @@ export type GatewayInviteDeleteDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#invite-delete
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayInviteDeleteDispatchData {
|
||||
/**
|
||||
@@ -1028,6 +1141,7 @@ export interface GatewayInviteDeleteDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayMessageCreateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.MessageCreate,
|
||||
@@ -1036,11 +1150,13 @@ export type GatewayMessageCreateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayMessageCreateDispatchData = APIMessage;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayMessageUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.MessageUpdate,
|
||||
@@ -1049,6 +1165,7 @@ export type GatewayMessageUpdateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayMessageUpdateDispatchData = {
|
||||
id: Snowflake;
|
||||
@@ -1057,6 +1174,7 @@ export type GatewayMessageUpdateDispatchData = {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-delete
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayMessageDeleteDispatch = DataPayload<
|
||||
GatewayDispatchEvents.MessageDelete,
|
||||
@@ -1065,6 +1183,7 @@ export type GatewayMessageDeleteDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-delete
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayMessageDeleteDispatchData {
|
||||
/**
|
||||
@@ -1083,6 +1202,7 @@ export interface GatewayMessageDeleteDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-delete-bulk
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayMessageDeleteBulkDispatch = DataPayload<
|
||||
GatewayDispatchEvents.MessageDeleteBulk,
|
||||
@@ -1091,6 +1211,7 @@ export type GatewayMessageDeleteBulkDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-delete-bulk
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayMessageDeleteBulkDispatchData {
|
||||
/**
|
||||
@@ -1109,26 +1230,31 @@ export interface GatewayMessageDeleteBulkDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-reaction-add
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayMessageReactionAddDispatch = ReactionData<GatewayDispatchEvents.MessageReactionAdd>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-reaction-add
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDispatch['d'];
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayMessageReactionRemoveDispatch = ReactionData<GatewayDispatchEvents.MessageReactionRemove, 'member'>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayMessageReactionRemoveDispatchData = GatewayMessageReactionRemoveDispatch['d'];
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayMessageReactionRemoveAllDispatch = DataPayload<
|
||||
GatewayDispatchEvents.MessageReactionRemoveAll,
|
||||
@@ -1137,11 +1263,13 @@ export type GatewayMessageReactionRemoveAllDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayMessageReactionRemoveAllDispatchData = MessageReactionRemoveData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload<
|
||||
GatewayDispatchEvents.MessageReactionRemoveEmoji,
|
||||
@@ -1150,6 +1278,7 @@ export type GatewayMessageReactionRemoveEmojiDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayMessageReactionRemoveEmojiDispatchData extends MessageReactionRemoveData {
|
||||
/**
|
||||
@@ -1160,6 +1289,7 @@ export interface GatewayMessageReactionRemoveEmojiDispatchData extends MessageRe
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#presence-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayPresenceUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.PresenceUpdate,
|
||||
@@ -1168,11 +1298,13 @@ export type GatewayPresenceUpdateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#presence-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayPresenceUpdateDispatchData = RawGatewayPresenceUpdate;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#stage-instance-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayStageInstanceCreateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.StageInstanceCreate,
|
||||
@@ -1181,11 +1313,13 @@ export type GatewayStageInstanceCreateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#stage-instance-create
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayStageInstanceCreateDispatchData = APIStageInstance;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#stage-instance-delete
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayStageInstanceDeleteDispatch = DataPayload<
|
||||
GatewayDispatchEvents.StageInstanceDelete,
|
||||
@@ -1194,11 +1328,13 @@ export type GatewayStageInstanceDeleteDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#stage-instance-delete
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayStageInstanceDeleteDispatchData = APIStageInstance;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#stage-instance-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayStageInstanceUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.StageInstanceUpdate,
|
||||
@@ -1207,16 +1343,19 @@ export type GatewayStageInstanceUpdateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#stage-instance-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayStageInstanceUpdateDispatchData = APIStageInstance;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#typing-start
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayTypingStartDispatch = DataPayload<GatewayDispatchEvents.TypingStart, GatewayTypingStartDispatchData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#typing-start
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayTypingStartDispatchData {
|
||||
/**
|
||||
@@ -1245,16 +1384,19 @@ export interface GatewayTypingStartDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#user-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayUserUpdateDispatch = DataPayload<GatewayDispatchEvents.UserUpdate, GatewayUserUpdateDispatchData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#user-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayUserUpdateDispatchData = APIUser;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#voice-state-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayVoiceStateUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.VoiceStateUpdate,
|
||||
@@ -1263,11 +1405,13 @@ export type GatewayVoiceStateUpdateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#voice-state-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#voice-server-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayVoiceServerUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.VoiceServerUpdate,
|
||||
@@ -1276,6 +1420,7 @@ export type GatewayVoiceServerUpdateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#voice-server-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayVoiceServerUpdateDispatchData {
|
||||
/**
|
||||
@@ -1298,6 +1443,7 @@ export interface GatewayVoiceServerUpdateDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#webhooks-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayWebhooksUpdateDispatch = DataPayload<
|
||||
GatewayDispatchEvents.WebhooksUpdate,
|
||||
@@ -1306,6 +1452,7 @@ export type GatewayWebhooksUpdateDispatch = DataPayload<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#webhooks-update
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayWebhooksUpdateDispatchData {
|
||||
/**
|
||||
@@ -1324,6 +1471,7 @@ export interface GatewayWebhooksUpdateDispatchData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#heartbeating
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayHeartbeat {
|
||||
op: GatewayOpcodes.Heartbeat;
|
||||
@@ -1332,11 +1480,13 @@ export interface GatewayHeartbeat {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#heartbeating
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayHeartbeatData = number | null;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#identify
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayIdentify {
|
||||
op: GatewayOpcodes.Identify;
|
||||
@@ -1345,6 +1495,7 @@ export interface GatewayIdentify {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#identify
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayIdentifyData {
|
||||
/**
|
||||
@@ -1392,6 +1543,7 @@ export interface GatewayIdentifyData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayIdentifyProperties {
|
||||
/**
|
||||
@@ -1410,6 +1562,7 @@ export interface GatewayIdentifyProperties {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#resume
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayResume {
|
||||
op: GatewayOpcodes.Resume;
|
||||
@@ -1418,6 +1571,7 @@ export interface GatewayResume {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#resume
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayResumeData {
|
||||
/**
|
||||
@@ -1436,6 +1590,7 @@ export interface GatewayResumeData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#request-guild-members
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayRequestGuildMembers {
|
||||
op: GatewayOpcodes.RequestGuildMembers;
|
||||
@@ -1444,6 +1599,7 @@ export interface GatewayRequestGuildMembers {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#request-guild-members
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayRequestGuildMembersData {
|
||||
/**
|
||||
@@ -1479,6 +1635,7 @@ export interface GatewayRequestGuildMembersData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#update-voice-state
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayVoiceStateUpdate {
|
||||
op: GatewayOpcodes.VoiceStateUpdate;
|
||||
@@ -1487,6 +1644,7 @@ export interface GatewayVoiceStateUpdate {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#update-voice-state
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayVoiceStateUpdateData {
|
||||
/**
|
||||
@@ -1509,6 +1667,7 @@ export interface GatewayVoiceStateUpdateData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#update-presence
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayUpdatePresence {
|
||||
op: GatewayOpcodes.PresenceUpdate;
|
||||
@@ -1517,6 +1676,7 @@ export interface GatewayUpdatePresence {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#update-presence-gateway-presence-update-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayPresenceUpdateData {
|
||||
/**
|
||||
@@ -1543,6 +1703,7 @@ export interface GatewayPresenceUpdateData {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'type' | 'url'>;
|
||||
|
||||
@@ -1616,6 +1777,9 @@ type ReactionData<E extends GatewayDispatchEvents, O extends string = never> = D
|
||||
>
|
||||
>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
interface MessageReactionRemoveData {
|
||||
/**
|
||||
* The id of the channel
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
import type { Snowflake } from '../globals.ts';
|
||||
import type {
|
||||
APIApplication,
|
||||
APIApplicationCommandInteraction,
|
||||
APIChannel,
|
||||
APIEmoji,
|
||||
APIGuild,
|
||||
APIGuildScheduledEvent,
|
||||
APIGuildIntegration,
|
||||
APIGuildMember,
|
||||
APIGuildScheduledEvent,
|
||||
APIInteraction,
|
||||
APIMessage,
|
||||
APIMessageComponentInteraction,
|
||||
APIRole,
|
||||
APIStageInstance,
|
||||
APISticker,
|
||||
APIThreadChannel,
|
||||
APIThreadMember,
|
||||
APIUnavailableGuild,
|
||||
APIUser,
|
||||
@@ -27,7 +27,6 @@ import type {
|
||||
GatewayVoiceState,
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
APIThreadChannel,
|
||||
} from '../payloads/v9/mod.ts';
|
||||
import type { Nullable } from '../utils/internals.ts';
|
||||
|
||||
@@ -940,7 +939,7 @@ export type GatewayInteractionCreateDispatch = DataPayload<
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#interaction-create
|
||||
*/
|
||||
export type GatewayInteractionCreateDispatchData = APIApplicationCommandInteraction | APIMessageComponentInteraction;
|
||||
export type GatewayInteractionCreateDispatchData = APIInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#invite-create
|
||||
|
||||
56
deno/payloads/common.ts
Normal file
56
deno/payloads/common.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
|
||||
*
|
||||
* These flags are exported as `BigInt`s and NOT numbers. Wrapping them in `Number()`
|
||||
* may cause issues, try to use BigInts as much as possible or modules that can
|
||||
* replicate them in some way
|
||||
*/
|
||||
export const PermissionFlagsBits = {
|
||||
CreateInstantInvite: 1n << 0n,
|
||||
KickMembers: 1n << 1n,
|
||||
BanMembers: 1n << 2n,
|
||||
Administrator: 1n << 3n,
|
||||
ManageChannels: 1n << 4n,
|
||||
ManageGuild: 1n << 5n,
|
||||
AddReactions: 1n << 6n,
|
||||
ViewAuditLog: 1n << 7n,
|
||||
PrioritySpeaker: 1n << 8n,
|
||||
Stream: 1n << 9n,
|
||||
ViewChannel: 1n << 10n,
|
||||
SendMessages: 1n << 11n,
|
||||
SendTTSMessages: 1n << 12n,
|
||||
ManageMessages: 1n << 13n,
|
||||
EmbedLinks: 1n << 14n,
|
||||
AttachFiles: 1n << 15n,
|
||||
ReadMessageHistory: 1n << 16n,
|
||||
MentionEveryone: 1n << 17n,
|
||||
UseExternalEmojis: 1n << 18n,
|
||||
ViewGuildInsights: 1n << 19n,
|
||||
Connect: 1n << 20n,
|
||||
Speak: 1n << 21n,
|
||||
MuteMembers: 1n << 22n,
|
||||
DeafenMembers: 1n << 23n,
|
||||
MoveMembers: 1n << 24n,
|
||||
UseVAD: 1n << 25n,
|
||||
ChangeNickname: 1n << 26n,
|
||||
ManageNicknames: 1n << 27n,
|
||||
ManageRoles: 1n << 28n,
|
||||
ManageWebhooks: 1n << 29n,
|
||||
ManageEmojisAndStickers: 1n << 30n,
|
||||
UseApplicationCommands: 1n << 31n,
|
||||
RequestToSpeak: 1n << 32n,
|
||||
ManageEvents: 1n << 33n,
|
||||
ManageThreads: 1n << 34n,
|
||||
CreatePublicThreads: 1n << 35n,
|
||||
CreatePrivateThreads: 1n << 36n,
|
||||
UseExternalStickers: 1n << 37n,
|
||||
SendMessagesInThreads: 1n << 38n,
|
||||
StartEmbeddedActivities: 1n << 39n,
|
||||
ModerateMembers: 1n << 40n,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* Freeze the object of bits, preventing any modifications to it
|
||||
* @internal
|
||||
*/
|
||||
Object.freeze(PermissionFlagsBits);
|
||||
@@ -1,4 +1,4 @@
|
||||
// This file exports all the payloads available in the recommended API version
|
||||
// Thereby, things MAY break in the future. Try sticking to imports from a specific version
|
||||
|
||||
export * from './v9/mod.ts';
|
||||
export * from './v10/mod.ts';
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { Snowflake } from '../../../../../globals.ts';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export type APIApplicationCommandAttachmentOption =
|
||||
APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment>;
|
||||
|
||||
export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Attachment,
|
||||
Snowflake
|
||||
>;
|
||||
@@ -0,0 +1,26 @@
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandOptionBase<Type extends ApplicationCommandOptionType> {
|
||||
type: Type;
|
||||
name: string;
|
||||
description: string;
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
export interface APIInteractionDataOptionBase<T extends ApplicationCommandOptionType, D> {
|
||||
name: string;
|
||||
type: T;
|
||||
value: D;
|
||||
}
|
||||
|
||||
export type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
|
||||
Base extends APIApplicationCommandOptionBase<ApplicationCommandOptionType>,
|
||||
ChoiceType extends APIApplicationCommandOptionChoice,
|
||||
> =
|
||||
| (Base & {
|
||||
autocomplete: true;
|
||||
})
|
||||
| (Base & {
|
||||
autocomplete?: false;
|
||||
choices?: ChoiceType[];
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export type APIApplicationCommandBooleanOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Boolean>;
|
||||
|
||||
export type APIApplicationCommandInteractionDataBooleanOption = APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Boolean,
|
||||
boolean
|
||||
>;
|
||||
@@ -0,0 +1,14 @@
|
||||
import type { Snowflake } from '../../../../../globals.ts';
|
||||
import type { ChannelType } from '../../../channel.ts';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandChannelOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>[];
|
||||
}
|
||||
|
||||
export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Channel,
|
||||
Snowflake
|
||||
>;
|
||||
@@ -0,0 +1,28 @@
|
||||
import type {
|
||||
APIApplicationCommandOptionBase,
|
||||
APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper,
|
||||
APIInteractionDataOptionBase,
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
interface APIApplicationCommandIntegerOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
|
||||
APIApplicationCommandIntegerOptionBase,
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Integer, number> {
|
||||
focused?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { Snowflake } from '../../../../../globals.ts';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export type APIApplicationCommandMentionableOption =
|
||||
APIApplicationCommandOptionBase<ApplicationCommandOptionType.Mentionable>;
|
||||
|
||||
export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Mentionable,
|
||||
Snowflake
|
||||
>;
|
||||
@@ -0,0 +1,28 @@
|
||||
import type {
|
||||
APIApplicationCommandOptionBase,
|
||||
APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper,
|
||||
APIInteractionDataOptionBase,
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
interface APIApplicationCommandNumberOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
*/
|
||||
min_value?: number;
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
*/
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
|
||||
APIApplicationCommandNumberOptionBase,
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataNumberOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Number, number> {
|
||||
focused?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import type { Snowflake } from '../../../../../globals.ts';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Role>;
|
||||
|
||||
export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Role,
|
||||
Snowflake
|
||||
>;
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
|
||||
*/
|
||||
export enum ApplicationCommandOptionType {
|
||||
Subcommand = 1,
|
||||
SubcommandGroup,
|
||||
String,
|
||||
Integer,
|
||||
Boolean,
|
||||
User,
|
||||
Channel,
|
||||
Role,
|
||||
Mentionable,
|
||||
Number,
|
||||
Attachment,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
|
||||
*/
|
||||
export interface APIApplicationCommandOptionChoice<ValueType = string | number> {
|
||||
name: string;
|
||||
value: ValueType;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import type {
|
||||
APIApplicationCommandOptionBase,
|
||||
APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper,
|
||||
APIInteractionDataOptionBase,
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
|
||||
APIApplicationCommandOptionBase<ApplicationCommandOptionType.String>,
|
||||
APIApplicationCommandOptionChoice<string>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataStringOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
|
||||
focused?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput.ts';
|
||||
import type { APIApplicationCommandOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandSubcommandOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
options?: APIApplicationCommandBasicOption[];
|
||||
}
|
||||
|
||||
export interface APIApplicationCommandInteractionDataSubcommandOption {
|
||||
name: string;
|
||||
type: ApplicationCommandOptionType.Subcommand;
|
||||
options?: APIApplicationCommandInteractionDataBasicOption[];
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import type { APIApplicationCommandOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataSubcommandOption,
|
||||
APIApplicationCommandSubcommandOption,
|
||||
} from './subcommand.ts';
|
||||
|
||||
export interface APIApplicationCommandSubcommandGroupOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
options?: APIApplicationCommandSubcommandOption[];
|
||||
}
|
||||
|
||||
export interface APIApplicationCommandInteractionDataSubcommandGroupOption {
|
||||
name: string;
|
||||
type: ApplicationCommandOptionType.SubcommandGroup;
|
||||
options: APIApplicationCommandInteractionDataSubcommandOption[];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import type { Snowflake } from '../../../../../globals.ts';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.User>;
|
||||
|
||||
export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.User,
|
||||
Snowflake
|
||||
>;
|
||||
@@ -0,0 +1,146 @@
|
||||
import type { Snowflake } from '../../../../globals.ts';
|
||||
import type { APIAttachment, APIRole, APIUser } from '../../mod.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionWrapper,
|
||||
APIInteractionDataResolvedChannel,
|
||||
APIInteractionDataResolvedGuildMember,
|
||||
ApplicationCommandType,
|
||||
} from '../applicationCommands.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
|
||||
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
import type {
|
||||
APIApplicationCommandAttachmentOption,
|
||||
APIApplicationCommandInteractionDataAttachmentOption,
|
||||
} from './_chatInput/attachment.ts';
|
||||
import type {
|
||||
APIApplicationCommandBooleanOption,
|
||||
APIApplicationCommandInteractionDataBooleanOption,
|
||||
} from './_chatInput/boolean.ts';
|
||||
import type {
|
||||
APIApplicationCommandChannelOption,
|
||||
APIApplicationCommandInteractionDataChannelOption,
|
||||
} from './_chatInput/channel.ts';
|
||||
import type {
|
||||
APIApplicationCommandIntegerOption,
|
||||
APIApplicationCommandInteractionDataIntegerOption,
|
||||
} from './_chatInput/integer.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataMentionableOption,
|
||||
APIApplicationCommandMentionableOption,
|
||||
} from './_chatInput/mentionable.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataNumberOption,
|
||||
APIApplicationCommandNumberOption,
|
||||
} from './_chatInput/number.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataRoleOption,
|
||||
APIApplicationCommandRoleOption,
|
||||
} from './_chatInput/role.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataStringOption,
|
||||
APIApplicationCommandStringOption,
|
||||
} from './_chatInput/string.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataSubcommandOption,
|
||||
APIApplicationCommandSubcommandOption,
|
||||
} from './_chatInput/subcommand.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataSubcommandGroupOption,
|
||||
APIApplicationCommandSubcommandGroupOption,
|
||||
} from './_chatInput/subcommandGroup.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataUserOption,
|
||||
APIApplicationCommandUserOption,
|
||||
} from './_chatInput/user.ts';
|
||||
|
||||
export * from './_chatInput/attachment.ts';
|
||||
export * from './_chatInput/boolean.ts';
|
||||
export * from './_chatInput/channel.ts';
|
||||
export * from './_chatInput/integer.ts';
|
||||
export * from './_chatInput/mentionable.ts';
|
||||
export * from './_chatInput/number.ts';
|
||||
export * from './_chatInput/role.ts';
|
||||
export * from './_chatInput/shared.ts';
|
||||
export * from './_chatInput/string.ts';
|
||||
export * from './_chatInput/subcommand.ts';
|
||||
export * from './_chatInput/subcommandGroup.ts';
|
||||
export * from './_chatInput/user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
|
||||
*/
|
||||
export type APIApplicationCommandBasicOption =
|
||||
| APIApplicationCommandStringOption
|
||||
| APIApplicationCommandIntegerOption
|
||||
| APIApplicationCommandBooleanOption
|
||||
| APIApplicationCommandUserOption
|
||||
| APIApplicationCommandChannelOption
|
||||
| APIApplicationCommandRoleOption
|
||||
| APIApplicationCommandMentionableOption
|
||||
| APIApplicationCommandNumberOption
|
||||
| APIApplicationCommandAttachmentOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
|
||||
*/
|
||||
export type APIApplicationCommandOption =
|
||||
| APIApplicationCommandSubcommandOption
|
||||
| APIApplicationCommandSubcommandGroupOption
|
||||
| APIApplicationCommandBasicOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure
|
||||
*/
|
||||
export type APIApplicationCommandInteractionDataOption =
|
||||
| APIApplicationCommandInteractionDataSubcommandOption
|
||||
| APIApplicationCommandInteractionDataSubcommandGroupOption
|
||||
| APIApplicationCommandInteractionDataBasicOption;
|
||||
|
||||
export type APIApplicationCommandInteractionDataBasicOption =
|
||||
| APIApplicationCommandInteractionDataStringOption
|
||||
| APIApplicationCommandInteractionDataIntegerOption
|
||||
| APIApplicationCommandInteractionDataBooleanOption
|
||||
| APIApplicationCommandInteractionDataUserOption
|
||||
| APIApplicationCommandInteractionDataChannelOption
|
||||
| APIApplicationCommandInteractionDataRoleOption
|
||||
| APIApplicationCommandInteractionDataMentionableOption
|
||||
| APIApplicationCommandInteractionDataNumberOption
|
||||
| APIApplicationCommandInteractionDataAttachmentOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
*/
|
||||
export interface APIChatInputApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption[];
|
||||
resolved?: APIChatInputApplicationCommandInteractionDataResolved;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
||||
*/
|
||||
export interface APIChatInputApplicationCommandInteractionDataResolved {
|
||||
users?: Record<Snowflake, APIUser>;
|
||||
roles?: Record<Snowflake, APIRole>;
|
||||
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
|
||||
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
|
||||
attachments?: Record<Snowflake, APIAttachment>;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIChatInputApplicationCommandInteraction =
|
||||
APIApplicationCommandInteractionWrapper<APIChatInputApplicationCommandInteractionData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIChatInputApplicationCommandDMInteraction =
|
||||
APIDMInteractionWrapper<APIChatInputApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIChatInputApplicationCommandGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIChatInputApplicationCommandInteraction>;
|
||||
@@ -0,0 +1,104 @@
|
||||
import type { Snowflake } from '../../../../globals.ts';
|
||||
import type { APIMessage } from '../../channel.ts';
|
||||
import type { APIUser } from '../../user.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionWrapper,
|
||||
APIInteractionDataResolvedGuildMember,
|
||||
ApplicationCommandType,
|
||||
} from '../applicationCommands.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
|
||||
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
*/
|
||||
export interface APIUserApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
target_id: Snowflake;
|
||||
resolved: APIUserApplicationCommandInteractionDataResolved;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
||||
*/
|
||||
export interface APIUserApplicationCommandInteractionDataResolved {
|
||||
users: Record<Snowflake, APIUser>;
|
||||
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
*/
|
||||
export interface APIMessageApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
target_id: Snowflake;
|
||||
resolved: APIMessageApplicationCommandInteractionDataResolved;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
||||
*/
|
||||
export interface APIMessageApplicationCommandInteractionDataResolved {
|
||||
messages: Record<Snowflake, APIMessage>;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
*/
|
||||
export type APIContextMenuInteractionData =
|
||||
| APIUserApplicationCommandInteractionData
|
||||
| APIMessageApplicationCommandInteractionData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIUserApplicationCommandInteraction =
|
||||
APIApplicationCommandInteractionWrapper<APIUserApplicationCommandInteractionData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIUserApplicationCommandDMInteraction = APIDMInteractionWrapper<APIUserApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIUserApplicationCommandGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIUserApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIMessageApplicationCommandInteraction =
|
||||
APIApplicationCommandInteractionWrapper<APIMessageApplicationCommandInteractionData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIMessageApplicationCommandDMInteraction =
|
||||
APIDMInteractionWrapper<APIMessageApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIMessageApplicationCommandGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIMessageApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIContextMenuInteraction = APIUserApplicationCommandInteraction | APIMessageApplicationCommandInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIContextMenuDMInteraction =
|
||||
| APIUserApplicationCommandDMInteraction
|
||||
| APIMessageApplicationCommandDMInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIContextMenuGuildInteraction =
|
||||
| APIUserApplicationCommandGuildInteraction
|
||||
| APIMessageApplicationCommandGuildInteraction;
|
||||
@@ -0,0 +1,8 @@
|
||||
import type { Snowflake } from '../../../../globals.ts';
|
||||
import type { ApplicationCommandType } from '../applicationCommands.ts';
|
||||
|
||||
export interface APIBaseApplicationCommandInteractionData<Type extends ApplicationCommandType> {
|
||||
id: Snowflake;
|
||||
type: Type;
|
||||
name: string;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import type { Snowflake } from '../../../../globals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure
|
||||
*/
|
||||
export interface APIGuildApplicationCommandPermissions {
|
||||
/**
|
||||
* The id of the command
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* The id of the application the command belongs to
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* The id of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* The permissions for the command in the guild
|
||||
*/
|
||||
permissions: APIApplicationCommandPermission[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure
|
||||
*/
|
||||
export interface APIApplicationCommandPermission {
|
||||
/**
|
||||
* The id of the role or user
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Role or user
|
||||
*/
|
||||
type: ApplicationCommandPermissionType;
|
||||
/**
|
||||
* `true` to allow, `false`, to disallow
|
||||
*/
|
||||
permission: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
|
||||
*/
|
||||
export enum ApplicationCommandPermissionType {
|
||||
Role = 1,
|
||||
User,
|
||||
}
|
||||
124
deno/payloads/v10/_interactions/applicationCommands.ts
Normal file
124
deno/payloads/v10/_interactions/applicationCommands.ts
Normal file
@@ -0,0 +1,124 @@
|
||||
import type { Permissions, Snowflake } from '../../../globals.ts';
|
||||
import type { APIPartialChannel, APIThreadMetadata } from '../channel.ts';
|
||||
import type { APIGuildMember } from '../guild.ts';
|
||||
import type { APIBaseInteraction } from './base.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
import type {
|
||||
APIApplicationCommandOption,
|
||||
APIChatInputApplicationCommandDMInteraction,
|
||||
APIChatInputApplicationCommandGuildInteraction,
|
||||
APIChatInputApplicationCommandInteraction,
|
||||
APIChatInputApplicationCommandInteractionData,
|
||||
} from './_applicationCommands/chatInput.ts';
|
||||
import type {
|
||||
APIContextMenuDMInteraction,
|
||||
APIContextMenuGuildInteraction,
|
||||
APIContextMenuInteraction,
|
||||
APIContextMenuInteractionData,
|
||||
} from './_applicationCommands/contextMenu.ts';
|
||||
|
||||
export * from './_applicationCommands/chatInput.ts';
|
||||
export * from './_applicationCommands/contextMenu.ts';
|
||||
export * from './_applicationCommands/permissions.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object
|
||||
*/
|
||||
export interface APIApplicationCommand {
|
||||
/**
|
||||
* Unique id of the command
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Type of the command
|
||||
*/
|
||||
type: ApplicationCommandType;
|
||||
/**
|
||||
* Unique id of the parent application
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Guild id of the command, if not global
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* 1-32 character name; `CHAT_INPUT` command names must be all lowercase matching `^[\w-]{1,32}$`
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* 1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* The parameters for the `CHAT_INPUT` command, max 25
|
||||
*/
|
||||
options?: APIApplicationCommandOption[];
|
||||
/**
|
||||
* Whether the command is enabled by default when the app is added to a guild
|
||||
*
|
||||
* If missing, this property should be assumed as `true`
|
||||
*/
|
||||
default_permission?: boolean;
|
||||
/**
|
||||
* Autoincrementing version identifier updated during substantial record changes
|
||||
*/
|
||||
version: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
|
||||
*/
|
||||
export enum ApplicationCommandType {
|
||||
ChatInput = 1,
|
||||
User,
|
||||
Message,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
*/
|
||||
export type APIApplicationCommandInteractionData =
|
||||
| APIChatInputApplicationCommandInteractionData
|
||||
| APIContextMenuInteractionData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object
|
||||
*/
|
||||
export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
|
||||
thread_metadata?: APIThreadMetadata | null;
|
||||
permissions: Permissions;
|
||||
parent_id?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'user' | 'deaf' | 'mute'> {
|
||||
permissions: Permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> =
|
||||
APIBaseInteraction<InteractionType.ApplicationCommand, Data> &
|
||||
Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommand, Data>, 'channel_id' | 'data'>>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIApplicationCommandInteraction = APIChatInputApplicationCommandInteraction | APIContextMenuInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIApplicationCommandDMInteraction =
|
||||
| APIChatInputApplicationCommandDMInteraction
|
||||
| APIContextMenuDMInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIApplicationCommandGuildInteraction =
|
||||
| APIChatInputApplicationCommandGuildInteraction
|
||||
| APIContextMenuGuildInteraction;
|
||||
30
deno/payloads/v10/_interactions/autocomplete.ts
Normal file
30
deno/payloads/v10/_interactions/autocomplete.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import type {
|
||||
APIBaseInteraction,
|
||||
APIChatInputApplicationCommandInteractionData,
|
||||
APIDMInteractionWrapper,
|
||||
APIGuildInteractionWrapper,
|
||||
InteractionType,
|
||||
} from '../mod.ts';
|
||||
|
||||
export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
|
||||
InteractionType.ApplicationCommandAutocomplete,
|
||||
APIChatInputApplicationCommandInteractionData
|
||||
> &
|
||||
Required<
|
||||
Pick<
|
||||
APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData>,
|
||||
'data'
|
||||
>
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIApplicationCommandAutocompleteDMInteraction =
|
||||
APIDMInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIApplicationCommandAutocompleteGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
|
||||
127
deno/payloads/v10/_interactions/base.ts
Normal file
127
deno/payloads/v10/_interactions/base.ts
Normal file
@@ -0,0 +1,127 @@
|
||||
import type { Permissions, Snowflake } from '../../../globals.ts';
|
||||
import type { LocaleString } from '../../../v10.ts';
|
||||
import type { APIMessage } from '../channel.ts';
|
||||
import type { APIGuildMember } from '../guild.ts';
|
||||
import type { APIUser } from '../user.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
|
||||
export type PartialAPIMessageInteractionGuildMember = Pick<
|
||||
APIGuildMember,
|
||||
| 'roles'
|
||||
| 'premium_since'
|
||||
| 'pending'
|
||||
| 'nick'
|
||||
| 'mute'
|
||||
| 'joined_at'
|
||||
| 'deaf'
|
||||
| 'communication_disabled_until'
|
||||
| 'avatar'
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
|
||||
*/
|
||||
export interface APIMessageInteraction {
|
||||
/**
|
||||
* ID of the interaction
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* The type of interaction
|
||||
*/
|
||||
type: InteractionType;
|
||||
/**
|
||||
* The name of the ApplicationCommand
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The user who invoked the interaction
|
||||
*/
|
||||
user: APIUser;
|
||||
/**
|
||||
* The guild member who invoked the interaction, only sent in MESSAGE_CREATE events
|
||||
*/
|
||||
member?: PartialAPIMessageInteractionGuildMember;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
export interface APIInteractionGuildMember extends APIGuildMember {
|
||||
permissions: Permissions;
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
// INTERACTIONS RECEIVED
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
/**
|
||||
* ID of the interaction
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* ID of the application this interaction is for
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* The type of interaction
|
||||
*/
|
||||
type: Type;
|
||||
/**
|
||||
* The command data payload
|
||||
*/
|
||||
data?: Data;
|
||||
/**
|
||||
* The guild it was sent from
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* The channel it was sent from
|
||||
*/
|
||||
channel_id?: Snowflake;
|
||||
/**
|
||||
* Guild member data for the invoking user, including permissions
|
||||
*
|
||||
* **This is only sent when an interaction is invoked in a guild**
|
||||
*/
|
||||
member?: APIInteractionGuildMember;
|
||||
/**
|
||||
* User object for the invoking user, if invoked in a DM
|
||||
*/
|
||||
user?: APIUser;
|
||||
/**
|
||||
* A continuation token for responding to the interaction
|
||||
*/
|
||||
token: string;
|
||||
/**
|
||||
* Read-only property, always `1`
|
||||
*/
|
||||
version: 1;
|
||||
/**
|
||||
* For components, the message they were attached to
|
||||
*/
|
||||
message?: APIMessage;
|
||||
/**
|
||||
* The selected language of the invoking user
|
||||
*/
|
||||
locale: LocaleString;
|
||||
/**
|
||||
* The guild's preferred locale, if invoked in a guild
|
||||
*/
|
||||
guild_locale?: LocaleString;
|
||||
}
|
||||
|
||||
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
|
||||
Original,
|
||||
'member' | 'guild_id'
|
||||
> &
|
||||
Required<Pick<Original, 'user'>>;
|
||||
|
||||
export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
|
||||
Original,
|
||||
'user'
|
||||
> &
|
||||
Required<Pick<Original, 'member' | 'guild_id'>>;
|
||||
38
deno/payloads/v10/_interactions/messageComponents.ts
Normal file
38
deno/payloads/v10/_interactions/messageComponents.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import type { ComponentType } from '../channel.ts';
|
||||
import type { APIBaseInteraction, InteractionType } from '../interactions.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from './base.ts';
|
||||
|
||||
export type APIMessageComponentInteraction = APIBaseInteraction<
|
||||
InteractionType.MessageComponent,
|
||||
APIMessageComponentInteractionData
|
||||
> &
|
||||
Required<
|
||||
Pick<
|
||||
APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData>,
|
||||
'channel_id' | 'data' | 'message'
|
||||
>
|
||||
>;
|
||||
|
||||
export type APIMessageComponentInteractionData = APIMessageButtonInteractionData | APIMessageSelectMenuInteractionData;
|
||||
|
||||
export interface APIMessageComponentBaseInteractionData<CType extends ComponentType> {
|
||||
/**
|
||||
* The `custom_id` of the component
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* The type of the component
|
||||
*/
|
||||
component_type: CType;
|
||||
}
|
||||
|
||||
export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>;
|
||||
|
||||
export interface APIMessageSelectMenuInteractionData
|
||||
extends APIMessageComponentBaseInteractionData<ComponentType.SelectMenu> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export type APIMessageComponentDMInteraction = APIDMInteractionWrapper<APIMessageComponentInteraction>;
|
||||
|
||||
export type APIMessageComponentGuildInteraction = APIGuildInteractionWrapper<APIMessageComponentInteraction>;
|
||||
46
deno/payloads/v10/_interactions/modalSubmit.ts
Normal file
46
deno/payloads/v10/_interactions/modalSubmit.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts';
|
||||
import type {
|
||||
APIBaseInteraction,
|
||||
APIDMInteractionWrapper,
|
||||
APIGuildInteractionWrapper,
|
||||
ComponentType,
|
||||
InteractionType,
|
||||
} from '../mod.ts';
|
||||
|
||||
export interface ModalSubmitComponent {
|
||||
type: ComponentType;
|
||||
custom_id: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface ModalSubmitActionRowComponent
|
||||
extends Omit<APIActionRowComponent<APIModalActionRowComponent>, 'components'> {
|
||||
components: ModalSubmitComponent[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmission {
|
||||
/**
|
||||
* A developer-defined identifier for the component, max 100 characters
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* A list of child components
|
||||
*/
|
||||
components?: ModalSubmitActionRowComponent[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIModalSubmitInteraction = APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission> &
|
||||
Required<Pick<APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission>, 'data'>>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIModalSubmitDMInteraction = APIDMInteractionWrapper<APIModalSubmitInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>;
|
||||
4
deno/payloads/v10/_interactions/ping.ts
Normal file
4
deno/payloads/v10/_interactions/ping.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import type { APIBaseInteraction } from './base.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
|
||||
export type APIPingInteraction = Omit<APIBaseInteraction<InteractionType.Ping, never>, 'locale'>;
|
||||
124
deno/payloads/v10/_interactions/responses.ts
Normal file
124
deno/payloads/v10/_interactions/responses.ts
Normal file
@@ -0,0 +1,124 @@
|
||||
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v10.ts';
|
||||
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts';
|
||||
import type { MessageFlags } from '../mod.ts';
|
||||
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
|
||||
*/
|
||||
export enum InteractionType {
|
||||
Ping = 1,
|
||||
ApplicationCommand,
|
||||
MessageComponent,
|
||||
ApplicationCommandAutocomplete,
|
||||
ModalSubmit,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object
|
||||
*/
|
||||
export type APIInteractionResponse =
|
||||
| APIInteractionResponsePong
|
||||
| APIInteractionResponseChannelMessageWithSource
|
||||
| APIInteractionResponseDeferredChannelMessageWithSource
|
||||
| APIInteractionResponseDeferredMessageUpdate
|
||||
| APIInteractionResponseUpdateMessage
|
||||
| APIApplicationCommandAutocompleteResponse
|
||||
| APIModalInteractionResponse;
|
||||
|
||||
export interface APIInteractionResponsePong {
|
||||
type: InteractionResponseType.Pong;
|
||||
}
|
||||
|
||||
export interface APIApplicationCommandAutocompleteResponse {
|
||||
type: InteractionResponseType.ApplicationCommandAutocompleteResult;
|
||||
data: APICommandAutocompleteInteractionResponseCallbackData;
|
||||
}
|
||||
|
||||
export interface APIModalInteractionResponse {
|
||||
type: InteractionResponseType.Modal;
|
||||
data: APIModalInteractionResponseCallbackData;
|
||||
}
|
||||
|
||||
export interface APIInteractionResponseChannelMessageWithSource {
|
||||
type: InteractionResponseType.ChannelMessageWithSource;
|
||||
data: APIInteractionResponseCallbackData;
|
||||
}
|
||||
|
||||
export interface APIInteractionResponseDeferredChannelMessageWithSource {
|
||||
type: InteractionResponseType.DeferredChannelMessageWithSource;
|
||||
data?: Pick<APIInteractionResponseCallbackData, 'flags'>;
|
||||
}
|
||||
|
||||
export interface APIInteractionResponseDeferredMessageUpdate {
|
||||
type: InteractionResponseType.DeferredMessageUpdate;
|
||||
}
|
||||
|
||||
export interface APIInteractionResponseUpdateMessage {
|
||||
type: InteractionResponseType.UpdateMessage;
|
||||
data?: APIInteractionResponseCallbackData;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
|
||||
*/
|
||||
export enum InteractionResponseType {
|
||||
/**
|
||||
* ACK a `Ping`
|
||||
*/
|
||||
Pong = 1,
|
||||
/**
|
||||
* Respond to an interaction with a message
|
||||
*/
|
||||
ChannelMessageWithSource = 4,
|
||||
/**
|
||||
* ACK an interaction and edit to a response later, the user sees a loading state
|
||||
*/
|
||||
DeferredChannelMessageWithSource,
|
||||
/**
|
||||
* ACK a button interaction and update it to a loading state
|
||||
*/
|
||||
DeferredMessageUpdate,
|
||||
/**
|
||||
* ACK a button interaction and edit the message to which the button was attached
|
||||
*/
|
||||
UpdateMessage,
|
||||
/**
|
||||
* For autocomplete interactions
|
||||
*/
|
||||
ApplicationCommandAutocompleteResult,
|
||||
/**
|
||||
* Respond to an interaction with an modal for a user to fill-out
|
||||
*/
|
||||
Modal,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
|
||||
*/
|
||||
export type APIInteractionResponseCallbackData = Omit<
|
||||
RESTPostAPIWebhookWithTokenJSONBody,
|
||||
'username' | 'avatar_url'
|
||||
> & { flags?: MessageFlags };
|
||||
|
||||
export interface APICommandAutocompleteInteractionResponseCallbackData {
|
||||
choices?: APIApplicationCommandOptionChoice[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal
|
||||
*/
|
||||
export interface APIModalInteractionResponseCallbackData {
|
||||
/**
|
||||
* A developer-defined identifier for the component, max 100 characters
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* The title of the popup modal
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* Between 1 and 5 (inclusive) components that make up the modal
|
||||
*/
|
||||
components: APIActionRowComponent<APIModalActionRowComponent>[];
|
||||
}
|
||||
115
deno/payloads/v10/application.ts
Normal file
115
deno/payloads/v10/application.ts
Normal file
@@ -0,0 +1,115 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/resources/application
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APITeam } from './teams.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#application-object
|
||||
*/
|
||||
export interface APIApplication {
|
||||
/**
|
||||
* The id of the app
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* The name of the app
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The icon hash of the app
|
||||
*/
|
||||
icon: string | null;
|
||||
/**
|
||||
* The description of the app
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* An array of rpc origin urls, if rpc is enabled
|
||||
*/
|
||||
rpc_origins?: string[];
|
||||
/**
|
||||
* When `false` only app owner can join the app's bot to guilds
|
||||
*/
|
||||
bot_public: boolean;
|
||||
/**
|
||||
* When `true` the app's bot will only join upon completion of the full oauth2 code grant flow
|
||||
*/
|
||||
bot_require_code_grant: boolean;
|
||||
/**
|
||||
* The url of the application's terms of service
|
||||
*/
|
||||
terms_of_service_url?: string;
|
||||
/**
|
||||
* The url of the application's privacy policy
|
||||
*/
|
||||
privacy_policy_url?: string;
|
||||
/**
|
||||
* Partial user object containing info on the owner of the application
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
owner?: APIUser;
|
||||
/**
|
||||
* If this application is a game sold on Discord, this field will be the summary field for the store page
|
||||
* of its primary sku
|
||||
*
|
||||
* @deprecated Always an empty string, will be removed in v11
|
||||
*/
|
||||
summary: '';
|
||||
/**
|
||||
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
|
||||
*
|
||||
* See https://discord.com/developers/docs/game-sdk/applications#get-ticket
|
||||
*/
|
||||
verify_key: string;
|
||||
/**
|
||||
* The team this application belongs to
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/teams#data-models-team-object
|
||||
*/
|
||||
team: APITeam | null;
|
||||
/**
|
||||
* If this application is a game sold on Discord, this field will be the guild to which it has been linked
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists
|
||||
*/
|
||||
primary_sku_id?: Snowflake;
|
||||
/**
|
||||
* If this application is a game sold on Discord, this field will be the URL slug that links to the store page
|
||||
*/
|
||||
slug?: string;
|
||||
/**
|
||||
* If this application is a game sold on Discord, this field will be the hash of the image on store embeds
|
||||
*/
|
||||
cover_image?: string;
|
||||
/**
|
||||
* The application's public flags
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/application#application-object-application-flags
|
||||
*/
|
||||
flags: ApplicationFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#application-object-application-flags
|
||||
*/
|
||||
export enum ApplicationFlags {
|
||||
EmbeddedReleased = 1 << 1,
|
||||
ManagedEmoji = 1 << 2,
|
||||
GroupDMCreate = 1 << 4,
|
||||
RPCHasConnected = 1 << 11,
|
||||
GatewayPresence = 1 << 12,
|
||||
GatewayPresenceLimited = 1 << 13,
|
||||
GatewayGuildMembers = 1 << 14,
|
||||
GatewayGuildMembersLimited = 1 << 15,
|
||||
VerificationPendingGuildLimit = 1 << 16,
|
||||
Embedded = 1 << 17,
|
||||
GatewayMessageContent = 1 << 18,
|
||||
GatewayMessageContentLimited = 1 << 19,
|
||||
EmbeddedFirstParty = 1 << 20,
|
||||
}
|
||||
702
deno/payloads/v10/auditLog.ts
Normal file
702
deno/payloads/v10/auditLog.ts
Normal file
@@ -0,0 +1,702 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/resources/audit-log
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIChannel, APIOverwrite } from './channel.ts';
|
||||
import type {
|
||||
APIGuildIntegration,
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildMFALevel,
|
||||
GuildVerificationLevel,
|
||||
IntegrationExpireBehavior,
|
||||
} from './guild.ts';
|
||||
import type {
|
||||
APIGuildScheduledEvent,
|
||||
GuildScheduledEventEntityType,
|
||||
GuildScheduledEventStatus,
|
||||
} from './guildScheduledEvent.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { StageInstancePrivacyLevel } from './stageInstance.ts';
|
||||
import type { StickerFormatType } from './sticker.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
import type { APIWebhook } from './webhook.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
|
||||
*/
|
||||
export interface APIAuditLog {
|
||||
/**
|
||||
* Webhooks found in the audit log
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/webhook#webhook-object
|
||||
*/
|
||||
webhooks: APIWebhook[];
|
||||
/**
|
||||
* Users found in the audit log
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
users: APIUser[];
|
||||
/**
|
||||
* Audit log entries
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object
|
||||
*/
|
||||
audit_log_entries: APIAuditLogEntry[];
|
||||
/**
|
||||
* Partial integration objects
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#integration-object
|
||||
*/
|
||||
integrations: APIGuildIntegration[];
|
||||
/**
|
||||
* Threads found in the audit log
|
||||
*
|
||||
* Threads referenced in THREAD_CREATE and THREAD_UPDATE events are included in the threads map, since archived threads might not be kept in memory by clients.
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object
|
||||
*/
|
||||
threads: APIChannel[];
|
||||
/**
|
||||
* The guild scheduled events in the audit log
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object
|
||||
*/
|
||||
guild_scheduled_events: APIGuildScheduledEvent[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure
|
||||
*/
|
||||
export interface APIAuditLogEntry {
|
||||
/**
|
||||
* ID of the affected entity (webhook, user, role, etc.)
|
||||
*/
|
||||
target_id: string | null;
|
||||
/**
|
||||
* Changes made to the `target_id`
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/audit-log#audit-log-change-object
|
||||
*/
|
||||
changes?: APIAuditLogChange[];
|
||||
/**
|
||||
* The user who made the changes
|
||||
*
|
||||
* This can be `null` in some cases (webhooks deleting themselves by using their own token, for example)
|
||||
*/
|
||||
user_id: Snowflake | null;
|
||||
/**
|
||||
* ID of the entry
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Type of action that occurred
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
|
||||
*/
|
||||
action_type: AuditLogEvent;
|
||||
/**
|
||||
* Additional info for certain action types
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
|
||||
*/
|
||||
options?: APIAuditLogOptions;
|
||||
/**
|
||||
* The reason for the change (0-512 characters)
|
||||
*/
|
||||
reason?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
|
||||
*/
|
||||
export enum AuditLogEvent {
|
||||
GuildUpdate = 1,
|
||||
|
||||
ChannelCreate = 10,
|
||||
ChannelUpdate,
|
||||
ChannelDelete,
|
||||
ChannelOverwriteCreate,
|
||||
ChannelOverwriteUpdate,
|
||||
ChannelOverwriteDelete,
|
||||
|
||||
MemberKick = 20,
|
||||
MemberPrune,
|
||||
MemberBanAdd,
|
||||
MemberBanRemove,
|
||||
MemberUpdate,
|
||||
MemberRoleUpdate,
|
||||
MemberMove,
|
||||
MemberDisconnect,
|
||||
BotAdd,
|
||||
|
||||
RoleCreate = 30,
|
||||
RoleUpdate,
|
||||
RoleDelete,
|
||||
|
||||
InviteCreate = 40,
|
||||
InviteUpdate,
|
||||
InviteDelete,
|
||||
|
||||
WebhookCreate = 50,
|
||||
WebhookUpdate,
|
||||
WebhookDelete,
|
||||
|
||||
EmojiCreate = 60,
|
||||
EmojiUpdate,
|
||||
EmojiDelete,
|
||||
|
||||
MessageDelete = 72,
|
||||
MessageBulkDelete,
|
||||
MessagePin,
|
||||
MessageUnpin,
|
||||
|
||||
IntegrationCreate = 80,
|
||||
IntegrationUpdate,
|
||||
IntegrationDelete,
|
||||
StageInstanceCreate,
|
||||
StageInstanceUpdate,
|
||||
StageInstanceDelete,
|
||||
|
||||
StickerCreate = 90,
|
||||
StickerUpdate,
|
||||
StickerDelete,
|
||||
|
||||
GuildScheduledEventCreate = 100,
|
||||
GuildScheduledEventUpdate,
|
||||
GuildScheduledEventDelete,
|
||||
|
||||
ThreadCreate = 110,
|
||||
ThreadUpdate,
|
||||
ThreadDelete,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
|
||||
*/
|
||||
export interface APIAuditLogOptions {
|
||||
/**
|
||||
* Number of days after which inactive members were kicked
|
||||
*
|
||||
* Present from:
|
||||
* - MEMBER_PRUNE
|
||||
*/
|
||||
delete_member_days?: string;
|
||||
/**
|
||||
* Number of members removed by the prune
|
||||
*
|
||||
* Present from:
|
||||
* - MEMBER_PRUNE
|
||||
*/
|
||||
members_removed?: string;
|
||||
|
||||
/**
|
||||
* Channel in which the entities were targeted
|
||||
*
|
||||
* Present from:
|
||||
* - MEMBER_MOVE
|
||||
* - MESSAGE_PIN
|
||||
* - MESSAGE_UNPIN
|
||||
* - MESSAGE_DELETE
|
||||
* - STAGE_INSTANCE_CREATE
|
||||
* - STAGE_INSTANCE_UPDATE
|
||||
* - STAGE_INSTANCE_DELETE
|
||||
*/
|
||||
channel_id?: Snowflake;
|
||||
|
||||
/**
|
||||
* ID of the message that was targeted
|
||||
*
|
||||
* Present from:
|
||||
* - MESSAGE_PIN
|
||||
* - MESSAGE_UNPIN
|
||||
*/
|
||||
message_id?: Snowflake;
|
||||
|
||||
/**
|
||||
* Number of entities that were targeted
|
||||
*
|
||||
* Present from:
|
||||
* - MESSAGE_DELETE
|
||||
* - MESSAGE_BULK_DELETE
|
||||
* - MEMBER_DISCONNECT
|
||||
* - MEMBER_MOVE
|
||||
*/
|
||||
count?: string;
|
||||
|
||||
/**
|
||||
* ID of the overwritten entity
|
||||
*
|
||||
* Present from:
|
||||
* - CHANNEL_OVERWRITE_CREATE
|
||||
* - CHANNEL_OVERWRITE_UPDATE
|
||||
* - CHANNEL_OVERWRITE_DELETE
|
||||
*/
|
||||
id?: Snowflake;
|
||||
|
||||
/**
|
||||
* Type of overwritten entity - "0" for "role" or "1" for "member"
|
||||
*
|
||||
* Present from:
|
||||
* - CHANNEL_OVERWRITE_CREATE
|
||||
* - CHANNEL_OVERWRITE_UPDATE
|
||||
* - CHANNEL_OVERWRITE_DELETE
|
||||
*
|
||||
* {@link AuditLogOptionsType}
|
||||
*/
|
||||
type?: AuditLogOptionsType;
|
||||
|
||||
/**
|
||||
* Name of the role
|
||||
*
|
||||
* Present from:
|
||||
* - CHANNEL_OVERWRITE_CREATE
|
||||
* - CHANNEL_OVERWRITE_UPDATE
|
||||
* - CHANNEL_OVERWRITE_DELETE
|
||||
*
|
||||
* **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
|
||||
*/
|
||||
role_name?: string;
|
||||
}
|
||||
|
||||
export enum AuditLogOptionsType {
|
||||
Role = '0',
|
||||
Member = '1',
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
|
||||
*/
|
||||
export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyName
|
||||
| APIAuditLogChangeKeyDescription
|
||||
| APIAuditLogChangeKeyIconHash
|
||||
| APIAuditLogChangeKeySplashHash
|
||||
| APIAuditLogChangeKeyDiscoverySplashHash
|
||||
| APIAuditLogChangeKeyBannerHash
|
||||
| APIAuditLogChangeKeyOwnerId
|
||||
| APIAuditLogChangeKeyRegion
|
||||
| APIAuditLogChangeKeyPreferredLocale
|
||||
| APIAuditLogChangeKeyAFKChannelId
|
||||
| APIAuditLogChangeKeyAFKTimeout
|
||||
| APIAuditLogChangeKeyRulesChannelId
|
||||
| APIAuditLogChangeKeyPublicUpdatesChannelId
|
||||
| APIAuditLogChangeKeyMFALevel
|
||||
| APIAuditLogChangeKeyVerificationLevel
|
||||
| APIAuditLogChangeKeyExplicitContentFilter
|
||||
| APIAuditLogChangeKeyDefaultMessageNotifications
|
||||
| APIAuditLogChangeKeyVanityURLCode
|
||||
| APIAuditLogChangeKey$Add
|
||||
| APIAuditLogChangeKey$Remove
|
||||
| APIAuditLogChangeKeyPruneDeleteDays
|
||||
| APIAuditLogChangeKeyWidgetEnabled
|
||||
| APIAuditLogChangeKeyWidgetChannelId
|
||||
| APIAuditLogChangeKeySystemChannelId
|
||||
| APIAuditLogChangeKeyPosition
|
||||
| APIAuditLogChangeKeyTopic
|
||||
| APIAuditLogChangeKeyBitrate
|
||||
| APIAuditLogChangeKeyPermissionOverwrites
|
||||
| APIAuditLogChangeKeyNSFW
|
||||
| APIAuditLogChangeKeyApplicationId
|
||||
| APIAuditLogChangeKeyRateLimitPerUser
|
||||
| APIAuditLogChangeKeyPermissions
|
||||
| APIAuditLogChangeKeyColor
|
||||
| APIAuditLogChangeKeyHoist
|
||||
| APIAuditLogChangeKeyMentionable
|
||||
| APIAuditLogChangeKeyAllow
|
||||
| APIAuditLogChangeKeyDeny
|
||||
| APIAuditLogChangeKeyCode
|
||||
| APIAuditLogChangeKeyChannelId
|
||||
| APIAuditLogChangeKeyInviterId
|
||||
| APIAuditLogChangeKeyMaxUses
|
||||
| APIAuditLogChangeKeyUses
|
||||
| APIAuditLogChangeKeyMaxAge
|
||||
| APIAuditLogChangeKeyTemporary
|
||||
| APIAuditLogChangeKeyDeaf
|
||||
| APIAuditLogChangeKeyMute
|
||||
| APIAuditLogChangeKeyNick
|
||||
| APIAuditLogChangeKeyAvatarHash
|
||||
| APIAuditLogChangeKeyId
|
||||
| APIAuditLogChangeKeyType
|
||||
| APIAuditLogChangeKeyEnableEmoticons
|
||||
| APIAuditLogChangeKeyExpireBehavior
|
||||
| APIAuditLogChangeKeyExpireGracePeriod
|
||||
| APIAuditLogChangeKeyUserLimit
|
||||
| APIAuditLogChangeKeyPrivacyLevel
|
||||
| APIAuditLogChangeKeyTags
|
||||
| APIAuditLogChangeKeyFormatType
|
||||
| APIAuditLogChangeKeyAsset
|
||||
| APIAuditLogChangeKeyAvailable
|
||||
| APIAuditLogChangeKeyGuildId
|
||||
| APIAuditLogChangeKeyArchived
|
||||
| APIAuditLogChangeKeyLocked
|
||||
| APIAuditLogChangeKeyAutoArchiveDuration
|
||||
| APIAuditLogChangeKeyDefaultAutoArchiveDuration
|
||||
| APIAuditLogChangeKeyEntityType
|
||||
| APIAuditLogChangeKeyStatus
|
||||
| APIAuditLogChangeKeyLocation
|
||||
| APIAuditLogChangeKeyCommunicationDisabledUntil;
|
||||
|
||||
/**
|
||||
* Returned when an entity's name is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's or sticker's or guild scheduled event's description is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDescription = AuditLogChangeData<'description', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's icon is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's splash is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's discovery splash is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDiscoverySplashHash = AuditLogChangeData<'discovery_splash_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's banner hash is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyBannerHash = AuditLogChangeData<'banner_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's owner_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyOwnerId = AuditLogChangeData<'owner_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's region is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's preferred_locale is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPreferredLocale = AuditLogChangeData<'preferred_locale', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's afk_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAFKChannelId = AuditLogChangeData<'afk_channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's afk_timeout is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's rules_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's public_updates_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's mfa_level is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's verification_level is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's explicit_content_filter is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<
|
||||
'explicit_content_filter',
|
||||
GuildExplicitContentFilter
|
||||
>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's default_message_notifications is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<
|
||||
'default_message_notifications',
|
||||
GuildDefaultMessageNotifications
|
||||
>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's vanity_url_code is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>;
|
||||
|
||||
/**
|
||||
* Returned when new role(s) are added
|
||||
*/
|
||||
export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', APIRole[]>;
|
||||
|
||||
/**
|
||||
* Returned when role(s) are removed
|
||||
*/
|
||||
export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', APIRole[]>;
|
||||
|
||||
/**
|
||||
* Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's widget is enabled
|
||||
*/
|
||||
export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's widget_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyWidgetChannelId = AuditLogChangeData<'widget_channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's system_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeySystemChannelId = AuditLogChangeData<'system_channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's position is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's topic is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>;
|
||||
|
||||
/**
|
||||
* Returned when a voice channel's bitrate is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's permission overwrites is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's NSFW restriction is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>;
|
||||
|
||||
/**
|
||||
* The application ID of the added or removed Webhook or Bot
|
||||
*/
|
||||
export type APIAuditLogChangeKeyApplicationId = AuditLogChangeData<'application_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's amount of seconds a user has to wait before sending another message
|
||||
* is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>;
|
||||
|
||||
/**
|
||||
* Returned when a permission bitfield is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', string>;
|
||||
|
||||
/**
|
||||
* Returned when a role's color is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>;
|
||||
|
||||
/**
|
||||
* Returned when a role's hoist status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a role's mentionable status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when an overwrite's allowed permissions bitfield is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', string>;
|
||||
|
||||
/**
|
||||
* Returned when an overwrite's denied permissions bitfield is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', string>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's code is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's or guild scheduled event's channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyChannelId = AuditLogChangeData<'channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's inviter_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyInviterId = AuditLogChangeData<'inviter_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's max_uses is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's uses is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's max_age is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's temporary status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a user's deaf status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a user's mute status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a user's nick is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyNick = AuditLogChangeData<'nick', string>;
|
||||
|
||||
/**
|
||||
* Returned when a user's avatar_hash is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>;
|
||||
|
||||
/**
|
||||
* The ID of the changed entity - sometimes used in conjunction with other keys
|
||||
*/
|
||||
export type APIAuditLogChangeKeyId = AuditLogChangeData<'id', Snowflake>;
|
||||
|
||||
/**
|
||||
* The type of entity created
|
||||
*/
|
||||
export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', number | string>;
|
||||
|
||||
/**
|
||||
* Returned when an integration's enable_emoticons is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when an integration's expire_behavior is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
|
||||
|
||||
/**
|
||||
* Returned when an integration's expire_grace_period is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;
|
||||
|
||||
/**
|
||||
* Returned when a voice channel's user_limit is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
|
||||
|
||||
/**
|
||||
* Returned when privacy level of a stage instance or guild scheduled event is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's related emoji is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTags = AuditLogChangeData<'tags', string>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's format_type is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyFormatType = AuditLogChangeData<'format_type', StickerFormatType>;
|
||||
|
||||
/**
|
||||
* Empty string
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAsset = AuditLogChangeData<'asset', ''>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's availability is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's guild_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
|
||||
|
||||
/*
|
||||
* Returned when a thread's archive status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
|
||||
|
||||
/*
|
||||
* Returned when a thread's lock status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
|
||||
|
||||
/*
|
||||
* Returned when a thread's auto archive duration is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
|
||||
|
||||
/*
|
||||
* Returned when a channel's default auto archive duration for newly created threads is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<
|
||||
'default_auto_archive_duration',
|
||||
number
|
||||
>;
|
||||
|
||||
/**
|
||||
* Returned when entity type of a guild scheduled event is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEntityType = AuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
|
||||
|
||||
/**
|
||||
* Returned when status of a guild scheduled event is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildScheduledEventStatus>;
|
||||
|
||||
/**
|
||||
* Returned when location of a guild scheduled event is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
|
||||
|
||||
/**
|
||||
* Returned when a user's timeout is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;
|
||||
|
||||
interface AuditLogChangeData<K extends string, D> {
|
||||
key: K;
|
||||
/**
|
||||
* The new value
|
||||
*
|
||||
* If `new_value` is not present in the change object, while `old_value` is,
|
||||
* that means the property that was changed has been reset, or set to `null`
|
||||
*/
|
||||
new_value?: D;
|
||||
old_value?: D;
|
||||
}
|
||||
1377
deno/payloads/v10/channel.ts
Normal file
1377
deno/payloads/v10/channel.ts
Normal file
File diff suppressed because it is too large
Load Diff
51
deno/payloads/v10/emoji.ts
Normal file
51
deno/payloads/v10/emoji.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/resources/emoji
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* Not documented but mentioned
|
||||
*/
|
||||
export interface APIPartialEmoji {
|
||||
/**
|
||||
* Emoji id
|
||||
*/
|
||||
id: Snowflake | null;
|
||||
/**
|
||||
* Emoji name (can be null only in reaction emoji objects)
|
||||
*/
|
||||
name: string | null;
|
||||
/**
|
||||
* Whether this emoji is animated
|
||||
*/
|
||||
animated?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure
|
||||
*/
|
||||
export interface APIEmoji extends APIPartialEmoji {
|
||||
/**
|
||||
* Roles this emoji is whitelisted to
|
||||
*/
|
||||
roles?: APIRole['id'][];
|
||||
/**
|
||||
* User that created this emoji
|
||||
*/
|
||||
user?: APIUser;
|
||||
/**
|
||||
* Whether this emoji must be wrapped in colons
|
||||
*/
|
||||
require_colons?: boolean;
|
||||
/**
|
||||
* Whether this emoji is managed
|
||||
*/
|
||||
managed?: boolean;
|
||||
/**
|
||||
* Whether this emoji can be used, may be false due to loss of Server Boosts
|
||||
*/
|
||||
available?: boolean;
|
||||
}
|
||||
364
deno/payloads/v10/gateway.ts
Normal file
364
deno/payloads/v10/gateway.ts
Normal file
@@ -0,0 +1,364 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/topics/gateway
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIChannel, APIThreadMember } from './channel.ts';
|
||||
import type { APIEmoji } from './emoji.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#get-gateway
|
||||
*/
|
||||
export interface APIGatewayInfo {
|
||||
/**
|
||||
* The WSS URL that can be used for connecting to the gateway
|
||||
*/
|
||||
url: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#get-gateway-bot
|
||||
*/
|
||||
export interface APIGatewayBotInfo extends APIGatewayInfo {
|
||||
/**
|
||||
* The recommended number of shards to use when connecting
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#sharding
|
||||
*/
|
||||
shards: number;
|
||||
/**
|
||||
* Information on the current session start limit
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#session-start-limit-object
|
||||
*/
|
||||
session_start_limit: APIGatewaySessionStartLimit;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#session-start-limit-object
|
||||
*/
|
||||
export interface APIGatewaySessionStartLimit {
|
||||
/**
|
||||
* The total number of session starts the current user is allowed
|
||||
*/
|
||||
total: number;
|
||||
/**
|
||||
* The remaining number of session starts the current user is allowed
|
||||
*/
|
||||
remaining: number;
|
||||
/**
|
||||
* The number of milliseconds after which the limit resets
|
||||
*/
|
||||
reset_after: number;
|
||||
/**
|
||||
* The number of identify requests allowed per 5 seconds
|
||||
*/
|
||||
max_concurrency: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#presence-update-presence-update-event-fields
|
||||
*/
|
||||
export interface GatewayPresenceUpdate {
|
||||
/**
|
||||
* The user presence is being updated for
|
||||
*
|
||||
* **The user object within this event can be partial, the only field which must be sent is the `id` field,
|
||||
* everything else is optional.**
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
user: Partial<APIUser> & Pick<APIUser, 'id'>;
|
||||
/**
|
||||
* ID of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* Either "idle", "dnd", "online", or "offline"
|
||||
*/
|
||||
status?: PresenceUpdateStatus;
|
||||
/**
|
||||
* User's current activities
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#activity-object
|
||||
*/
|
||||
activities?: GatewayActivity[];
|
||||
/**
|
||||
* User's platform-dependent status
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#client-status-object
|
||||
*/
|
||||
client_status?: GatewayPresenceClientStatus;
|
||||
}
|
||||
|
||||
export enum PresenceUpdateStatus {
|
||||
Online = 'online',
|
||||
DoNotDisturb = 'dnd',
|
||||
Idle = 'idle',
|
||||
/**
|
||||
* Invisible and shown as offline
|
||||
*/
|
||||
Invisible = 'invisible',
|
||||
Offline = 'offline',
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#client-status-object
|
||||
*/
|
||||
export interface GatewayPresenceClientStatus {
|
||||
/**
|
||||
* The user's status set for an active desktop (Windows, Linux, Mac) application session
|
||||
*/
|
||||
desktop?: PresenceUpdateStatus;
|
||||
/**
|
||||
* The user's status set for an active mobile (iOS, Android) application session
|
||||
*/
|
||||
mobile?: PresenceUpdateStatus;
|
||||
/**
|
||||
* The user's status set for an active web (browser, bot account) application session
|
||||
*/
|
||||
web?: PresenceUpdateStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-structure
|
||||
*/
|
||||
export interface GatewayActivity {
|
||||
/**
|
||||
* The activity's id
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* The activity's name
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Activity type
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#activity-object-activity-types
|
||||
*/
|
||||
type: ActivityType;
|
||||
/**
|
||||
* Stream url, is validated when type is `1`
|
||||
*/
|
||||
url?: string | null;
|
||||
/**
|
||||
* Unix timestamp of when the activity was added to the user's session
|
||||
*/
|
||||
created_at: number;
|
||||
/**
|
||||
* Unix timestamps for start and/or end of the game
|
||||
*/
|
||||
timestamps?: GatewayActivityTimestamps;
|
||||
sync_id?: string;
|
||||
platform?: ActivityPlatform;
|
||||
/**
|
||||
* Application id for the game
|
||||
*/
|
||||
application_id?: Snowflake;
|
||||
/**
|
||||
* What the player is currently doing
|
||||
*/
|
||||
details?: string | null;
|
||||
/**
|
||||
* The user's current party status
|
||||
*/
|
||||
state?: string | null;
|
||||
/**
|
||||
* The emoji used for a custom status
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji
|
||||
*/
|
||||
emoji?: GatewayActivityEmoji;
|
||||
session_id?: string;
|
||||
/**
|
||||
* Information for the current party of the player
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#activity-object-activity-party
|
||||
*/
|
||||
party?: GatewayActivityParty;
|
||||
/**
|
||||
* Images for the presence and their hover texts
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets
|
||||
*/
|
||||
assets?: GatewayActivityAssets;
|
||||
/**
|
||||
* Secrets for Rich Presence joining and spectating
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets
|
||||
*/
|
||||
secrets?: GatewayActivitySecrets;
|
||||
/**
|
||||
* Whether or not the activity is an instanced game session
|
||||
*/
|
||||
instance?: boolean;
|
||||
/**
|
||||
* Activity flags `OR`d together, describes what the payload includes
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*/
|
||||
flags?: ActivityFlags;
|
||||
/**
|
||||
* The custom buttons shown in the Rich Presence (max 2)
|
||||
*/
|
||||
buttons?: string[] | GatewayActivityButton[];
|
||||
}
|
||||
|
||||
export enum ActivityPlatform {
|
||||
Desktop = 'desktop',
|
||||
Samsung = 'samsung',
|
||||
Xbox = 'xbox',
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-types
|
||||
*/
|
||||
export enum ActivityType {
|
||||
/**
|
||||
* Playing {game}
|
||||
*/
|
||||
Playing,
|
||||
/**
|
||||
* Streaming {details}
|
||||
*/
|
||||
Streaming,
|
||||
/**
|
||||
* Listening to {name}
|
||||
*/
|
||||
Listening,
|
||||
/**
|
||||
* Watching {details}
|
||||
*/
|
||||
Watching,
|
||||
/**
|
||||
* {emoji} {details}
|
||||
*/
|
||||
Custom,
|
||||
/**
|
||||
* Competing in {name}
|
||||
*/
|
||||
Competing,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-timestamps
|
||||
*/
|
||||
export interface GatewayActivityTimestamps {
|
||||
/**
|
||||
* Unix time (in milliseconds) of when the activity started
|
||||
*/
|
||||
start?: number;
|
||||
/**
|
||||
* Unix time (in milliseconds) of when the activity ends
|
||||
*/
|
||||
end?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji
|
||||
*/
|
||||
export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'id' | 'animated'>> & Pick<APIEmoji, 'name'>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-party
|
||||
*/
|
||||
export interface GatewayActivityParty {
|
||||
/**
|
||||
* The id of the party
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* Used to show the party's current and maximum size
|
||||
*/
|
||||
size?: [current_size: number, max_size: number];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets
|
||||
*/
|
||||
export type GatewayActivityAssets = Partial<
|
||||
Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets
|
||||
*/
|
||||
export type GatewayActivitySecrets = Partial<Record<'join' | 'spectate' | 'match', string>>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags
|
||||
*/
|
||||
export enum ActivityFlags {
|
||||
Instance = 1 << 0,
|
||||
Join = 1 << 1,
|
||||
Spectate = 1 << 2,
|
||||
JoinRequest = 1 << 3,
|
||||
Sync = 1 << 4,
|
||||
Play = 1 << 5,
|
||||
PartyPrivacyFriends = 1 << 6,
|
||||
PartyPrivacyVoiceChannel = 1 << 7,
|
||||
Embedded = 1 << 8,
|
||||
}
|
||||
|
||||
export interface GatewayActivityButton {
|
||||
/**
|
||||
* The text shown on the button (1-32 characters)
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* The url opened when clicking the button (1-512 characters)
|
||||
*/
|
||||
url: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#thread-list-sync-thread-list-sync-event-fields
|
||||
*/
|
||||
export interface GatewayThreadListSync {
|
||||
/**
|
||||
* ID of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* The ids of all the parent channels whose threads are being synced, otherwise the entire guild
|
||||
*/
|
||||
channel_ids?: Snowflake[];
|
||||
/**
|
||||
* Array of the synced threads
|
||||
*/
|
||||
threads: APIChannel[];
|
||||
/**
|
||||
* The member objects for the client user in each joined thread that was synced
|
||||
*/
|
||||
members: APIThreadMember[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#thread-members-update-thread-members-update-event-fields
|
||||
*/
|
||||
export interface GatewayThreadMembersUpdate {
|
||||
/**
|
||||
* The id of the thread for which members are being synced
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* The id of the guild that the thread is in
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* The approximate member count of the thread, does not count above 50 even if there are more members
|
||||
*/
|
||||
member_count: number;
|
||||
/**
|
||||
* The members that were added to the thread
|
||||
*/
|
||||
added_members?: APIThreadMember[];
|
||||
/**
|
||||
* The ids of the members that were removed from the thread
|
||||
*/
|
||||
removed_member_ids?: Snowflake[];
|
||||
}
|
||||
969
deno/payloads/v10/guild.ts
Normal file
969
deno/payloads/v10/guild.ts
Normal file
@@ -0,0 +1,969 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/resources/guild
|
||||
*/
|
||||
|
||||
import type { Permissions, Snowflake } from '../../globals.ts';
|
||||
import type { APIChannel } from './channel.ts';
|
||||
import type { APIEmoji } from './emoji.ts';
|
||||
import type { GatewayPresenceUpdate, PresenceUpdateStatus } from './gateway.ts';
|
||||
import type { APIGuildScheduledEvent } from './guildScheduledEvent.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APIStageInstance } from './stageInstance.ts';
|
||||
import type { APISticker } from './sticker.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
import type { GatewayVoiceState } from './voice.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#unavailable-guild-object
|
||||
*/
|
||||
export interface APIUnavailableGuild {
|
||||
/**
|
||||
* Guild id
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* `true` if this guild is unavailable due to an outage
|
||||
*/
|
||||
unavailable: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
|
||||
*/
|
||||
export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'>, Pick<APIGuild, 'welcome_screen'> {
|
||||
/**
|
||||
* Guild name (2-100 characters, excluding trailing and leading whitespace)
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Icon hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
icon: string | null;
|
||||
/**
|
||||
* Splash hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
splash: string | null;
|
||||
/**
|
||||
* Banner hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
banner?: string | null;
|
||||
/**
|
||||
* The description for the guild, if the guild is discoverable
|
||||
*/
|
||||
description?: string | null;
|
||||
/**
|
||||
* Enabled guild features
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
|
||||
*/
|
||||
features?: GuildFeature[];
|
||||
/**
|
||||
* Verification level required for the guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
|
||||
*/
|
||||
verification_level?: GuildVerificationLevel;
|
||||
/**
|
||||
* The vanity url code for the guild
|
||||
*/
|
||||
vanity_url_code?: string | null;
|
||||
/**
|
||||
* `true` if this guild is unavailable due to an outage
|
||||
*/
|
||||
unavailable?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
|
||||
*/
|
||||
export interface APIGuild extends APIPartialGuild {
|
||||
/**
|
||||
* Icon hash, returned when in the template object
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
icon_hash?: string | null;
|
||||
/**
|
||||
* Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
discovery_splash: string | null;
|
||||
/**
|
||||
* `true` if the user is the owner of the guild
|
||||
*
|
||||
* **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds**
|
||||
*/
|
||||
owner?: boolean;
|
||||
/**
|
||||
* ID of owner
|
||||
*/
|
||||
owner_id: Snowflake;
|
||||
/**
|
||||
* Total permissions for the user in the guild (excludes overrides)
|
||||
*
|
||||
* **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds**
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*/
|
||||
permissions?: Permissions;
|
||||
/**
|
||||
* Voice region id for the guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-region-object
|
||||
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
|
||||
*/
|
||||
region: string;
|
||||
/**
|
||||
* ID of afk channel
|
||||
*/
|
||||
afk_channel_id: Snowflake | null;
|
||||
/**
|
||||
* afk timeout in seconds
|
||||
*/
|
||||
afk_timeout: number;
|
||||
/**
|
||||
* `true` if the guild widget is enabled
|
||||
*/
|
||||
widget_enabled?: boolean;
|
||||
/**
|
||||
* The channel id that the widget will generate an invite to, or `null` if set to no invite
|
||||
*/
|
||||
widget_channel_id?: Snowflake | null;
|
||||
/**
|
||||
* Verification level required for the guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
|
||||
*/
|
||||
verification_level: GuildVerificationLevel;
|
||||
/**
|
||||
* Default message notifications level
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
|
||||
*/
|
||||
default_message_notifications: GuildDefaultMessageNotifications;
|
||||
/**
|
||||
* Explicit content filter level
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
|
||||
*/
|
||||
explicit_content_filter: GuildExplicitContentFilter;
|
||||
/**
|
||||
* Roles in the guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/permissions#role-object
|
||||
*/
|
||||
roles: APIRole[];
|
||||
/**
|
||||
* Custom guild emojis
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/emoji#emoji-object
|
||||
*/
|
||||
emojis: APIEmoji[];
|
||||
/**
|
||||
* Enabled guild features
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
|
||||
*/
|
||||
features: GuildFeature[];
|
||||
/**
|
||||
* Required MFA level for the guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
|
||||
*/
|
||||
mfa_level: GuildMFALevel;
|
||||
/**
|
||||
* Application id of the guild creator if it is bot-created
|
||||
*/
|
||||
application_id: Snowflake | null;
|
||||
/**
|
||||
* The id of the channel where guild notices such as welcome messages and boost events are posted
|
||||
*/
|
||||
system_channel_id: Snowflake | null;
|
||||
/**
|
||||
* System channel flags
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
|
||||
*/
|
||||
system_channel_flags: GuildSystemChannelFlags;
|
||||
/**
|
||||
* The id of the channel where Community guilds can display rules and/or guidelines
|
||||
*/
|
||||
rules_channel_id: Snowflake | null;
|
||||
/**
|
||||
* When this guild was joined at
|
||||
*
|
||||
* **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
|
||||
*/
|
||||
joined_at?: string;
|
||||
/**
|
||||
* `true` if this is considered a large guild
|
||||
*
|
||||
* **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
|
||||
*/
|
||||
large?: boolean;
|
||||
/**
|
||||
* Total number of members in this guild
|
||||
*
|
||||
* **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
|
||||
*/
|
||||
member_count?: number;
|
||||
/**
|
||||
* States of members currently in voice channels; lacks the `guild_id` key
|
||||
*
|
||||
* **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
voice_states?: Omit<GatewayVoiceState, 'guild_id'>[];
|
||||
/**
|
||||
* Users in the guild
|
||||
*
|
||||
* **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
members?: APIGuildMember[];
|
||||
/**
|
||||
* Channels in the guild
|
||||
*
|
||||
* **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object
|
||||
*/
|
||||
channels?: APIChannel[];
|
||||
/**
|
||||
* Threads in the guild
|
||||
*
|
||||
* **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object
|
||||
*/
|
||||
threads?: APIChannel[];
|
||||
/**
|
||||
* Presences of the members in the guild, will only include non-offline members if the size is greater than `large_threshold`
|
||||
*
|
||||
* **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#presence-update
|
||||
*/
|
||||
presences?: GatewayPresenceUpdate[];
|
||||
/**
|
||||
* The maximum number of presences for the guild (`null` is always returned, apart from the largest of guilds)
|
||||
*/
|
||||
max_presences?: number | null;
|
||||
/**
|
||||
* The maximum number of members for the guild
|
||||
*/
|
||||
max_members?: number;
|
||||
/**
|
||||
* The vanity url code for the guild
|
||||
*/
|
||||
vanity_url_code: string | null;
|
||||
/**
|
||||
* The description for the guild, if the guild is discoverable
|
||||
*/
|
||||
description: string | null;
|
||||
/**
|
||||
* Banner hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
banner: string | null;
|
||||
/**
|
||||
* Premium tier (Server Boost level)
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
|
||||
*/
|
||||
premium_tier: GuildPremiumTier;
|
||||
/**
|
||||
* The number of boosts this guild currently has
|
||||
*/
|
||||
premium_subscription_count?: number;
|
||||
/**
|
||||
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
|
||||
*
|
||||
* @default "en-US"
|
||||
*/
|
||||
preferred_locale: string;
|
||||
/**
|
||||
* The id of the channel where admins and moderators of Community guilds receive notices from Discord
|
||||
*/
|
||||
public_updates_channel_id: Snowflake | null;
|
||||
/**
|
||||
* The maximum amount of users in a video channel
|
||||
*/
|
||||
max_video_channel_users?: number;
|
||||
/**
|
||||
* **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`**
|
||||
*/
|
||||
approximate_member_count?: number;
|
||||
/**
|
||||
* **This field is only received from https://discord.com/developers/docs/resources/guild#get-guild with the `with_counts` query parameter set to `true`**
|
||||
*/
|
||||
approximate_presence_count?: number;
|
||||
/**
|
||||
* The welcome screen of a Community guild, shown to new members
|
||||
*
|
||||
* Returned in the invite object
|
||||
*/
|
||||
welcome_screen?: APIGuildWelcomeScreen;
|
||||
/**
|
||||
* The nsfw level of the guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
|
||||
*/
|
||||
nsfw_level: GuildNSFWLevel;
|
||||
/**
|
||||
* The stage instances in the guild
|
||||
*
|
||||
* **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-stage-instance-structure
|
||||
*/
|
||||
stage_instances?: APIStageInstance[];
|
||||
/**
|
||||
* Custom guild stickers
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/sticker#sticker-object
|
||||
*/
|
||||
stickers: APISticker[];
|
||||
/**
|
||||
* Whether the guild has the boost progress bar enabled.
|
||||
*/
|
||||
premium_progress_bar_enabled: boolean;
|
||||
/**
|
||||
* The scheduled events in the guild
|
||||
*
|
||||
* **This field is only sent within the [GUILD_CREATE](https://discord.com/developers/docs/topics/gateway#guild-create) event**
|
||||
*
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object
|
||||
*/
|
||||
guild_scheduled_events?: APIGuildScheduledEvent[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
|
||||
*/
|
||||
export enum GuildDefaultMessageNotifications {
|
||||
AllMessages,
|
||||
OnlyMentions,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
|
||||
*/
|
||||
export enum GuildExplicitContentFilter {
|
||||
Disabled,
|
||||
MembersWithoutRoles,
|
||||
AllMembers,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
|
||||
*/
|
||||
export enum GuildMFALevel {
|
||||
None,
|
||||
Elevated,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
|
||||
*/
|
||||
export enum GuildNSFWLevel {
|
||||
Default,
|
||||
Explicit,
|
||||
Safe,
|
||||
AgeRestricted,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-verification-level
|
||||
*/
|
||||
export enum GuildVerificationLevel {
|
||||
/**
|
||||
* Unrestricted
|
||||
*/
|
||||
None,
|
||||
/**
|
||||
* Must have verified email on account
|
||||
*/
|
||||
Low,
|
||||
/**
|
||||
* Must be registered on Discord for longer than 5 minutes
|
||||
*/
|
||||
Medium,
|
||||
/**
|
||||
* Must be a member of the guild for longer than 10 minutes
|
||||
*/
|
||||
High,
|
||||
/**
|
||||
* Must have a verified phone number
|
||||
*/
|
||||
VeryHigh,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
|
||||
*/
|
||||
export enum GuildPremiumTier {
|
||||
None,
|
||||
Tier1,
|
||||
Tier2,
|
||||
Tier3,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
|
||||
*/
|
||||
export enum GuildSystemChannelFlags {
|
||||
/**
|
||||
* Suppress member join notifications
|
||||
*/
|
||||
SuppressJoinNotifications = 1 << 0,
|
||||
/**
|
||||
* Suppress server boost notifications
|
||||
*/
|
||||
SuppressPremiumSubscriptions = 1 << 1,
|
||||
/**
|
||||
* Suppress server setup tips
|
||||
*/
|
||||
SuppressGuildReminderNotifications = 1 << 2,
|
||||
/**
|
||||
* Hide member join sticker reply buttons
|
||||
*/
|
||||
SuppressJoinNotificationReplies = 1 << 3,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-guild-features
|
||||
*/
|
||||
export enum GuildFeature {
|
||||
/**
|
||||
* Guild has access to set an animated guild icon
|
||||
*/
|
||||
AnimatedIcon = 'ANIMATED_ICON',
|
||||
/**
|
||||
* Guild has access to set a guild banner image
|
||||
*/
|
||||
Banner = 'BANNER',
|
||||
/**
|
||||
* Guild has access to use commerce features (i.e. create store channels)
|
||||
*/
|
||||
Commerce = 'COMMERCE',
|
||||
/**
|
||||
* Guild can enable welcome screen, Membership Screening and discovery, and receives community updates
|
||||
*/
|
||||
Community = 'COMMUNITY',
|
||||
/**
|
||||
* Guild is able to be discovered in the directory
|
||||
*/
|
||||
Discoverable = 'DISCOVERABLE',
|
||||
/**
|
||||
* Guild is able to be featured in the directory
|
||||
*/
|
||||
Featurable = 'FEATURABLE',
|
||||
/**
|
||||
* Guild has access to set an invite splash background
|
||||
*/
|
||||
InviteSplash = 'INVITE_SPLASH',
|
||||
/**
|
||||
* Guild has enabled Membership Screening
|
||||
*/
|
||||
MemberVerificationGateEnabled = 'MEMBER_VERIFICATION_GATE_ENABLED',
|
||||
/**
|
||||
* Guild has enabled monetization
|
||||
*/
|
||||
MonetizationEnabled = 'MONETIZATION_ENABLED',
|
||||
/**
|
||||
* Guild has increased custom sticker slots
|
||||
*/
|
||||
MoreStickers = 'MORE_STICKERS',
|
||||
/**
|
||||
* Guild has access to create news channels
|
||||
*/
|
||||
News = 'NEWS',
|
||||
/**
|
||||
* Guild is partnered
|
||||
*/
|
||||
Partnered = 'PARTNERED',
|
||||
/**
|
||||
* Guild can be previewed before joining via Membership Screening or the directory
|
||||
*/
|
||||
PreviewEnabled = 'PREVIEW_ENABLED',
|
||||
/**
|
||||
* Guild has access to create private threads
|
||||
*/
|
||||
PrivateThreads = 'PRIVATE_THREADS',
|
||||
RelayEnabled = 'RELAY_ENABLED',
|
||||
/**
|
||||
* Guild is able to set role icons
|
||||
*/
|
||||
RoleIcons = 'ROLE_ICONS',
|
||||
/**
|
||||
* Guild has access to the seven day archive time for threads
|
||||
*/
|
||||
SevenDayThreadArchive = 'SEVEN_DAY_THREAD_ARCHIVE',
|
||||
/**
|
||||
* Guild has access to the three day archive time for threads
|
||||
*/
|
||||
ThreeDayThreadArchive = 'THREE_DAY_THREAD_ARCHIVE',
|
||||
/**
|
||||
* Guild has enabled ticketed events
|
||||
*/
|
||||
TicketedEventsEnabled = 'TICKETED_EVENTS_ENABLED',
|
||||
/**
|
||||
* Guild has access to set a vanity URL
|
||||
*/
|
||||
VanityURL = 'VANITY_URL',
|
||||
/**
|
||||
* Guild is verified
|
||||
*/
|
||||
Verified = 'VERIFIED',
|
||||
/**
|
||||
* Guild has access to set 384kbps bitrate in voice (previously VIP voice servers)
|
||||
*/
|
||||
VIPRegions = 'VIP_REGIONS',
|
||||
/**
|
||||
* Guild has enabled the welcome screen
|
||||
*/
|
||||
WelcomeScreenEnabled = 'WELCOME_SCREEN_ENABLED',
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-preview-object
|
||||
*/
|
||||
export interface APIGuildPreview {
|
||||
/**
|
||||
* Guild id
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Guild name (2-100 characters)
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Icon hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
icon: string | null;
|
||||
/**
|
||||
* Splash hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
splash: string | null;
|
||||
/**
|
||||
* Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
discovery_splash: string | null;
|
||||
/**
|
||||
* Custom guild emojis
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/emoji#emoji-object
|
||||
*/
|
||||
emojis: APIEmoji[];
|
||||
/**
|
||||
* Enabled guild features
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
|
||||
*/
|
||||
features: GuildFeature[];
|
||||
/**
|
||||
* Approximate number of members in this guild
|
||||
*/
|
||||
approximate_member_count: number;
|
||||
/**
|
||||
* Approximate number of online members in this guild
|
||||
*/
|
||||
approximate_presence_count: number;
|
||||
/**
|
||||
* The description for the guild
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Custom guild stickers
|
||||
*/
|
||||
stickers: APISticker[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object
|
||||
*/
|
||||
export interface APIGuildWidgetSettings {
|
||||
/**
|
||||
* Whether the widget is enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* The widget channel id
|
||||
*/
|
||||
channel_id: Snowflake | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
export interface APIGuildMember {
|
||||
/**
|
||||
* The user this guild member represents
|
||||
*
|
||||
* **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.**
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
user?: APIUser;
|
||||
/**
|
||||
* This users guild nickname
|
||||
*/
|
||||
nick?: string | null;
|
||||
/**
|
||||
* The member's guild avatar hash
|
||||
*/
|
||||
avatar?: string | null;
|
||||
/**
|
||||
* Array of role object ids
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/permissions#role-object
|
||||
*/
|
||||
roles: Snowflake[];
|
||||
/**
|
||||
* When the user joined the guild
|
||||
*/
|
||||
joined_at: string;
|
||||
/**
|
||||
* When the user started boosting the guild
|
||||
*
|
||||
* See https://support.discord.com/hc/en-us/articles/360028038352-Server-Boosting-
|
||||
*/
|
||||
premium_since?: string | null;
|
||||
/**
|
||||
* Whether the user is deafened in voice channels
|
||||
*/
|
||||
deaf: boolean;
|
||||
/**
|
||||
* Whether the user is muted in voice channels
|
||||
*/
|
||||
mute: boolean;
|
||||
/**
|
||||
* Whether the user has not yet passed the guild's Membership Screening requirements
|
||||
*
|
||||
* *If this field is not present, it can be assumed as `false`.*
|
||||
*/
|
||||
pending?: boolean;
|
||||
/**
|
||||
* Timestamp of when the time out will be removed; until then, they cannot interact with the guild
|
||||
*/
|
||||
communication_disabled_until?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#integration-object
|
||||
*/
|
||||
export interface APIGuildIntegration {
|
||||
/**
|
||||
* Integration id
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Integration name
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Integration type
|
||||
*/
|
||||
type: APIGuildInteractionType;
|
||||
/**
|
||||
* Is this integration enabled
|
||||
*/
|
||||
enabled: boolean;
|
||||
/**
|
||||
* Is this integration syncing
|
||||
*
|
||||
* **This field is not provided for `discord` bot integrations.**
|
||||
*/
|
||||
syncing?: boolean;
|
||||
/**
|
||||
* ID that this integration uses for "subscribers"
|
||||
*
|
||||
* **This field is not provided for `discord` bot integrations.**
|
||||
*/
|
||||
role_id?: Snowflake;
|
||||
/**
|
||||
* Whether emoticons should be synced for this integration (`twitch` only currently)
|
||||
*
|
||||
* **This field is not provided for `discord` bot integrations.**
|
||||
*/
|
||||
enable_emoticons?: boolean;
|
||||
/**
|
||||
* The behavior of expiring subscribers
|
||||
*
|
||||
* **This field is not provided for `discord` bot integrations.**
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
|
||||
*/
|
||||
expire_behavior?: IntegrationExpireBehavior;
|
||||
/**
|
||||
* The grace period (in days) before expiring subscribers
|
||||
*
|
||||
* **This field is not provided for `discord` bot integrations.**
|
||||
*/
|
||||
expire_grace_period?: number;
|
||||
/**
|
||||
* User for this integration
|
||||
*
|
||||
* **This field is not provided for `discord` bot integrations.**
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
user?: APIUser;
|
||||
/**
|
||||
* Integration account information
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#integration-account-object
|
||||
*/
|
||||
account: APIIntegrationAccount;
|
||||
/**
|
||||
* When this integration was last synced
|
||||
*
|
||||
* **This field is not provided for `discord` bot integrations.**
|
||||
*/
|
||||
synced_at?: string;
|
||||
/**
|
||||
* How many subscribers this integration has
|
||||
*
|
||||
* **This field is not provided for `discord` bot integrations.**
|
||||
*/
|
||||
subscriber_count?: number;
|
||||
/**
|
||||
* Has this integration been revoked
|
||||
*
|
||||
* **This field is not provided for `discord` bot integrations.**
|
||||
*/
|
||||
revoked?: boolean;
|
||||
/**
|
||||
* The bot/OAuth2 application for discord integrations
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#integration-application-object
|
||||
*
|
||||
* **This field is not provided for `discord` bot integrations.**
|
||||
*/
|
||||
application?: APIGuildIntegrationApplication;
|
||||
}
|
||||
|
||||
export type APIGuildInteractionType = 'twitch' | 'youtube' | 'discord';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
|
||||
*/
|
||||
export enum IntegrationExpireBehavior {
|
||||
RemoveRole,
|
||||
Kick,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#integration-account-object
|
||||
*/
|
||||
export interface APIIntegrationAccount {
|
||||
/**
|
||||
* ID of the account
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Name of the account
|
||||
*/
|
||||
name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#integration-application-object
|
||||
*/
|
||||
export interface APIGuildIntegrationApplication {
|
||||
/**
|
||||
* The id of the app
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* The name of the app
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The icon hash of the app
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
icon: string | null;
|
||||
/**
|
||||
* The description of the app
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* The summary of the app
|
||||
*
|
||||
* @deprecated Always an empty string, will be removed in v11
|
||||
*/
|
||||
summary: '';
|
||||
/**
|
||||
* The bot associated with this application
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
bot?: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#ban-object
|
||||
*/
|
||||
export interface APIBan {
|
||||
/**
|
||||
* The reason for the ban
|
||||
*/
|
||||
reason: string | null;
|
||||
/**
|
||||
* The banned user
|
||||
*/
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
*/
|
||||
export interface APIGuildWidget {
|
||||
id: Snowflake;
|
||||
name: string;
|
||||
instant_invite: string | null;
|
||||
channels: APIGuildWidgetChannel[];
|
||||
members: APIGuildWidgetMember[];
|
||||
presence_count: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
*/
|
||||
export interface APIGuildWidgetChannel {
|
||||
id: Snowflake;
|
||||
name: string;
|
||||
position: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
*/
|
||||
export interface APIGuildWidgetMember {
|
||||
id: string;
|
||||
username: string;
|
||||
discriminator: string;
|
||||
avatar: string | null;
|
||||
status: PresenceUpdateStatus;
|
||||
activity?: { name: string };
|
||||
avatar_url: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
|
||||
*/
|
||||
export enum GuildWidgetStyle {
|
||||
/**
|
||||
* Shield style widget with Discord icon and guild members online count
|
||||
*/
|
||||
Shield = 'shield',
|
||||
/**
|
||||
* Large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget
|
||||
*/
|
||||
Banner1 = 'banner1',
|
||||
/**
|
||||
* Smaller widget style with guild icon, name and online count. Split on the right with Discord logo
|
||||
*/
|
||||
Banner2 = 'banner2',
|
||||
/**
|
||||
* Large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right
|
||||
*/
|
||||
Banner3 = 'banner3',
|
||||
/**
|
||||
* Large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget
|
||||
* and a "JOIN MY SERVER" button at the bottom
|
||||
*/
|
||||
Banner4 = 'banner4',
|
||||
}
|
||||
|
||||
export interface APIGuildWelcomeScreen {
|
||||
/**
|
||||
* The welcome screen short message
|
||||
*/
|
||||
description: string | null;
|
||||
/**
|
||||
* Array of suggested channels
|
||||
*/
|
||||
welcome_channels: APIGuildWelcomeScreenChannel[];
|
||||
}
|
||||
|
||||
export interface APIGuildWelcomeScreenChannel {
|
||||
/**
|
||||
* The channel id that is suggested
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* The description shown for the channel
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* The emoji id of the emoji that is shown on the left of the channel
|
||||
*/
|
||||
emoji_id: Snowflake | null;
|
||||
/**
|
||||
* The emoji name of the emoji that is shown on the left of the channel
|
||||
*/
|
||||
emoji_name: string | null;
|
||||
}
|
||||
|
||||
export interface APIGuildMembershipScreening {
|
||||
/**
|
||||
* When the fields were last updated
|
||||
*/
|
||||
version: string;
|
||||
/**
|
||||
* The steps in the screening form
|
||||
*/
|
||||
form_fields: APIGuildMembershipScreeningField[];
|
||||
/**
|
||||
* The server description shown in the screening form
|
||||
*/
|
||||
description: string | null;
|
||||
}
|
||||
|
||||
// TODO: make this a union based on the type in the future, when new types are added
|
||||
|
||||
export interface APIGuildMembershipScreeningField {
|
||||
/**
|
||||
* The type of field
|
||||
*/
|
||||
field_type: MembershipScreeningFieldType;
|
||||
/**
|
||||
* The title of the field
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* The list of rules
|
||||
*/
|
||||
values?: string[];
|
||||
/**
|
||||
* Whether the user has to fill out this field
|
||||
*/
|
||||
required: boolean;
|
||||
}
|
||||
|
||||
export enum MembershipScreeningFieldType {
|
||||
/**
|
||||
* Server Rules
|
||||
*/
|
||||
Terms = 'TERMS',
|
||||
}
|
||||
152
deno/payloads/v10/guildScheduledEvent.ts
Normal file
152
deno/payloads/v10/guildScheduledEvent.ts
Normal file
@@ -0,0 +1,152 @@
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIGuildMember } from './guild.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
|
||||
/**
|
||||
* The id of the guild event
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* The guild id which the scheduled event belongs to
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* The channel id in which the scheduled event will be hosted, or `null` if entity type is `EXTERNAL`
|
||||
*/
|
||||
channel_id: Snowflake | null;
|
||||
/**
|
||||
* The id of the user that created the scheduled event
|
||||
*/
|
||||
creator_id?: Snowflake | null;
|
||||
/**
|
||||
* The name of the scheduled event
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The description of the scheduled event
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* The time the scheduled event will start
|
||||
*/
|
||||
scheduled_start_time: string;
|
||||
/**
|
||||
* The time at which the guild event will end, or `null` if the event does not have a scheduled time to end
|
||||
*/
|
||||
scheduled_end_time: string | null;
|
||||
/**
|
||||
* The privacy level of the scheduled event
|
||||
*/
|
||||
privacy_level: GuildScheduledEventPrivacyLevel;
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
status: GuildScheduledEventStatus;
|
||||
/**
|
||||
* The type of hosting entity associated with the scheduled event
|
||||
*/
|
||||
entity_type: Type;
|
||||
/**
|
||||
* The id of the hosting entity associated with the scheduled event
|
||||
*/
|
||||
entity_id: Snowflake | null;
|
||||
/**
|
||||
* The entity metadata for the scheduled event
|
||||
*/
|
||||
entity_metadata: APIGuildScheduledEventEntityMetadata | null;
|
||||
/**
|
||||
* The user that created the scheduled event
|
||||
*/
|
||||
creator?: APIUser;
|
||||
/**
|
||||
* The number of users subscribed to the scheduled event
|
||||
*/
|
||||
user_count?: number;
|
||||
/**
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image: string | null;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.Voice> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
export interface APIExternalGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
channel_id: null;
|
||||
entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
|
||||
*/
|
||||
export type APIGuildScheduledEvent =
|
||||
| APIStageInstanceGuildScheduledEvent
|
||||
| APIVoiceGuildScheduledEvent
|
||||
| APIExternalGuildScheduledEvent;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata
|
||||
*/
|
||||
export interface APIGuildScheduledEventEntityMetadata {
|
||||
/**
|
||||
* The location of the scheduled event
|
||||
*/
|
||||
location?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types
|
||||
*/
|
||||
export enum GuildScheduledEventEntityType {
|
||||
StageInstance = 1,
|
||||
Voice,
|
||||
External,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status
|
||||
*/
|
||||
export enum GuildScheduledEventStatus {
|
||||
Scheduled = 1,
|
||||
Active,
|
||||
Completed,
|
||||
Canceled,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level
|
||||
*/
|
||||
export enum GuildScheduledEventPrivacyLevel {
|
||||
/**
|
||||
* The scheduled event is only accessible to guild members
|
||||
*/
|
||||
GuildOnly = 2,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object-guild-scheduled-event-user-structure
|
||||
*/
|
||||
export interface APIGuildScheduledEventUser {
|
||||
/**
|
||||
* The scheduled event id which the user subscribed to
|
||||
*/
|
||||
guild_scheduled_event_id: Snowflake;
|
||||
/**
|
||||
* The user which subscribed to the event
|
||||
*/
|
||||
user: APIUser;
|
||||
/**
|
||||
* The guild member data for this user for the guild which this event belongs to, if any
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
}
|
||||
57
deno/payloads/v10/interactions.ts
Normal file
57
deno/payloads/v10/interactions.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
import type {
|
||||
APIApplicationCommandDMInteraction,
|
||||
APIApplicationCommandGuildInteraction,
|
||||
APIApplicationCommandInteraction,
|
||||
} from './_interactions/applicationCommands.ts';
|
||||
import type {
|
||||
APIApplicationCommandAutocompleteDMInteraction,
|
||||
APIApplicationCommandAutocompleteGuildInteraction,
|
||||
APIApplicationCommandAutocompleteInteraction,
|
||||
} from './_interactions/autocomplete.ts';
|
||||
import type {
|
||||
APIMessageComponentDMInteraction,
|
||||
APIMessageComponentGuildInteraction,
|
||||
APIMessageComponentInteraction,
|
||||
} from './_interactions/messageComponents.ts';
|
||||
import type {
|
||||
APIModalSubmitDMInteraction,
|
||||
APIModalSubmitGuildInteraction,
|
||||
APIModalSubmitInteraction,
|
||||
} from './_interactions/modalSubmit.ts';
|
||||
import type { APIPingInteraction } from './_interactions/ping.ts';
|
||||
|
||||
export * from './_interactions/applicationCommands.ts';
|
||||
export * from './_interactions/autocomplete.ts';
|
||||
export * from './_interactions/base.ts';
|
||||
export * from './_interactions/messageComponents.ts';
|
||||
export * from './_interactions/modalSubmit.ts';
|
||||
export * from './_interactions/ping.ts';
|
||||
export * from './_interactions/responses.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIInteraction =
|
||||
| APIPingInteraction
|
||||
| APIApplicationCommandInteraction
|
||||
| APIMessageComponentInteraction
|
||||
| APIApplicationCommandAutocompleteInteraction
|
||||
| APIModalSubmitInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIDMInteraction =
|
||||
| APIApplicationCommandDMInteraction
|
||||
| APIMessageComponentDMInteraction
|
||||
| APIApplicationCommandAutocompleteDMInteraction
|
||||
| APIModalSubmitDMInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
*/
|
||||
export type APIGuildInteraction =
|
||||
| APIApplicationCommandGuildInteraction
|
||||
| APIMessageComponentGuildInteraction
|
||||
| APIApplicationCommandAutocompleteGuildInteraction
|
||||
| APIModalSubmitGuildInteraction;
|
||||
110
deno/payloads/v10/invite.ts
Normal file
110
deno/payloads/v10/invite.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/resources/invite
|
||||
*/
|
||||
|
||||
import type { APIApplication } from './application.ts';
|
||||
import type { APIPartialChannel } from './channel.ts';
|
||||
import type { APIPartialGuild } from './guild.ts';
|
||||
import type { APIGuildScheduledEvent } from './guildScheduledEvent.ts';
|
||||
import type { APIInviteStageInstance } from './stageInstance.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object
|
||||
*/
|
||||
export interface APIInvite {
|
||||
/**
|
||||
* The invite code (unique ID)
|
||||
*/
|
||||
code: string;
|
||||
/**
|
||||
* The guild this invite is for
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object
|
||||
*/
|
||||
guild?: APIPartialGuild;
|
||||
/**
|
||||
* The channel this invite is for
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object
|
||||
*/
|
||||
channel: Required<APIPartialChannel> | null;
|
||||
/**
|
||||
* The user who created the invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
inviter?: APIUser;
|
||||
/**
|
||||
* The type of target for this voice channel invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
|
||||
*/
|
||||
target_type?: InviteTargetType;
|
||||
/**
|
||||
* The user whose stream to display for this voice channel stream invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
target_user?: APIUser;
|
||||
/**
|
||||
* The embedded application to open for this voice channel embedded application invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/oauth2#application
|
||||
*/
|
||||
target_application?: Partial<APIApplication>;
|
||||
/**
|
||||
* Approximate count of online members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true`
|
||||
*/
|
||||
approximate_presence_count?: number;
|
||||
/**
|
||||
* Approximate count of total members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true`
|
||||
*/
|
||||
approximate_member_count?: number;
|
||||
/**
|
||||
* The expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true`
|
||||
*/
|
||||
expires_at?: string | null;
|
||||
/**
|
||||
* The stage instance data if there is a public stage instance in the stage channel this invite is for
|
||||
*/
|
||||
stage_instance?: APIInviteStageInstance;
|
||||
/**
|
||||
* The guild scheduled event data, returned from the `GET /invites/<code>` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id
|
||||
*/
|
||||
guild_scheduled_event?: APIGuildScheduledEvent;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
*/
|
||||
export enum InviteTargetType {
|
||||
Stream = 1,
|
||||
EmbeddedApplication,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-metadata-object
|
||||
*/
|
||||
export interface APIExtendedInvite extends APIInvite {
|
||||
/**
|
||||
* Number of times this invite has been used
|
||||
*/
|
||||
uses: number;
|
||||
/**
|
||||
* Max number of times this invite can be used
|
||||
*/
|
||||
max_uses: number;
|
||||
/**
|
||||
* Duration (in seconds) after which the invite expires
|
||||
*/
|
||||
max_age: number;
|
||||
/**
|
||||
* Whether this invite only grants temporary membership
|
||||
*/
|
||||
temporary: boolean;
|
||||
/**
|
||||
* When this invite was created
|
||||
*/
|
||||
created_at: string;
|
||||
}
|
||||
19
deno/payloads/v10/mod.ts
Normal file
19
deno/payloads/v10/mod.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
export * from '../common.ts';
|
||||
export * from './application.ts';
|
||||
export * from './auditLog.ts';
|
||||
export * from './channel.ts';
|
||||
export * from './emoji.ts';
|
||||
export * from './gateway.ts';
|
||||
export * from './guild.ts';
|
||||
export * from './guildScheduledEvent.ts';
|
||||
export * from './interactions.ts';
|
||||
export * from './invite.ts';
|
||||
export * from './oauth2.ts';
|
||||
export * from './permissions.ts';
|
||||
export * from './stageInstance.ts';
|
||||
export * from './sticker.ts';
|
||||
export * from './teams.ts';
|
||||
export * from './template.ts';
|
||||
export * from './user.ts';
|
||||
export * from './voice.ts';
|
||||
export * from './webhook.ts';
|
||||
114
deno/payloads/v10/oauth2.ts
Normal file
114
deno/payloads/v10/oauth2.ts
Normal file
@@ -0,0 +1,114 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/topics/oauth2
|
||||
*/
|
||||
|
||||
export enum OAuth2Scopes {
|
||||
/**
|
||||
* For oauth2 bots, this puts the bot in the user's selected guild by default
|
||||
*/
|
||||
Bot = 'bot',
|
||||
/**
|
||||
* Allows [/users/@me/connections](https://discord.com/developers/docs/resources/user#get-user-connections)
|
||||
* to return linked third-party accounts
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#get-user-connections
|
||||
*/
|
||||
Connections = 'connections',
|
||||
/**
|
||||
* Enables [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) to return an `email`
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#get-current-user
|
||||
*/
|
||||
Email = 'email',
|
||||
/**
|
||||
* Allows [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) without `email`
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#get-current-user
|
||||
*/
|
||||
Identify = 'identify',
|
||||
/**
|
||||
* Allows [/users/@me/guilds](https://discord.com/developers/docs/resources/user#get-current-user-guilds)
|
||||
* to return basic information about all of a user's guilds
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#get-current-user-guilds
|
||||
*/
|
||||
Guilds = 'guilds',
|
||||
/**
|
||||
* Allows [/guilds/{guild.id}/members/{user.id}](https://discord.com/developers/docs/resources/guild#add-guild-member)
|
||||
* to be used for joining users to a guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#add-guild-member
|
||||
*/
|
||||
GuildsJoin = 'guilds.join',
|
||||
/**
|
||||
* Allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#get-current-user-guild-member
|
||||
*/
|
||||
GuildsMembersRead = 'guilds.members.read',
|
||||
/**
|
||||
* Allows your app to join users to a group dm
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
|
||||
*/
|
||||
GroupDMJoins = 'gdm.join',
|
||||
/**
|
||||
* For local rpc server api access, this allows you to read messages from all client channels
|
||||
* (otherwise restricted to channels/guilds your app creates)
|
||||
*/
|
||||
MessagesRead = 'messages.read',
|
||||
/**
|
||||
* For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval
|
||||
*/
|
||||
RPC = 'rpc',
|
||||
/**
|
||||
* For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval
|
||||
*/
|
||||
RPCNotificationsRead = 'rpc.notifications.read',
|
||||
/**
|
||||
* This generates a webhook that is returned in the oauth token response for authorization code grants
|
||||
*/
|
||||
WebhookIncoming = 'webhook.incoming',
|
||||
/**
|
||||
* Allows your app to upload/update builds for a user's applications - requires Discord approval
|
||||
*/
|
||||
ApplicationsBuildsUpload = 'applications.builds.upload',
|
||||
/**
|
||||
* Allows your app to read build data for a user's applications
|
||||
*/
|
||||
ApplicationsBuildsRead = 'applications.builds.read',
|
||||
/**
|
||||
* Allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications
|
||||
*/
|
||||
ApplicationsStoreUpdate = 'applications.store.update',
|
||||
/**
|
||||
* Allows your app to read entitlements for a user's applications
|
||||
*/
|
||||
ApplicationsEntitlements = 'applications.entitlements',
|
||||
/**
|
||||
* Allows your app to know a user's friends and implicit relationships - requires Discord approval
|
||||
*/
|
||||
RelationshipsRead = 'relationships.read',
|
||||
/**
|
||||
* Allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval
|
||||
*/
|
||||
ActivitiesRead = 'activities.read',
|
||||
/**
|
||||
* Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
|
||||
*
|
||||
* See https://discord.com/developers/docs/game-sdk/activities
|
||||
*/
|
||||
ActivitiesWrite = 'activities.write',
|
||||
/**
|
||||
* Allows your app to use Application Commands in a guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/interactions/application-commands
|
||||
*/
|
||||
ApplicationsCommands = 'applications.commands',
|
||||
/**
|
||||
* Allows your app to update its Application Commands via this bearer token - client credentials grant only
|
||||
*
|
||||
* See https://discord.com/developers/docs/interactions/application-commands
|
||||
*/
|
||||
ApplicationsCommandsUpdate = 'applications.commands.update',
|
||||
}
|
||||
75
deno/payloads/v10/permissions.ts
Normal file
75
deno/payloads/v10/permissions.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/topics/permissions
|
||||
*/
|
||||
|
||||
import type { Permissions, Snowflake } from '../../globals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#role-object
|
||||
*/
|
||||
export interface APIRole {
|
||||
/**
|
||||
* Role id
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* Role name
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Integer representation of hexadecimal color code
|
||||
*/
|
||||
color: number;
|
||||
/**
|
||||
* If this role is pinned in the user listing
|
||||
*/
|
||||
hoist: boolean;
|
||||
/**
|
||||
* The role icon hash
|
||||
*/
|
||||
icon?: string | null;
|
||||
/**
|
||||
* The role unicode emoji as a standard emoji
|
||||
*/
|
||||
unicode_emoji?: string | null;
|
||||
/**
|
||||
* Position of this role
|
||||
*/
|
||||
position: number;
|
||||
/**
|
||||
* Permission bit set
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
*/
|
||||
permissions: Permissions;
|
||||
/**
|
||||
* Whether this role is managed by an integration
|
||||
*/
|
||||
managed: boolean;
|
||||
/**
|
||||
* Whether this role is mentionable
|
||||
*/
|
||||
mentionable: boolean;
|
||||
/**
|
||||
* The tags this role has
|
||||
*/
|
||||
tags?: APIRoleTags;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure
|
||||
*/
|
||||
export interface APIRoleTags {
|
||||
/**
|
||||
* The id of the bot this role belongs to
|
||||
*/
|
||||
bot_id?: Snowflake;
|
||||
/**
|
||||
* Whether this is the guild's premium subscriber role
|
||||
*/
|
||||
premium_subscriber?: null;
|
||||
/**
|
||||
* The id of the integration this role belongs to
|
||||
*/
|
||||
integration_id?: Snowflake;
|
||||
}
|
||||
72
deno/payloads/v10/stageInstance.ts
Normal file
72
deno/payloads/v10/stageInstance.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIGuildMember } from './guild.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/stage-instance#stage-instance-object
|
||||
*/
|
||||
export interface APIStageInstance {
|
||||
/**
|
||||
* The id of the stage instance
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* The guild id of the associated stage channel
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* The id of the associated stage channel
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* The topic of the stage instance (1-120 characters)
|
||||
*/
|
||||
topic: string;
|
||||
/**
|
||||
* The privacy level of the stage instance
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
|
||||
*/
|
||||
privacy_level: StageInstancePrivacyLevel;
|
||||
/**
|
||||
* Whether or not stage discovery is disabled
|
||||
*/
|
||||
discoverable_disabled: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
|
||||
*/
|
||||
export enum StageInstancePrivacyLevel {
|
||||
/**
|
||||
* The stage instance is visible publicly, such as on stage discovery
|
||||
*/
|
||||
Public = 1,
|
||||
/**
|
||||
* The stage instance is visible to only guild members
|
||||
*/
|
||||
GuildOnly,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure
|
||||
*/
|
||||
export interface APIInviteStageInstance {
|
||||
/**
|
||||
* The topic of the stage instance (1-120 characters)
|
||||
*/
|
||||
topic: string;
|
||||
/**
|
||||
* The number of users in the stage
|
||||
*/
|
||||
participant_count: number;
|
||||
/**
|
||||
* The number of users speaking in the stage
|
||||
*/
|
||||
speaker_count: number;
|
||||
/**
|
||||
* The members speaking in the stage
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure
|
||||
*/
|
||||
members: APIGuildMember[];
|
||||
}
|
||||
127
deno/payloads/v10/sticker.ts
Normal file
127
deno/payloads/v10/sticker.ts
Normal file
@@ -0,0 +1,127 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/resources/sticker
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#sticker-object
|
||||
*/
|
||||
export interface APISticker {
|
||||
/**
|
||||
* ID of the sticker
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* For standard stickers, ID of the pack the sticker is from
|
||||
*/
|
||||
pack_id?: Snowflake;
|
||||
/**
|
||||
* Name of the sticker
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Description of the sticker
|
||||
*/
|
||||
description: string | null;
|
||||
/**
|
||||
* For guild stickers, the Discord name of a unicode emoji representing the sticker's expression. for standard stickers, a comma-separated list of related expressions.
|
||||
*/
|
||||
tags: string;
|
||||
/**
|
||||
* Previously the sticker asset hash, now an empty string
|
||||
* @deprecated
|
||||
*/
|
||||
asset: '';
|
||||
/**
|
||||
* Type of sticker
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
|
||||
*/
|
||||
type: StickerType;
|
||||
/**
|
||||
* Type of sticker format
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
|
||||
*/
|
||||
format_type: StickerFormatType;
|
||||
/**
|
||||
* Whether this guild sticker can be used, may be false due to loss of Server Boosts
|
||||
*/
|
||||
available?: boolean;
|
||||
/**
|
||||
* ID of the guild that owns this sticker
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* The user that uploaded the guild sticker
|
||||
*/
|
||||
user?: APIUser;
|
||||
/**
|
||||
* The standard sticker's sort order within its pack
|
||||
*/
|
||||
sort_value?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
|
||||
*/
|
||||
export enum StickerType {
|
||||
/**
|
||||
* An official sticker in a pack, part of Nitro or in a removed purchasable pack
|
||||
*/
|
||||
Standard = 1,
|
||||
/**
|
||||
* A sticker uploaded to a Boosted guild for the guild's members
|
||||
*/
|
||||
Guild,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
|
||||
*/
|
||||
export enum StickerFormatType {
|
||||
PNG = 1,
|
||||
APNG,
|
||||
Lottie,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#sticker-item-object
|
||||
*/
|
||||
export type APIStickerItem = Pick<APISticker, 'id' | 'name' | 'format_type'>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#sticker-pack-object
|
||||
*/
|
||||
export interface APIStickerPack {
|
||||
/**
|
||||
* ID of the sticker pack
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* The stickers in the pack
|
||||
*/
|
||||
stickers: APISticker[];
|
||||
/**
|
||||
* Name of the sticker pack
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* ID of the pack's SKU
|
||||
*/
|
||||
sku_id: Snowflake;
|
||||
/**
|
||||
* ID of a sticker in the pack which is shown as the pack's icon
|
||||
*/
|
||||
cover_sticker_id?: Snowflake;
|
||||
/**
|
||||
* Description of the sticker pack
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* ID of the sticker pack's banner image
|
||||
*/
|
||||
banner_asset_id?: Snowflake;
|
||||
}
|
||||
66
deno/payloads/v10/teams.ts
Normal file
66
deno/payloads/v10/teams.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/topics/teams
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-team-object
|
||||
*/
|
||||
export interface APITeam {
|
||||
/**
|
||||
* A hash of the image of the team's icon
|
||||
*/
|
||||
icon: string | null;
|
||||
/**
|
||||
* The unique id of the team
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* The members of the team
|
||||
*/
|
||||
members: APITeamMember[];
|
||||
/**
|
||||
* The name of the team
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The user id of the current team owner
|
||||
*/
|
||||
owner_user_id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-team-members-object
|
||||
*/
|
||||
export interface APITeamMember {
|
||||
/**
|
||||
* The user's membership state on the team
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
|
||||
*/
|
||||
membership_state: TeamMemberMembershipState;
|
||||
/**
|
||||
* Will always be `["*"]`
|
||||
*/
|
||||
permissions: ['*'];
|
||||
/**
|
||||
* The id of the parent team of which they are a member
|
||||
*/
|
||||
team_id: Snowflake;
|
||||
/**
|
||||
* The avatar, discriminator, id, and username of the user
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
|
||||
*/
|
||||
export enum TeamMemberMembershipState {
|
||||
Invited = 1,
|
||||
Accepted,
|
||||
}
|
||||
65
deno/payloads/v10/template.ts
Normal file
65
deno/payloads/v10/template.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/resources/template
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { RESTPostAPIGuildsJSONBody } from '../../rest/v10/mod.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/template#template-object
|
||||
*/
|
||||
export interface APITemplate {
|
||||
/**
|
||||
* The template code (unique ID)
|
||||
*/
|
||||
code: string;
|
||||
/**
|
||||
* Template name
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The description for the template
|
||||
*/
|
||||
description: string | null;
|
||||
/**
|
||||
* Number of times this template has been used
|
||||
*/
|
||||
usage_count: number;
|
||||
/**
|
||||
* The ID of the user who created the template
|
||||
*/
|
||||
creator_id: Snowflake;
|
||||
/**
|
||||
* The user who created the template
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
creator: APIUser;
|
||||
/**
|
||||
* When this template was created
|
||||
*/
|
||||
created_at: string;
|
||||
/**
|
||||
* When this template was last synced to the source guild
|
||||
*/
|
||||
updated_at: string;
|
||||
/**
|
||||
* The ID of the guild this template is based on
|
||||
*/
|
||||
source_guild_id: Snowflake;
|
||||
/**
|
||||
* The guild snapshot this template contains
|
||||
*/
|
||||
serialized_source_guild: APITemplateSerializedSourceGuild;
|
||||
/**
|
||||
* Whether the template has unsynced changes
|
||||
*/
|
||||
is_dirty: boolean | null;
|
||||
}
|
||||
|
||||
export interface APITemplateSerializedSourceGuild extends Omit<RESTPostAPIGuildsJSONBody, 'icon'> {
|
||||
description: string | null;
|
||||
preferred_locale: string;
|
||||
icon_hash: string | null;
|
||||
}
|
||||
214
deno/payloads/v10/user.ts
Normal file
214
deno/payloads/v10/user.ts
Normal file
@@ -0,0 +1,214 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/resources/user
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIGuildIntegration } from './guild.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
export interface APIUser {
|
||||
/**
|
||||
* The user's id
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* The user's username, not unique across the platform
|
||||
*/
|
||||
username: string;
|
||||
/**
|
||||
* The user's 4-digit discord-tag
|
||||
*/
|
||||
discriminator: string;
|
||||
/**
|
||||
* The user's avatar hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
avatar: string | null;
|
||||
/**
|
||||
* Whether the user belongs to an OAuth2 application
|
||||
*/
|
||||
bot?: boolean;
|
||||
/**
|
||||
* Whether the user is an Official Discord System user (part of the urgent message system)
|
||||
*/
|
||||
system?: boolean;
|
||||
/**
|
||||
* Whether the user has two factor enabled on their account
|
||||
*/
|
||||
mfa_enabled?: boolean;
|
||||
/**
|
||||
* The user's banner hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*/
|
||||
banner?: string | null;
|
||||
/**
|
||||
* The user's banner color encoded as an integer representation of hexadecimal color code
|
||||
*/
|
||||
accent_color?: number | null;
|
||||
/**
|
||||
* The user's chosen language option
|
||||
*/
|
||||
locale?: string;
|
||||
/**
|
||||
* Whether the email on this account has been verified
|
||||
*/
|
||||
verified?: boolean;
|
||||
/**
|
||||
* The user's email
|
||||
*/
|
||||
email?: string | null;
|
||||
/**
|
||||
* The flags on a user's account
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object-user-flags
|
||||
*/
|
||||
flags?: UserFlags;
|
||||
/**
|
||||
* The type of Nitro subscription on a user's account
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object-premium-types
|
||||
*/
|
||||
premium_type?: UserPremiumType;
|
||||
/**
|
||||
* The public flags on a user's account
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object-user-flags
|
||||
*/
|
||||
public_flags?: UserFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/user#user-object-user-flags
|
||||
*/
|
||||
export enum UserFlags {
|
||||
/**
|
||||
* Discord Employee
|
||||
*/
|
||||
Staff = 1 << 0,
|
||||
/**
|
||||
* Partnered Server Owner
|
||||
*/
|
||||
Partner = 1 << 1,
|
||||
/**
|
||||
* HypeSquad Events Coordinator
|
||||
*/
|
||||
Hypesquad = 1 << 2,
|
||||
/**
|
||||
* Bug Hunter Level 1
|
||||
*/
|
||||
BugHunterLevel1 = 1 << 3,
|
||||
/**
|
||||
* House Bravery Member
|
||||
*/
|
||||
HypeSquadOnlineHouse1 = 1 << 6,
|
||||
/**
|
||||
* House Brilliance Member
|
||||
*/
|
||||
HypeSquadOnlineHouse2 = 1 << 7,
|
||||
/**
|
||||
* House Balance Member
|
||||
*/
|
||||
HypeSquadOnlineHouse3 = 1 << 8,
|
||||
/**
|
||||
* Early Nitro Supporter
|
||||
*/
|
||||
PremiumEarlySupporter = 1 << 9,
|
||||
/**
|
||||
* User is a [team](https://discord.com/developers/docs/topics/teams)
|
||||
*/
|
||||
TeamPseudoUser = 1 << 10,
|
||||
/**
|
||||
* Bug Hunter Level 2
|
||||
*/
|
||||
BugHunterLevel2 = 1 << 14,
|
||||
/**
|
||||
* Verified Bot
|
||||
*/
|
||||
VerifiedBot = 1 << 16,
|
||||
/**
|
||||
* Early Verified Bot Developer
|
||||
*/
|
||||
VerifiedDeveloper = 1 << 17,
|
||||
/**
|
||||
* Discord Certified Moderator
|
||||
*/
|
||||
CertifiedModerator = 1 << 18,
|
||||
/**
|
||||
* Bot uses only [HTTP interactions](https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction) and is shown in the online member list
|
||||
*/
|
||||
BotHTTPInteractions = 1 << 19,
|
||||
/**
|
||||
* User has been identified as spammer
|
||||
*/
|
||||
Spammer = 1 << 20,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/user#user-object-premium-types
|
||||
*/
|
||||
export enum UserPremiumType {
|
||||
None,
|
||||
NitroClassic,
|
||||
Nitro,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/user#connection-object
|
||||
*/
|
||||
export interface APIConnection {
|
||||
/**
|
||||
* ID of the connection account
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* The username of the connection account
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The service of the connection
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
* Whether the connection is revoked
|
||||
*/
|
||||
revoked?: boolean;
|
||||
/**
|
||||
* An array of partial server integrations
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#integration-object
|
||||
*/
|
||||
integrations?: Partial<APIGuildIntegration>[];
|
||||
/**
|
||||
* Whether the connection is verified
|
||||
*/
|
||||
verified: boolean;
|
||||
/**
|
||||
* Whether friend sync is enabled for this connection
|
||||
*/
|
||||
friend_sync: boolean;
|
||||
/**
|
||||
* Whether activities related to this connection will be shown in presence updates
|
||||
*/
|
||||
show_activity: boolean;
|
||||
/**
|
||||
* Visibility of this connection
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#connection-object-visibility-types
|
||||
*/
|
||||
visibility: ConnectionVisibility;
|
||||
}
|
||||
|
||||
export enum ConnectionVisibility {
|
||||
/**
|
||||
* Invisible to everyone except the user themselves
|
||||
*/
|
||||
None,
|
||||
/**
|
||||
* Visible to everyone
|
||||
*/
|
||||
Everyone,
|
||||
}
|
||||
92
deno/payloads/v10/voice.ts
Normal file
92
deno/payloads/v10/voice.ts
Normal file
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/resources/voice
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIGuildMember } from './guild.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
*/
|
||||
export interface GatewayVoiceState {
|
||||
/**
|
||||
* The guild id this voice state is for
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* The channel id this user is connected to
|
||||
*/
|
||||
channel_id: Snowflake | null;
|
||||
/**
|
||||
* The user id this voice state is for
|
||||
*/
|
||||
user_id: Snowflake;
|
||||
/**
|
||||
* The guild member this voice state is for
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
/**
|
||||
* The session id for this voice state
|
||||
*/
|
||||
session_id: string;
|
||||
/**
|
||||
* Whether this user is deafened by the server
|
||||
*/
|
||||
deaf: boolean;
|
||||
/**
|
||||
* Whether this user is muted by the server
|
||||
*/
|
||||
mute: boolean;
|
||||
/**
|
||||
* Whether this user is locally deafened
|
||||
*/
|
||||
self_deaf: boolean;
|
||||
/**
|
||||
* Whether this user is locally muted
|
||||
*/
|
||||
self_mute: boolean;
|
||||
/**
|
||||
* Whether this user is streaming using "Go Live"
|
||||
*/
|
||||
self_stream?: boolean;
|
||||
/**
|
||||
* Whether this user's camera is enabled
|
||||
*/
|
||||
self_video: boolean;
|
||||
/**
|
||||
* Whether this user is muted by the current user
|
||||
*/
|
||||
suppress: boolean;
|
||||
/**
|
||||
* The time at which the user requested to speak
|
||||
*/
|
||||
request_to_speak_timestamp: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-region-object
|
||||
*/
|
||||
export interface APIVoiceRegion {
|
||||
/**
|
||||
* Unique ID for the region
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Name of the region
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* `true` for a single server that is closest to the current user's client
|
||||
*/
|
||||
optimal: boolean;
|
||||
/**
|
||||
* Whether this is a deprecated voice region (avoid switching to these)
|
||||
*/
|
||||
deprecated: boolean;
|
||||
/**
|
||||
* Whether this is a custom voice region (used for events/etc)
|
||||
*/
|
||||
custom: boolean;
|
||||
}
|
||||
79
deno/payloads/v10/webhook.ts
Normal file
79
deno/payloads/v10/webhook.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/resources/webhook
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIPartialChannel, APIPartialGuild, APIUser } from './mod.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/webhook#webhook-object
|
||||
*/
|
||||
export interface APIWebhook {
|
||||
/**
|
||||
* The id of the webhook
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* The type of the webhook
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types
|
||||
*/
|
||||
type: WebhookType;
|
||||
/**
|
||||
* The guild id this webhook is for
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* The channel id this webhook is for
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* The user this webhook was created by (not returned when getting a webhook with its token)
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
user?: APIUser;
|
||||
/**
|
||||
* The default name of the webhook
|
||||
*/
|
||||
name: string | null;
|
||||
/**
|
||||
* The default avatar of the webhook
|
||||
*/
|
||||
avatar: string | null;
|
||||
/**
|
||||
* The secure token of the webhook (returned for Incoming Webhooks)
|
||||
*/
|
||||
token?: string;
|
||||
/**
|
||||
* The bot/OAuth2 application that created this webhook
|
||||
*/
|
||||
application_id: Snowflake | null;
|
||||
/**
|
||||
* The guild of the channel that this webhook is following (returned for Channel Follower Webhooks)
|
||||
*/
|
||||
source_guild?: APIPartialGuild;
|
||||
/**
|
||||
* The channel that this webhook is following (returned for Channel Follower Webhooks)
|
||||
*/
|
||||
source_channel?: APIPartialChannel;
|
||||
/**
|
||||
* The url used for executing the webhook (returned by the webhooks OAuth2 flow)
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
|
||||
export enum WebhookType {
|
||||
/**
|
||||
* Incoming Webhooks can post messages to channels with a generated token
|
||||
*/
|
||||
Incoming = 1,
|
||||
/**
|
||||
* Channel Follower Webhooks are internal webhooks used with Channel Following to post new messages into channels
|
||||
*/
|
||||
ChannelFollower,
|
||||
/**
|
||||
* Application webhooks are webhooks used with Interactions
|
||||
*/
|
||||
Application,
|
||||
}
|
||||
@@ -2,9 +2,15 @@ import type { Snowflake } from '../../../../../globals.ts';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandAttachmentOption =
|
||||
APIApplicationCommandOptionBase<ApplicationCommandOptionType.Attachment>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandInteractionDataAttachmentOption = APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Attachment,
|
||||
Snowflake
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIApplicationCommandOptionBase<Type extends ApplicationCommandOptionType> {
|
||||
type: Type;
|
||||
name: string;
|
||||
@@ -7,12 +10,18 @@ export interface APIApplicationCommandOptionBase<Type extends ApplicationCommand
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIInteractionDataOptionBase<T extends ApplicationCommandOptionType, D> {
|
||||
name: string;
|
||||
type: T;
|
||||
value: D;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
|
||||
Base extends APIApplicationCommandOptionBase<ApplicationCommandOptionType>,
|
||||
ChoiceType extends APIApplicationCommandOptionChoice,
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandBooleanOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Boolean>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandInteractionDataBooleanOption = APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Boolean,
|
||||
boolean
|
||||
|
||||
@@ -3,11 +3,17 @@ import type { ChannelType } from '../../../channel.ts';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIApplicationCommandChannelOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Channel,
|
||||
Snowflake
|
||||
|
||||
@@ -5,6 +5,9 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
interface APIApplicationCommandIntegerOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
|
||||
/**
|
||||
@@ -17,11 +20,17 @@ interface APIApplicationCommandIntegerOptionBase
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
|
||||
APIApplicationCommandIntegerOptionBase,
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Integer, number> {
|
||||
focused?: boolean;
|
||||
|
||||
@@ -2,9 +2,15 @@ import type { Snowflake } from '../../../../../globals.ts';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandMentionableOption =
|
||||
APIApplicationCommandOptionBase<ApplicationCommandOptionType.Mentionable>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandInteractionDataMentionableOption = APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Mentionable,
|
||||
Snowflake
|
||||
|
||||
@@ -5,6 +5,9 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
interface APIApplicationCommandNumberOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
|
||||
/**
|
||||
@@ -17,11 +20,17 @@ interface APIApplicationCommandNumberOptionBase
|
||||
max_value?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
|
||||
APIApplicationCommandNumberOptionBase,
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIApplicationCommandInteractionDataNumberOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Number, number> {
|
||||
focused?: boolean;
|
||||
|
||||
@@ -2,8 +2,14 @@ import type { Snowflake } from '../../../../../globals.ts';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandRoleOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.Role>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandInteractionDataRoleOption = APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Role,
|
||||
Snowflake
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum ApplicationCommandOptionType {
|
||||
Subcommand = 1,
|
||||
@@ -17,6 +18,7 @@ export enum ApplicationCommandOptionType {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIApplicationCommandOptionChoice<ValueType = string | number> {
|
||||
name: string;
|
||||
|
||||
@@ -5,11 +5,17 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<
|
||||
APIApplicationCommandOptionBase<ApplicationCommandOptionType.String>,
|
||||
APIApplicationCommandOptionChoice<string>
|
||||
>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIApplicationCommandInteractionDataStringOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
|
||||
focused?: boolean;
|
||||
|
||||
@@ -2,11 +2,17 @@ import type { APIApplicationCommandBasicOption, APIApplicationCommandInteraction
|
||||
import type { APIApplicationCommandOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIApplicationCommandSubcommandOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
options?: APIApplicationCommandBasicOption[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIApplicationCommandInteractionDataSubcommandOption {
|
||||
name: string;
|
||||
type: ApplicationCommandOptionType.Subcommand;
|
||||
|
||||
@@ -5,11 +5,17 @@ import type {
|
||||
APIApplicationCommandSubcommandOption,
|
||||
} from './subcommand.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIApplicationCommandSubcommandGroupOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
options?: APIApplicationCommandSubcommandOption[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIApplicationCommandInteractionDataSubcommandGroupOption {
|
||||
name: string;
|
||||
type: ApplicationCommandOptionType.SubcommandGroup;
|
||||
|
||||
@@ -2,8 +2,14 @@ import type { Snowflake } from '../../../../../globals.ts';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandUserOption = APIApplicationCommandOptionBase<ApplicationCommandOptionType.User>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandInteractionDataUserOption = APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.User,
|
||||
Snowflake
|
||||
|
||||
@@ -8,67 +8,67 @@ import type {
|
||||
} from '../applicationCommands.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
|
||||
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
|
||||
import type {
|
||||
APIApplicationCommandStringOption,
|
||||
APIApplicationCommandInteractionDataStringOption,
|
||||
} from './_chatInput/string.ts';
|
||||
import type {
|
||||
APIApplicationCommandIntegerOption,
|
||||
APIApplicationCommandInteractionDataIntegerOption,
|
||||
} from './_chatInput/integer.ts';
|
||||
import type {
|
||||
APIApplicationCommandBooleanOption,
|
||||
APIApplicationCommandInteractionDataBooleanOption,
|
||||
} from './_chatInput/boolean.ts';
|
||||
import type {
|
||||
APIApplicationCommandUserOption,
|
||||
APIApplicationCommandInteractionDataUserOption,
|
||||
} from './_chatInput/user.ts';
|
||||
import type {
|
||||
APIApplicationCommandChannelOption,
|
||||
APIApplicationCommandInteractionDataChannelOption,
|
||||
} from './_chatInput/channel.ts';
|
||||
import type {
|
||||
APIApplicationCommandRoleOption,
|
||||
APIApplicationCommandInteractionDataRoleOption,
|
||||
} from './_chatInput/role.ts';
|
||||
import type {
|
||||
APIApplicationCommandMentionableOption,
|
||||
APIApplicationCommandInteractionDataMentionableOption,
|
||||
} from './_chatInput/mentionable.ts';
|
||||
import type {
|
||||
APIApplicationCommandNumberOption,
|
||||
APIApplicationCommandInteractionDataNumberOption,
|
||||
} from './_chatInput/number.ts';
|
||||
import type {
|
||||
APIApplicationCommandAttachmentOption,
|
||||
APIApplicationCommandInteractionDataAttachmentOption,
|
||||
} from './_chatInput/attachment.ts';
|
||||
import type {
|
||||
APIApplicationCommandSubcommandOption,
|
||||
APIApplicationCommandBooleanOption,
|
||||
APIApplicationCommandInteractionDataBooleanOption,
|
||||
} from './_chatInput/boolean.ts';
|
||||
import type {
|
||||
APIApplicationCommandChannelOption,
|
||||
APIApplicationCommandInteractionDataChannelOption,
|
||||
} from './_chatInput/channel.ts';
|
||||
import type {
|
||||
APIApplicationCommandIntegerOption,
|
||||
APIApplicationCommandInteractionDataIntegerOption,
|
||||
} from './_chatInput/integer.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataMentionableOption,
|
||||
APIApplicationCommandMentionableOption,
|
||||
} from './_chatInput/mentionable.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataNumberOption,
|
||||
APIApplicationCommandNumberOption,
|
||||
} from './_chatInput/number.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataRoleOption,
|
||||
APIApplicationCommandRoleOption,
|
||||
} from './_chatInput/role.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataStringOption,
|
||||
APIApplicationCommandStringOption,
|
||||
} from './_chatInput/string.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataSubcommandOption,
|
||||
APIApplicationCommandSubcommandOption,
|
||||
} from './_chatInput/subcommand.ts';
|
||||
import type {
|
||||
APIApplicationCommandSubcommandGroupOption,
|
||||
APIApplicationCommandInteractionDataSubcommandGroupOption,
|
||||
APIApplicationCommandSubcommandGroupOption,
|
||||
} from './_chatInput/subcommandGroup.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataUserOption,
|
||||
APIApplicationCommandUserOption,
|
||||
} from './_chatInput/user.ts';
|
||||
|
||||
export * from './_chatInput/string.ts';
|
||||
export * from './_chatInput/integer.ts';
|
||||
export * from './_chatInput/attachment.ts';
|
||||
export * from './_chatInput/boolean.ts';
|
||||
export * from './_chatInput/user.ts';
|
||||
export * from './_chatInput/channel.ts';
|
||||
export * from './_chatInput/role.ts';
|
||||
export * from './_chatInput/integer.ts';
|
||||
export * from './_chatInput/mentionable.ts';
|
||||
export * from './_chatInput/number.ts';
|
||||
export * from './_chatInput/attachment.ts';
|
||||
export * from './_chatInput/role.ts';
|
||||
export * from './_chatInput/shared.ts';
|
||||
export * from './_chatInput/string.ts';
|
||||
export * from './_chatInput/subcommand.ts';
|
||||
export * from './_chatInput/subcommandGroup.ts';
|
||||
export * from './_chatInput/shared.ts';
|
||||
export * from './_chatInput/user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandBasicOption =
|
||||
| APIApplicationCommandStringOption
|
||||
@@ -83,6 +83,7 @@ export type APIApplicationCommandBasicOption =
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandOption =
|
||||
| APIApplicationCommandSubcommandOption
|
||||
@@ -91,12 +92,16 @@ export type APIApplicationCommandOption =
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandInteractionDataOption =
|
||||
| APIApplicationCommandInteractionDataSubcommandOption
|
||||
| APIApplicationCommandInteractionDataSubcommandGroupOption
|
||||
| APIApplicationCommandInteractionDataBasicOption;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandInteractionDataBasicOption =
|
||||
| APIApplicationCommandInteractionDataStringOption
|
||||
| APIApplicationCommandInteractionDataIntegerOption
|
||||
@@ -110,6 +115,7 @@ export type APIApplicationCommandInteractionDataBasicOption =
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIChatInputApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
@@ -119,6 +125,7 @@ export interface APIChatInputApplicationCommandInteractionData
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIChatInputApplicationCommandInteractionDataResolved {
|
||||
users?: Record<Snowflake, APIUser>;
|
||||
@@ -130,18 +137,21 @@ export interface APIChatInputApplicationCommandInteractionDataResolved {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIChatInputApplicationCommandInteraction =
|
||||
APIApplicationCommandInteractionWrapper<APIChatInputApplicationCommandInteractionData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIChatInputApplicationCommandDMInteraction =
|
||||
APIDMInteractionWrapper<APIChatInputApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIChatInputApplicationCommandGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIChatInputApplicationCommandInteraction>;
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
import type { APIUser } from '../../user.ts';
|
||||
import type { Snowflake } from '../../../../globals.ts';
|
||||
import type { APIMessage } from '../../channel.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
|
||||
import type { APIUser } from '../../user.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionWrapper,
|
||||
APIInteractionDataResolvedGuildMember,
|
||||
ApplicationCommandType,
|
||||
} from '../applicationCommands.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
|
||||
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIUserApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
@@ -20,6 +21,7 @@ export interface APIUserApplicationCommandInteractionData
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIUserApplicationCommandInteractionDataResolved {
|
||||
users: Record<Snowflake, APIUser>;
|
||||
@@ -28,6 +30,7 @@ export interface APIUserApplicationCommandInteractionDataResolved {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIMessageApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
@@ -37,6 +40,7 @@ export interface APIMessageApplicationCommandInteractionData
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIMessageApplicationCommandInteractionDataResolved {
|
||||
messages: Record<Snowflake, APIMessage>;
|
||||
@@ -44,6 +48,7 @@ export interface APIMessageApplicationCommandInteractionDataResolved {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIContextMenuInteractionData =
|
||||
| APIUserApplicationCommandInteractionData
|
||||
@@ -51,46 +56,54 @@ export type APIContextMenuInteractionData =
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIUserApplicationCommandInteraction =
|
||||
APIApplicationCommandInteractionWrapper<APIUserApplicationCommandInteractionData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIUserApplicationCommandDMInteraction = APIDMInteractionWrapper<APIUserApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIUserApplicationCommandGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIUserApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIMessageApplicationCommandInteraction =
|
||||
APIApplicationCommandInteractionWrapper<APIMessageApplicationCommandInteractionData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIMessageApplicationCommandDMInteraction =
|
||||
APIDMInteractionWrapper<APIMessageApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIMessageApplicationCommandGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIMessageApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIContextMenuInteraction = APIUserApplicationCommandInteraction | APIMessageApplicationCommandInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIContextMenuDMInteraction =
|
||||
| APIUserApplicationCommandDMInteraction
|
||||
@@ -98,6 +111,7 @@ export type APIContextMenuDMInteraction =
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIContextMenuGuildInteraction =
|
||||
| APIUserApplicationCommandGuildInteraction
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import type { Snowflake } from '../../../../globals.ts';
|
||||
import type { ApplicationCommandType } from '../applicationCommands.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIBaseApplicationCommandInteractionData<Type extends ApplicationCommandType> {
|
||||
id: Snowflake;
|
||||
type: Type;
|
||||
|
||||
@@ -2,6 +2,7 @@ import type { Snowflake } from '../../../../globals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildApplicationCommandPermissions {
|
||||
/**
|
||||
@@ -24,6 +25,7 @@ export interface APIGuildApplicationCommandPermissions {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIApplicationCommandPermission {
|
||||
/**
|
||||
@@ -42,6 +44,7 @@ export interface APIApplicationCommandPermission {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum ApplicationCommandPermissionType {
|
||||
Role = 1,
|
||||
|
||||
@@ -23,6 +23,7 @@ export * from './_applicationCommands/permissions.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIApplicationCommand {
|
||||
/**
|
||||
@@ -67,6 +68,7 @@ export interface APIApplicationCommand {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum ApplicationCommandType {
|
||||
ChatInput = 1,
|
||||
@@ -76,6 +78,7 @@ export enum ApplicationCommandType {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandInteractionData =
|
||||
| APIChatInputApplicationCommandInteractionData
|
||||
@@ -83,6 +86,7 @@ export type APIApplicationCommandInteractionData =
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
|
||||
permissions: Permissions;
|
||||
@@ -90,6 +94,7 @@ export interface APIInteractionDataResolvedChannel extends Required<APIPartialCh
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'user' | 'deaf' | 'mute'> {
|
||||
permissions: Permissions;
|
||||
@@ -97,6 +102,7 @@ export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMemb
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> =
|
||||
APIBaseInteraction<InteractionType.ApplicationCommand, Data> &
|
||||
@@ -104,11 +110,13 @@ export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationC
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandInteraction = APIChatInputApplicationCommandInteraction | APIContextMenuInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandDMInteraction =
|
||||
| APIChatInputApplicationCommandDMInteraction
|
||||
@@ -116,6 +124,7 @@ export type APIApplicationCommandDMInteraction =
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandGuildInteraction =
|
||||
| APIChatInputApplicationCommandGuildInteraction
|
||||
|
||||
@@ -6,6 +6,9 @@ import type {
|
||||
InteractionType,
|
||||
} from '../mod.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
|
||||
InteractionType.ApplicationCommandAutocomplete,
|
||||
APIChatInputApplicationCommandInteractionData
|
||||
@@ -22,12 +25,14 @@ export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandAutocompleteDMInteraction =
|
||||
APIDMInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIApplicationCommandAutocompleteGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import type { Permissions, Snowflake } from '../../../globals.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
import type { LocaleString } from '../../../v8.ts';
|
||||
import type { APIMessage } from '../channel.ts';
|
||||
import type { APIGuildMember } from '../guild.ts';
|
||||
import type { APIUser } from '../user.ts';
|
||||
import type { LocaleString } from '../../../v8.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type PartialAPIMessageInteractionGuildMember = Pick<
|
||||
APIGuildMember,
|
||||
| 'roles'
|
||||
@@ -20,6 +23,7 @@ export type PartialAPIMessageInteractionGuildMember = Pick<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIMessageInteraction {
|
||||
/**
|
||||
@@ -46,6 +50,7 @@ export interface APIMessageInteraction {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIInteractionGuildMember extends APIGuildMember {
|
||||
permissions: Permissions;
|
||||
@@ -56,6 +61,7 @@ export interface APIInteractionGuildMember extends APIGuildMember {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
/**
|
||||
@@ -114,12 +120,18 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
guild_locale?: LocaleString;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
|
||||
Original,
|
||||
'member' | 'guild_id'
|
||||
> &
|
||||
Required<Pick<Original, 'user'>>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
|
||||
Original,
|
||||
'user'
|
||||
|
||||
@@ -2,6 +2,9 @@ import type { ComponentType } from '../channel.ts';
|
||||
import type { APIBaseInteraction, InteractionType } from '../interactions.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from './base.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIMessageComponentInteraction = APIBaseInteraction<
|
||||
InteractionType.MessageComponent,
|
||||
APIMessageComponentInteractionData
|
||||
@@ -13,8 +16,14 @@ export type APIMessageComponentInteraction = APIBaseInteraction<
|
||||
>
|
||||
>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIMessageComponentInteractionData = APIMessageButtonInteractionData | APIMessageSelectMenuInteractionData;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIMessageComponentBaseInteractionData<CType extends ComponentType> {
|
||||
/**
|
||||
* The `custom_id` of the component
|
||||
@@ -26,13 +35,25 @@ export interface APIMessageComponentBaseInteractionData<CType extends ComponentT
|
||||
component_type: CType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIMessageSelectMenuInteractionData
|
||||
extends APIMessageComponentBaseInteractionData<ComponentType.SelectMenu> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIMessageComponentDMInteraction = APIDMInteractionWrapper<APIMessageComponentInteraction>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIMessageComponentGuildInteraction = APIGuildInteractionWrapper<APIMessageComponentInteraction>;
|
||||
|
||||
@@ -1,23 +1,32 @@
|
||||
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts';
|
||||
import type {
|
||||
APIBaseInteraction,
|
||||
InteractionType,
|
||||
ComponentType,
|
||||
APIDMInteractionWrapper,
|
||||
APIGuildInteractionWrapper,
|
||||
ComponentType,
|
||||
InteractionType,
|
||||
} from '../mod.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface ModalSubmitComponent {
|
||||
type: ComponentType;
|
||||
custom_id: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface ModalSubmitActionRowComponent
|
||||
extends Omit<APIActionRowComponent<APIModalActionRowComponent>, 'components'> {
|
||||
components: ModalSubmitComponent[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIModalSubmission {
|
||||
/**
|
||||
* A developer-defined identifier for the component, max 100 characters
|
||||
@@ -31,16 +40,19 @@ export interface APIModalSubmission {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIModalSubmitInteraction = APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission> &
|
||||
Required<Pick<APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission>, 'data'>>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIModalSubmitDMInteraction = APIDMInteractionWrapper<APIModalSubmitInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>;
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import type { APIBaseInteraction } from './base.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIPingInteraction = Omit<APIBaseInteraction<InteractionType.Ping, never>, 'locale'>;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import type { MessageFlags } from '../mod.ts';
|
||||
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v8.ts';
|
||||
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
|
||||
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts';
|
||||
import type { MessageFlags } from '../mod.ts';
|
||||
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum InteractionType {
|
||||
Ping = 1,
|
||||
@@ -16,6 +17,7 @@ export enum InteractionType {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIInteractionResponse =
|
||||
| APIInteractionResponsePong
|
||||
@@ -26,34 +28,55 @@ export type APIInteractionResponse =
|
||||
| APIApplicationCommandAutocompleteResponse
|
||||
| APIModalInteractionResponse;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIInteractionResponsePong {
|
||||
type: InteractionResponseType.Pong;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIApplicationCommandAutocompleteResponse {
|
||||
type: InteractionResponseType.ApplicationCommandAutocompleteResult;
|
||||
data: APICommandAutocompleteInteractionResponseCallbackData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIModalInteractionResponse {
|
||||
type: InteractionResponseType.Modal;
|
||||
data: APIModalInteractionResponseCallbackData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIInteractionResponseChannelMessageWithSource {
|
||||
type: InteractionResponseType.ChannelMessageWithSource;
|
||||
data: APIInteractionResponseCallbackData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIInteractionResponseDeferredChannelMessageWithSource {
|
||||
type: InteractionResponseType.DeferredChannelMessageWithSource;
|
||||
data?: Pick<APIInteractionResponseCallbackData, 'flags'>;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIInteractionResponseDeferredMessageUpdate {
|
||||
type: InteractionResponseType.DeferredMessageUpdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIInteractionResponseUpdateMessage {
|
||||
type: InteractionResponseType.UpdateMessage;
|
||||
data?: APIInteractionResponseCallbackData;
|
||||
@@ -61,6 +84,7 @@ export interface APIInteractionResponseUpdateMessage {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum InteractionResponseType {
|
||||
/**
|
||||
@@ -95,18 +119,23 @@ export enum InteractionResponseType {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIInteractionResponseCallbackData = Omit<
|
||||
RESTPostAPIWebhookWithTokenJSONBody,
|
||||
'username' | 'avatar_url'
|
||||
> & { flags?: MessageFlags };
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APICommandAutocompleteInteractionResponseCallbackData {
|
||||
choices?: APIApplicationCommandOptionChoice[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIModalInteractionResponseCallbackData {
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,7 @@ import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#application-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIApplication {
|
||||
/**
|
||||
@@ -55,8 +56,10 @@ export interface APIApplication {
|
||||
/**
|
||||
* If this application is a game sold on Discord, this field will be the summary field for the store page
|
||||
* of its primary sku
|
||||
*
|
||||
* @deprecated Always an empty string, will be removed in v11
|
||||
*/
|
||||
summary: string;
|
||||
summary: '';
|
||||
/**
|
||||
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
|
||||
*
|
||||
@@ -95,6 +98,7 @@ export interface APIApplication {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#application-object-application-flags
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum ApplicationFlags {
|
||||
EmbeddedReleased = 1 << 1,
|
||||
|
||||
@@ -12,19 +12,20 @@ import type {
|
||||
GuildVerificationLevel,
|
||||
IntegrationExpireBehavior,
|
||||
} from './guild.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { StickerFormatType } from './sticker.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
import type { APIWebhook } from './webhook.ts';
|
||||
import type { StageInstancePrivacyLevel } from './stageInstance.ts';
|
||||
import type {
|
||||
APIGuildScheduledEvent,
|
||||
GuildScheduledEventEntityType,
|
||||
GuildScheduledEventStatus,
|
||||
} from './guildScheduledEvent.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { StageInstancePrivacyLevel } from './stageInstance.ts';
|
||||
import type { StickerFormatType } from './sticker.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
import type { APIWebhook } from './webhook.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIAuditLog {
|
||||
/**
|
||||
@@ -61,6 +62,7 @@ export interface APIAuditLog {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIAuditLogEntry {
|
||||
/**
|
||||
@@ -103,6 +105,7 @@ export interface APIAuditLogEntry {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum AuditLogEvent {
|
||||
GuildUpdate = 1,
|
||||
@@ -163,6 +166,7 @@ export enum AuditLogEvent {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIAuditLogOptions {
|
||||
/**
|
||||
@@ -249,6 +253,9 @@ export interface APIAuditLogOptions {
|
||||
role_name?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum AuditLogOptionsType {
|
||||
Role = '0',
|
||||
Member = '1',
|
||||
@@ -256,6 +263,7 @@ export enum AuditLogOptionsType {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyName
|
||||
@@ -325,81 +333,97 @@ export type APIAuditLogChange =
|
||||
|
||||
/**
|
||||
* Returned when an entity's name is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's or sticker's or guild scheduled event's description is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDescription = AuditLogChangeData<'description', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's icon is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's splash is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's discovery splash is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDiscoverySplashHash = AuditLogChangeData<'discovery_splash_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's banner hash is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyBannerHash = AuditLogChangeData<'banner_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's owner_id is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyOwnerId = AuditLogChangeData<'owner_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's region is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's preferred_locale is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPreferredLocale = AuditLogChangeData<'preferred_locale', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's afk_channel_id is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAFKChannelId = AuditLogChangeData<'afk_channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's afk_timeout is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's rules_channel_id is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's public_updates_channel_id is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's mfa_level is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's verification_level is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's explicit_content_filter is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<
|
||||
'explicit_content_filter',
|
||||
@@ -408,6 +432,7 @@ export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<
|
||||
|
||||
/**
|
||||
* Returned when a guild's default_message_notifications is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<
|
||||
'default_message_notifications',
|
||||
@@ -416,237 +441,284 @@ export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData
|
||||
|
||||
/**
|
||||
* Returned when a guild's vanity_url_code is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>;
|
||||
|
||||
/**
|
||||
* Returned when new role(s) are added
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', APIRole[]>;
|
||||
|
||||
/**
|
||||
* Returned when role(s) are removed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', APIRole[]>;
|
||||
|
||||
/**
|
||||
* Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's widget is enabled
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's widget_channel_id is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyWidgetChannelId = AuditLogChangeData<'widget_channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's system_channel_id is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeySystemChannelId = AuditLogChangeData<'system_channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's position is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's topic is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>;
|
||||
|
||||
/**
|
||||
* Returned when a voice channel's bitrate is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's permission overwrites is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's NSFW restriction is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>;
|
||||
|
||||
/**
|
||||
* The application ID of the added or removed Webhook or Bot
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyApplicationId = AuditLogChangeData<'application_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's amount of seconds a user has to wait before sending another message
|
||||
* is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>;
|
||||
|
||||
/**
|
||||
* Returned when a permission bitfield is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', string>;
|
||||
|
||||
/**
|
||||
* Returned when a role's color is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>;
|
||||
|
||||
/**
|
||||
* Returned when a role's hoist status is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a role's mentionable status is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when an overwrite's allowed permissions bitfield is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', string>;
|
||||
|
||||
/**
|
||||
* Returned when an overwrite's denied permissions bitfield is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', string>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's code is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's or guild scheduled event's channel_id is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyChannelId = AuditLogChangeData<'channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's inviter_id is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyInviterId = AuditLogChangeData<'inviter_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's max_uses is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's uses is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's max_age is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's temporary status is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a user's deaf status is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a user's mute status is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a user's nick is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyNick = AuditLogChangeData<'nick', string>;
|
||||
|
||||
/**
|
||||
* Returned when a user's avatar_hash is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>;
|
||||
|
||||
/**
|
||||
* The ID of the changed entity - sometimes used in conjunction with other keys
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyId = AuditLogChangeData<'id', Snowflake>;
|
||||
|
||||
/**
|
||||
* The type of entity created
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', number | string>;
|
||||
|
||||
/**
|
||||
* Returned when an integration's enable_emoticons is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when an integration's expire_behavior is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
|
||||
|
||||
/**
|
||||
* Returned when an integration's expire_grace_period is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;
|
||||
|
||||
/**
|
||||
* Returned when a voice channel's user_limit is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
|
||||
|
||||
/**
|
||||
* Returned when privacy level of a stage instance or guild scheduled event is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's related emoji is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTags = AuditLogChangeData<'tags', string>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's format_type is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyFormatType = AuditLogChangeData<'format_type', StickerFormatType>;
|
||||
|
||||
/**
|
||||
* Empty string
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAsset = AuditLogChangeData<'asset', ''>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's availability is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's guild_id is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when entity type of a guild scheduled event is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEntityType = AuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
|
||||
|
||||
/**
|
||||
* Returned when status of a guild scheduled event is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildScheduledEventStatus>;
|
||||
|
||||
/**
|
||||
* Returned when location of a guild scheduled event is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
|
||||
|
||||
/**
|
||||
* Returned when a user's timeout is changed
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* Not documented, but partial only includes id, name, and type
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIPartialChannel {
|
||||
/**
|
||||
@@ -34,14 +35,21 @@ export interface APIPartialChannel {
|
||||
/**
|
||||
* This interface is used to allow easy extension for other channel types. While
|
||||
* also allowing `APIPartialChannel` to be used without breaking.
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIChannelBase<T extends ChannelType> extends APIPartialChannel {
|
||||
type: T;
|
||||
}
|
||||
|
||||
// TODO: update when text in voice is released
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type TextChannelType = ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildNews | ChannelType.GuildText;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GuildChannelType = Exclude<
|
||||
| TextChannelType
|
||||
| ChannelType.GuildVoice
|
||||
@@ -51,6 +59,9 @@ export type GuildChannelType = Exclude<
|
||||
ChannelType.DM | ChannelType.GroupDM
|
||||
>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APITextBasedChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
/**
|
||||
* The id of the last message sent in this channel (may not point to an existing or valid message)
|
||||
@@ -58,6 +69,9 @@ export interface APITextBasedChannel<T extends ChannelType> extends APIChannelBa
|
||||
last_message_id?: Snowflake | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
/**
|
||||
* The id of the guild (may be missing for some channel objects received over gateway guild dispatches)
|
||||
@@ -83,8 +97,14 @@ export interface APIGuildChannel<T extends ChannelType> extends APIChannelBase<T
|
||||
nsfw?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildTextChannel<T extends GuildTextChannelType>
|
||||
extends APITextBasedChannel<T>,
|
||||
APIGuildChannel<T> {
|
||||
@@ -99,6 +119,9 @@ export interface APIGuildTextChannel<T extends GuildTextChannelType>
|
||||
last_pin_timestamp?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APITextChannel extends APIGuildTextChannel<ChannelType.GuildText> {
|
||||
/**
|
||||
* Amount of seconds a user has to wait before sending another message (0-21600);
|
||||
@@ -107,10 +130,24 @@ export interface APITextChannel extends APIGuildTextChannel<ChannelType.GuildTex
|
||||
rate_limit_per_user?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APINewsChannel = APIGuildTextChannel<ChannelType.GuildNews>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIGuildCategoryChannel = APIGuildChannel<ChannelType.GuildCategory>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIGuildStoreChannel = APIGuildChannel<ChannelType.GuildStore>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageVoice | ChannelType.GuildVoice> {
|
||||
/**
|
||||
* The bitrate (in bits) of the voice channel
|
||||
@@ -134,6 +171,9 @@ export interface APIVoiceChannel extends APIGuildChannel<ChannelType.GuildStageV
|
||||
video_quality_mode?: VideoQualityMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
interface APIDMChannelBase<T extends ChannelType> extends APITextBasedChannel<T> {
|
||||
/**
|
||||
* The recipients of the DM
|
||||
@@ -143,8 +183,14 @@ interface APIDMChannelBase<T extends ChannelType> extends APITextBasedChannel<T>
|
||||
recipients?: APIUser[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIDMChannel = APIDMChannelBase<ChannelType.DM>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGroupDMChannel extends APIDMChannelBase<ChannelType.GroupDM> {
|
||||
/**
|
||||
* Application id of the group DM creator if it is bot-created
|
||||
@@ -166,6 +212,7 @@ export interface APIGroupDMChannel extends APIDMChannelBase<ChannelType.GroupDM>
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIChannel =
|
||||
| APIGroupDMChannel
|
||||
@@ -179,6 +226,7 @@ export type APIChannel =
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum ChannelType {
|
||||
/**
|
||||
@@ -223,6 +271,9 @@ export enum ChannelType {
|
||||
GuildStageVoice = 13,
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum VideoQualityMode {
|
||||
/**
|
||||
* Discord chooses the quality for optimal performance
|
||||
@@ -236,6 +287,7 @@ export enum VideoQualityMode {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIMessage {
|
||||
/**
|
||||
@@ -424,6 +476,7 @@ export interface APIMessage {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-types
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum MessageType {
|
||||
Default,
|
||||
@@ -451,6 +504,7 @@ export enum MessageType {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-activity-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIMessageActivity {
|
||||
/**
|
||||
@@ -469,6 +523,7 @@ export interface APIMessageActivity {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-reference-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIMessageReference {
|
||||
/**
|
||||
@@ -487,6 +542,7 @@ export interface APIMessageReference {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum MessageActivityType {
|
||||
Join = 1,
|
||||
@@ -497,6 +553,7 @@ export enum MessageActivityType {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-object-message-flags
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum MessageFlags {
|
||||
/**
|
||||
@@ -531,6 +588,7 @@ export enum MessageFlags {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#followed-channel-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIFollowedChannel {
|
||||
/**
|
||||
@@ -545,6 +603,7 @@ export interface APIFollowedChannel {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIReaction {
|
||||
/**
|
||||
@@ -565,6 +624,7 @@ export interface APIReaction {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIOverwrite {
|
||||
/**
|
||||
@@ -595,6 +655,9 @@ export interface APIOverwrite {
|
||||
deny: Permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum OverwriteType {
|
||||
Role,
|
||||
Member,
|
||||
@@ -604,6 +667,7 @@ export enum OverwriteType {
|
||||
* https://discord.com/developers/docs/resources/channel#embed-object-embed-structure
|
||||
*
|
||||
* Length limit: 6000 characters
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIEmbed {
|
||||
/**
|
||||
@@ -687,6 +751,7 @@ export interface APIEmbed {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#embed-object-embed-types
|
||||
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum EmbedType {
|
||||
/**
|
||||
@@ -717,6 +782,7 @@ export enum EmbedType {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#embed-object-embed-thumbnail-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIEmbedThumbnail {
|
||||
/**
|
||||
@@ -739,6 +805,7 @@ export interface APIEmbedThumbnail {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#embed-object-embed-video-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIEmbedVideo {
|
||||
/**
|
||||
@@ -757,6 +824,7 @@ export interface APIEmbedVideo {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#embed-object-embed-image-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIEmbedImage {
|
||||
/**
|
||||
@@ -779,6 +847,7 @@ export interface APIEmbedImage {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#embed-object-embed-provider-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIEmbedProvider {
|
||||
/**
|
||||
@@ -793,6 +862,7 @@ export interface APIEmbedProvider {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#embed-object-embed-author-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIEmbedAuthor {
|
||||
/**
|
||||
@@ -817,6 +887,7 @@ export interface APIEmbedAuthor {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIEmbedFooter {
|
||||
/**
|
||||
@@ -837,6 +908,7 @@ export interface APIEmbedFooter {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIEmbedField {
|
||||
/**
|
||||
@@ -859,6 +931,7 @@ export interface APIEmbedField {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIAttachment {
|
||||
/**
|
||||
@@ -907,6 +980,7 @@ export interface APIAttachment {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-mention-object-channel-mention-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIChannelMention {
|
||||
/**
|
||||
@@ -931,6 +1005,7 @@ export interface APIChannelMention {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum AllowedMentionsTypes {
|
||||
/**
|
||||
@@ -949,6 +1024,7 @@ export enum AllowedMentionsTypes {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mentions-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIAllowedMentions {
|
||||
/**
|
||||
@@ -975,6 +1051,7 @@ export interface APIAllowedMentions {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#component-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIBaseComponent<T extends ComponentType> {
|
||||
/**
|
||||
@@ -985,6 +1062,7 @@ export interface APIBaseComponent<T extends ComponentType> {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#component-types
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum ComponentType {
|
||||
/**
|
||||
@@ -1007,6 +1085,7 @@ export enum ComponentType {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#action-rows
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIActionRowComponent<T extends APIActionRowComponentTypes>
|
||||
extends APIBaseComponent<ComponentType.ActionRow> {
|
||||
@@ -1038,6 +1117,9 @@ interface APIButtonComponentBase<Style extends ButtonStyle> extends APIBaseCompo
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIMessageComponentEmoji {
|
||||
/**
|
||||
* Emoji id
|
||||
@@ -1053,6 +1135,9 @@ export interface APIMessageComponentEmoji {
|
||||
animated?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIButtonComponentWithCustomId
|
||||
extends APIButtonComponentBase<
|
||||
ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success | ButtonStyle.Danger
|
||||
@@ -1063,6 +1148,9 @@ export interface APIButtonComponentWithCustomId
|
||||
custom_id: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIButtonComponentWithURL extends APIButtonComponentBase<ButtonStyle.Link> {
|
||||
/**
|
||||
* The URL to direct users to when clicked for Link buttons
|
||||
@@ -1070,10 +1158,14 @@ export interface APIButtonComponentWithURL extends APIButtonComponentBase<Button
|
||||
url: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIButtonComponent = APIButtonComponentWithCustomId | APIButtonComponentWithURL;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#button-object-button-styles
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum ButtonStyle {
|
||||
Primary = 1,
|
||||
@@ -1085,6 +1177,7 @@ export enum ButtonStyle {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-styles
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum TextInputStyle {
|
||||
Short = 1,
|
||||
@@ -1093,6 +1186,7 @@ export enum TextInputStyle {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menus
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APISelectMenuComponent extends APIBaseComponent<ComponentType.SelectMenu> {
|
||||
/**
|
||||
@@ -1129,6 +1223,7 @@ export interface APISelectMenuComponent extends APIBaseComponent<ComponentType.S
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-option-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APISelectMenuOption {
|
||||
/**
|
||||
@@ -1155,6 +1250,7 @@ export interface APISelectMenuOption {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APITextInputComponent extends APIBaseComponent<ComponentType.TextInput> {
|
||||
/**
|
||||
@@ -1193,16 +1289,27 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#message-components
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIMessageComponent = APIMessageActionRowComponent | APIActionRowComponent<APIMessageActionRowComponent>;
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIModalComponent = APIModalActionRowComponent | APIActionRowComponent<APIModalActionRowComponent>;
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIActionRowComponentTypes = APIMessageActionRowComponent | APIModalActionRowComponent;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/message-components#message-components
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIMessageActionRowComponent = APIButtonComponent | APISelectMenuComponent;
|
||||
|
||||
// Modal components
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIModalActionRowComponent = APITextInputComponent;
|
||||
|
||||
@@ -8,6 +8,7 @@ import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* Not documented but mentioned
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIPartialEmoji {
|
||||
/**
|
||||
@@ -26,6 +27,7 @@ export interface APIPartialEmoji {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIEmoji extends APIPartialEmoji {
|
||||
/**
|
||||
|
||||
@@ -8,6 +8,7 @@ import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#get-gateway
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGatewayInfo {
|
||||
/**
|
||||
@@ -18,6 +19,7 @@ export interface APIGatewayInfo {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#get-gateway-bot
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGatewayBotInfo extends APIGatewayInfo {
|
||||
/**
|
||||
@@ -36,6 +38,7 @@ export interface APIGatewayBotInfo extends APIGatewayInfo {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#session-start-limit-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGatewaySessionStartLimit {
|
||||
/**
|
||||
@@ -58,6 +61,7 @@ export interface APIGatewaySessionStartLimit {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#presence-update-presence-update-event-fields
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayPresenceUpdate {
|
||||
/**
|
||||
@@ -91,6 +95,9 @@ export interface GatewayPresenceUpdate {
|
||||
client_status?: GatewayPresenceClientStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum PresenceUpdateStatus {
|
||||
Online = 'online',
|
||||
DoNotDisturb = 'dnd',
|
||||
@@ -104,6 +111,7 @@ export enum PresenceUpdateStatus {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#client-status-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayPresenceClientStatus {
|
||||
/**
|
||||
@@ -122,6 +130,7 @@ export interface GatewayPresenceClientStatus {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayActivity {
|
||||
/**
|
||||
@@ -207,6 +216,9 @@ export interface GatewayActivity {
|
||||
buttons?: string[] | GatewayActivityButton[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum ActivityPlatform {
|
||||
Desktop = 'desktop',
|
||||
Samsung = 'samsung',
|
||||
@@ -215,6 +227,7 @@ export enum ActivityPlatform {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-types
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum ActivityType {
|
||||
/**
|
||||
@@ -245,6 +258,7 @@ export enum ActivityType {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-timestamps
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayActivityTimestamps {
|
||||
/**
|
||||
@@ -259,11 +273,13 @@ export interface GatewayActivityTimestamps {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-emoji
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'id' | 'animated'>> & Pick<APIEmoji, 'name'>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-party
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayActivityParty {
|
||||
/**
|
||||
@@ -278,6 +294,7 @@ export interface GatewayActivityParty {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-assets
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayActivityAssets = Partial<
|
||||
Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>
|
||||
@@ -285,11 +302,13 @@ export type GatewayActivityAssets = Partial<
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-secrets
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayActivitySecrets = Partial<Record<'join' | 'spectate' | 'match', string>>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum ActivityFlags {
|
||||
Instance = 1 << 0,
|
||||
@@ -303,6 +322,9 @@ export enum ActivityFlags {
|
||||
Embedded = 1 << 8,
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayActivityButton {
|
||||
/**
|
||||
* The text shown on the button (1-32 characters)
|
||||
|
||||
@@ -6,15 +6,16 @@ import type { Permissions, Snowflake } from '../../globals.ts';
|
||||
import type { APIChannel } from './channel.ts';
|
||||
import type { APIEmoji } from './emoji.ts';
|
||||
import type { GatewayPresenceUpdate, PresenceUpdateStatus } from './gateway.ts';
|
||||
import type { APIGuildScheduledEvent } from './guildScheduledEvent.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APIStageInstance } from './stageInstance.ts';
|
||||
import type { APISticker } from './sticker.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
import type { GatewayVoiceState } from './voice.ts';
|
||||
import type { APIGuildScheduledEvent } from './guildScheduledEvent.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#unavailable-guild-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIUnavailableGuild {
|
||||
/**
|
||||
@@ -29,6 +30,7 @@ export interface APIUnavailableGuild {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'>, Pick<APIGuild, 'welcome_screen'> {
|
||||
/**
|
||||
@@ -81,6 +83,7 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuild extends APIPartialGuild {
|
||||
/**
|
||||
@@ -342,6 +345,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GuildDefaultMessageNotifications {
|
||||
AllMessages,
|
||||
@@ -350,6 +354,7 @@ export enum GuildDefaultMessageNotifications {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GuildExplicitContentFilter {
|
||||
Disabled,
|
||||
@@ -359,6 +364,7 @@ export enum GuildExplicitContentFilter {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GuildMFALevel {
|
||||
None,
|
||||
@@ -367,6 +373,7 @@ export enum GuildMFALevel {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GuildNSFWLevel {
|
||||
Default,
|
||||
@@ -377,6 +384,7 @@ export enum GuildNSFWLevel {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-verification-level
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GuildVerificationLevel {
|
||||
/**
|
||||
@@ -403,6 +411,7 @@ export enum GuildVerificationLevel {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GuildPremiumTier {
|
||||
None,
|
||||
@@ -413,6 +422,7 @@ export enum GuildPremiumTier {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GuildSystemChannelFlags {
|
||||
/**
|
||||
@@ -435,6 +445,7 @@ export enum GuildSystemChannelFlags {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-guild-features
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GuildFeature {
|
||||
/**
|
||||
@@ -530,6 +541,7 @@ export enum GuildFeature {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-preview-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildPreview {
|
||||
/**
|
||||
@@ -590,6 +602,7 @@ export interface APIGuildPreview {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildWidgetSettings {
|
||||
/**
|
||||
@@ -604,6 +617,7 @@ export interface APIGuildWidgetSettings {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildMember {
|
||||
/**
|
||||
@@ -660,6 +674,7 @@ export interface APIGuildMember {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#integration-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildIntegration {
|
||||
/**
|
||||
@@ -752,10 +767,14 @@ export interface APIGuildIntegration {
|
||||
application?: APIGuildIntegrationApplication;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIGuildInteractionType = 'twitch' | 'youtube' | 'discord';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum IntegrationExpireBehavior {
|
||||
RemoveRole,
|
||||
@@ -764,6 +783,7 @@ export enum IntegrationExpireBehavior {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#integration-account-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIIntegrationAccount {
|
||||
/**
|
||||
@@ -778,6 +798,7 @@ export interface APIIntegrationAccount {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#integration-application-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildIntegrationApplication {
|
||||
/**
|
||||
@@ -800,8 +821,10 @@ export interface APIGuildIntegrationApplication {
|
||||
description: string;
|
||||
/**
|
||||
* The summary of the app
|
||||
*
|
||||
* @deprecated Always an empty string, will be removed in v11
|
||||
*/
|
||||
summary: string;
|
||||
summary: '';
|
||||
/**
|
||||
* The bot associated with this application
|
||||
*
|
||||
@@ -812,6 +835,7 @@ export interface APIGuildIntegrationApplication {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#ban-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIBan {
|
||||
/**
|
||||
@@ -826,6 +850,7 @@ export interface APIBan {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildWidget {
|
||||
id: Snowflake;
|
||||
@@ -838,6 +863,7 @@ export interface APIGuildWidget {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildWidgetChannel {
|
||||
id: Snowflake;
|
||||
@@ -847,6 +873,7 @@ export interface APIGuildWidgetChannel {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-example-get-guild-widget
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildWidgetMember {
|
||||
id: string;
|
||||
@@ -860,6 +887,7 @@ export interface APIGuildWidgetMember {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GuildWidgetStyle {
|
||||
/**
|
||||
@@ -885,6 +913,9 @@ export enum GuildWidgetStyle {
|
||||
Banner4 = 'banner4',
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildWelcomeScreen {
|
||||
/**
|
||||
* The welcome screen short message
|
||||
@@ -896,6 +927,9 @@ export interface APIGuildWelcomeScreen {
|
||||
welcome_channels: APIGuildWelcomeScreenChannel[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildWelcomeScreenChannel {
|
||||
/**
|
||||
* The channel id that is suggested
|
||||
@@ -915,6 +949,9 @@ export interface APIGuildWelcomeScreenChannel {
|
||||
emoji_name: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildMembershipScreening {
|
||||
/**
|
||||
* When the fields were last updated
|
||||
@@ -932,6 +969,9 @@ export interface APIGuildMembershipScreening {
|
||||
|
||||
// TODO: make this a union based on the type in the future, when new types are added
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildMembershipScreeningField {
|
||||
/**
|
||||
* The type of field
|
||||
@@ -951,6 +991,9 @@ export interface APIGuildMembershipScreeningField {
|
||||
required: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum MembershipScreeningFieldType {
|
||||
/**
|
||||
* Server Rules
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import type { APIUser } from './user.ts';
|
||||
import type { APIGuildMember } from './guild.ts';
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIGuildMember } from './guild.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
|
||||
/**
|
||||
* The id of the guild event
|
||||
@@ -69,17 +72,26 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
image: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.Voice> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIExternalGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
channel_id: null;
|
||||
@@ -88,6 +100,7 @@ export interface APIExternalGuildScheduledEvent
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIGuildScheduledEvent =
|
||||
| APIStageInstanceGuildScheduledEvent
|
||||
@@ -96,6 +109,7 @@ export type APIGuildScheduledEvent =
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildScheduledEventEntityMetadata {
|
||||
/**
|
||||
@@ -106,6 +120,7 @@ export interface APIGuildScheduledEventEntityMetadata {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GuildScheduledEventEntityType {
|
||||
StageInstance = 1,
|
||||
@@ -115,6 +130,7 @@ export enum GuildScheduledEventEntityType {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GuildScheduledEventStatus {
|
||||
Scheduled = 1,
|
||||
@@ -125,6 +141,7 @@ export enum GuildScheduledEventStatus {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum GuildScheduledEventPrivacyLevel {
|
||||
/**
|
||||
@@ -135,6 +152,7 @@ export enum GuildScheduledEventPrivacyLevel {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object-guild-scheduled-event-user-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIGuildScheduledEventUser {
|
||||
/**
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
import type {
|
||||
APIMessageComponentDMInteraction,
|
||||
APIMessageComponentGuildInteraction,
|
||||
APIMessageComponentInteraction,
|
||||
} from './_interactions/messageComponents.ts';
|
||||
import type { APIPingInteraction } from './_interactions/ping.ts';
|
||||
import type {
|
||||
APIApplicationCommandDMInteraction,
|
||||
APIApplicationCommandGuildInteraction,
|
||||
@@ -14,22 +8,29 @@ import type {
|
||||
APIApplicationCommandAutocompleteGuildInteraction,
|
||||
APIApplicationCommandAutocompleteInteraction,
|
||||
} from './_interactions/autocomplete.ts';
|
||||
import type {
|
||||
APIMessageComponentDMInteraction,
|
||||
APIMessageComponentGuildInteraction,
|
||||
APIMessageComponentInteraction,
|
||||
} from './_interactions/messageComponents.ts';
|
||||
import type {
|
||||
APIModalSubmitDMInteraction,
|
||||
APIModalSubmitGuildInteraction,
|
||||
APIModalSubmitInteraction,
|
||||
} from './_interactions/modalSubmit.ts';
|
||||
import type { APIPingInteraction } from './_interactions/ping.ts';
|
||||
|
||||
export * from './_interactions/applicationCommands.ts';
|
||||
export * from './_interactions/autocomplete.ts';
|
||||
export * from './_interactions/base.ts';
|
||||
export * from './_interactions/messageComponents.ts';
|
||||
export * from './_interactions/modalSubmit.ts';
|
||||
export * from './_interactions/ping.ts';
|
||||
export * from './_interactions/responses.ts';
|
||||
export * from './_interactions/applicationCommands.ts';
|
||||
export * from './_interactions/modalSubmit.ts';
|
||||
export * from './_interactions/autocomplete.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIInteraction =
|
||||
| APIPingInteraction
|
||||
@@ -40,6 +41,7 @@ export type APIInteraction =
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIDMInteraction =
|
||||
| APIApplicationCommandDMInteraction
|
||||
@@ -49,6 +51,7 @@ export type APIDMInteraction =
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIGuildInteraction =
|
||||
| APIApplicationCommandGuildInteraction
|
||||
|
||||
@@ -2,15 +2,16 @@
|
||||
* Types extracted from https://discord.com/developers/docs/resources/invite
|
||||
*/
|
||||
|
||||
import type { APIApplication } from './application.ts';
|
||||
import type { APIPartialChannel } from './channel.ts';
|
||||
import type { APIPartialGuild } from './guild.ts';
|
||||
import type { APIApplication } from './application.ts';
|
||||
import type { APIGuildScheduledEvent } from './guildScheduledEvent.ts';
|
||||
import type { APIInviteStageInstance } from './stageInstance.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
import type { APIGuildScheduledEvent } from './guildScheduledEvent.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIInvite {
|
||||
/**
|
||||
@@ -77,6 +78,7 @@ export interface APIInvite {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum InviteTargetType {
|
||||
Stream = 1,
|
||||
@@ -85,6 +87,7 @@ export enum InviteTargetType {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-metadata-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIExtendedInvite extends APIInvite {
|
||||
/**
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from '../common.ts';
|
||||
export * from './application.ts';
|
||||
export * from './auditLog.ts';
|
||||
export * from './channel.ts';
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
* Types extracted from https://discord.com/developers/docs/topics/oauth2
|
||||
*/
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum OAuth2Scopes {
|
||||
/**
|
||||
* For oauth2 bots, this puts the bot in the user's selected guild by default
|
||||
|
||||
@@ -4,61 +4,9 @@
|
||||
|
||||
import type { Permissions, Snowflake } from '../../globals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
|
||||
*
|
||||
* These flags are exported as `BigInt`s and NOT numbers. Wrapping them in `Number()`
|
||||
* may cause issues, try to use BigInts as much as possible or modules that can
|
||||
* replicate them in some way
|
||||
*/
|
||||
export const PermissionFlagsBits = {
|
||||
CreateInstantInvite: 1n << 0n,
|
||||
KickMembers: 1n << 1n,
|
||||
BanMembers: 1n << 2n,
|
||||
Administrator: 1n << 3n,
|
||||
ManageChannels: 1n << 4n,
|
||||
ManageGuild: 1n << 5n,
|
||||
AddReactions: 1n << 6n,
|
||||
ViewAuditLog: 1n << 7n,
|
||||
PrioritySpeaker: 1n << 8n,
|
||||
Stream: 1n << 9n,
|
||||
ViewChannel: 1n << 10n,
|
||||
SendMessages: 1n << 11n,
|
||||
SendTTSMessages: 1n << 12n,
|
||||
ManageMessages: 1n << 13n,
|
||||
EmbedLinks: 1n << 14n,
|
||||
AttachFiles: 1n << 15n,
|
||||
ReadMessageHistory: 1n << 16n,
|
||||
MentionEveryone: 1n << 17n,
|
||||
UseExternalEmojis: 1n << 18n,
|
||||
ViewGuildInsights: 1n << 19n,
|
||||
Connect: 1n << 20n,
|
||||
Speak: 1n << 21n,
|
||||
MuteMembers: 1n << 22n,
|
||||
DeafenMembers: 1n << 23n,
|
||||
MoveMembers: 1n << 24n,
|
||||
UseVAD: 1n << 25n,
|
||||
ChangeNickname: 1n << 26n,
|
||||
ManageNicknames: 1n << 27n,
|
||||
ManageRoles: 1n << 28n,
|
||||
ManageWebhooks: 1n << 29n,
|
||||
ManageEmojisAndStickers: 1n << 30n,
|
||||
UseApplicationCommands: 1n << 31n,
|
||||
RequestToSpeak: 1n << 32n,
|
||||
ManageEvents: 1n << 33n,
|
||||
UseExternalStickers: 1n << 37n,
|
||||
StartEmbeddedActivities: 1n << 39n,
|
||||
ModerateMembers: 1n << 40n,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* Freeze the object of bits, preventing any modifications to it
|
||||
* @internal
|
||||
*/
|
||||
Object.freeze(PermissionFlagsBits);
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#role-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIRole {
|
||||
/**
|
||||
@@ -111,6 +59,7 @@ export interface APIRole {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIRoleTags {
|
||||
/**
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { APIGuildMember } from './guild.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/stage-instance#stage-instance-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIStageInstance {
|
||||
/**
|
||||
@@ -35,6 +36,7 @@ export interface APIStageInstance {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum StageInstancePrivacyLevel {
|
||||
/**
|
||||
@@ -49,6 +51,7 @@ export enum StageInstancePrivacyLevel {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIInviteStageInstance {
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,7 @@ import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#sticker-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APISticker {
|
||||
/**
|
||||
@@ -66,6 +67,7 @@ export interface APISticker {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum StickerType {
|
||||
/**
|
||||
@@ -80,6 +82,7 @@ export enum StickerType {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum StickerFormatType {
|
||||
PNG = 1,
|
||||
@@ -89,11 +92,13 @@ export enum StickerFormatType {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#sticker-item-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type APIStickerItem = Pick<APISticker, 'id' | 'name' | 'format_type'>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#sticker-pack-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIStickerPack {
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,7 @@ import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-team-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APITeam {
|
||||
/**
|
||||
@@ -33,6 +34,7 @@ export interface APITeam {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-team-members-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APITeamMember {
|
||||
/**
|
||||
@@ -59,6 +61,7 @@ export interface APITeamMember {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum TeamMemberMembershipState {
|
||||
Invited = 1,
|
||||
|
||||
@@ -8,6 +8,7 @@ import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/template#template-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APITemplate {
|
||||
/**
|
||||
@@ -58,6 +59,9 @@ export interface APITemplate {
|
||||
is_dirty: boolean | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APITemplateSerializedSourceGuild extends Omit<RESTPostAPIGuildsJSONBody, 'icon'> {
|
||||
description: string | null;
|
||||
preferred_locale: string;
|
||||
|
||||
@@ -7,6 +7,7 @@ import type { APIGuildIntegration } from './guild.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/user#user-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIUser {
|
||||
/**
|
||||
@@ -83,6 +84,7 @@ export interface APIUser {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/user#user-object-user-flags
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum UserFlags {
|
||||
/**
|
||||
@@ -110,7 +112,7 @@ export enum UserFlags {
|
||||
*/
|
||||
HypeSquadOnlineHouse2 = 1 << 7,
|
||||
/**
|
||||
* House Balance Member
|
||||
* House Balance MemberW
|
||||
*/
|
||||
HypeSquadOnlineHouse3 = 1 << 8,
|
||||
/**
|
||||
@@ -149,6 +151,7 @@ export enum UserFlags {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/user#user-object-premium-types
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum UserPremiumType {
|
||||
None,
|
||||
@@ -158,6 +161,7 @@ export enum UserPremiumType {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/user#connection-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIConnection {
|
||||
/**
|
||||
@@ -202,6 +206,9 @@ export interface APIConnection {
|
||||
visibility: ConnectionVisibility;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum ConnectionVisibility {
|
||||
/**
|
||||
* Invisible to everyone except the user themselves
|
||||
|
||||
@@ -7,6 +7,7 @@ import type { APIGuildMember } from './guild.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface GatewayVoiceState {
|
||||
/**
|
||||
@@ -67,6 +68,7 @@ export interface GatewayVoiceState {
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-region-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIVoiceRegion {
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,7 @@ import type { APIPartialChannel, APIPartialGuild, APIUser } from './mod.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/webhook#webhook-object
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export interface APIWebhook {
|
||||
/**
|
||||
@@ -63,6 +64,9 @@ export interface APIWebhook {
|
||||
url?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum WebhookType {
|
||||
/**
|
||||
* Incoming Webhooks can post messages to channels with a generated token
|
||||
|
||||
@@ -8,64 +8,63 @@ import type {
|
||||
} from '../applicationCommands.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
|
||||
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
|
||||
import type {
|
||||
APIApplicationCommandStringOption,
|
||||
APIApplicationCommandInteractionDataStringOption,
|
||||
} from './_chatInput/string.ts';
|
||||
import type {
|
||||
APIApplicationCommandIntegerOption,
|
||||
APIApplicationCommandInteractionDataIntegerOption,
|
||||
} from './_chatInput/integer.ts';
|
||||
import type {
|
||||
APIApplicationCommandBooleanOption,
|
||||
APIApplicationCommandInteractionDataBooleanOption,
|
||||
} from './_chatInput/boolean.ts';
|
||||
import type {
|
||||
APIApplicationCommandUserOption,
|
||||
APIApplicationCommandInteractionDataUserOption,
|
||||
} from './_chatInput/user.ts';
|
||||
import type {
|
||||
APIApplicationCommandChannelOption,
|
||||
APIApplicationCommandInteractionDataChannelOption,
|
||||
} from './_chatInput/channel.ts';
|
||||
import type {
|
||||
APIApplicationCommandRoleOption,
|
||||
APIApplicationCommandInteractionDataRoleOption,
|
||||
} from './_chatInput/role.ts';
|
||||
import type {
|
||||
APIApplicationCommandMentionableOption,
|
||||
APIApplicationCommandInteractionDataMentionableOption,
|
||||
} from './_chatInput/mentionable.ts';
|
||||
import type {
|
||||
APIApplicationCommandNumberOption,
|
||||
APIApplicationCommandInteractionDataNumberOption,
|
||||
} from './_chatInput/number.ts';
|
||||
import type {
|
||||
APIApplicationCommandAttachmentOption,
|
||||
APIApplicationCommandInteractionDataAttachmentOption,
|
||||
} from './_chatInput/attachment.ts';
|
||||
import type {
|
||||
APIApplicationCommandSubcommandOption,
|
||||
APIApplicationCommandBooleanOption,
|
||||
APIApplicationCommandInteractionDataBooleanOption,
|
||||
} from './_chatInput/boolean.ts';
|
||||
import type {
|
||||
APIApplicationCommandChannelOption,
|
||||
APIApplicationCommandInteractionDataChannelOption,
|
||||
} from './_chatInput/channel.ts';
|
||||
import type {
|
||||
APIApplicationCommandIntegerOption,
|
||||
APIApplicationCommandInteractionDataIntegerOption,
|
||||
} from './_chatInput/integer.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataMentionableOption,
|
||||
APIApplicationCommandMentionableOption,
|
||||
} from './_chatInput/mentionable.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataNumberOption,
|
||||
APIApplicationCommandNumberOption,
|
||||
} from './_chatInput/number.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataRoleOption,
|
||||
APIApplicationCommandRoleOption,
|
||||
} from './_chatInput/role.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataStringOption,
|
||||
APIApplicationCommandStringOption,
|
||||
} from './_chatInput/string.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataSubcommandOption,
|
||||
APIApplicationCommandSubcommandOption,
|
||||
} from './_chatInput/subcommand.ts';
|
||||
import type {
|
||||
APIApplicationCommandSubcommandGroupOption,
|
||||
APIApplicationCommandInteractionDataSubcommandGroupOption,
|
||||
APIApplicationCommandSubcommandGroupOption,
|
||||
} from './_chatInput/subcommandGroup.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionDataUserOption,
|
||||
APIApplicationCommandUserOption,
|
||||
} from './_chatInput/user.ts';
|
||||
|
||||
export * from './_chatInput/string.ts';
|
||||
export * from './_chatInput/integer.ts';
|
||||
export * from './_chatInput/attachment.ts';
|
||||
export * from './_chatInput/boolean.ts';
|
||||
export * from './_chatInput/user.ts';
|
||||
export * from './_chatInput/channel.ts';
|
||||
export * from './_chatInput/role.ts';
|
||||
export * from './_chatInput/integer.ts';
|
||||
export * from './_chatInput/mentionable.ts';
|
||||
export * from './_chatInput/number.ts';
|
||||
export * from './_chatInput/attachment.ts';
|
||||
export * from './_chatInput/role.ts';
|
||||
export * from './_chatInput/shared.ts';
|
||||
export * from './_chatInput/string.ts';
|
||||
export * from './_chatInput/subcommand.ts';
|
||||
export * from './_chatInput/subcommandGroup.ts';
|
||||
export * from './_chatInput/shared.ts';
|
||||
export * from './_chatInput/user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import type { APIUser } from '../../user.ts';
|
||||
import type { Snowflake } from '../../../../globals.ts';
|
||||
import type { APIMessage } from '../../channel.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
|
||||
import type { APIUser } from '../../user.ts';
|
||||
import type {
|
||||
APIApplicationCommandInteractionWrapper,
|
||||
APIInteractionDataResolvedGuildMember,
|
||||
ApplicationCommandType,
|
||||
} from '../applicationCommands.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
|
||||
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { Permissions, Snowflake } from '../../../globals.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
import type { LocaleString } from '../../../v9.ts';
|
||||
import type { APIMessage } from '../channel.ts';
|
||||
import type { APIGuildMember } from '../guild.ts';
|
||||
import type { APIUser } from '../user.ts';
|
||||
import type { LocaleString } from '../../../v9.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
|
||||
export type PartialAPIMessageInteractionGuildMember = Pick<
|
||||
APIGuildMember,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts';
|
||||
import type {
|
||||
APIBaseInteraction,
|
||||
InteractionType,
|
||||
ComponentType,
|
||||
APIDMInteractionWrapper,
|
||||
APIGuildInteractionWrapper,
|
||||
ComponentType,
|
||||
InteractionType,
|
||||
} from '../mod.ts';
|
||||
|
||||
export interface ModalSubmitComponent {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { MessageFlags } from '../mod.ts';
|
||||
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v9.ts';
|
||||
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
|
||||
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts';
|
||||
import type { MessageFlags } from '../mod.ts';
|
||||
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user