Add events module with dashboard UI, scheduling, signups, and settings updates; extend env/readme.

This commit is contained in:
Pascal Prießnitz
2025-12-02 23:52:10 +01:00
parent 874b01c999
commit 829d160164
578 changed files with 37647 additions and 11590 deletions

View File

@@ -8,8 +8,9 @@
<a href="https://discord.gg/djs"><img src="https://img.shields.io/discord/222078108977594368?color=5865F2&logo=discord&logoColor=white" alt="Discord server" /></a>
<a href="https://www.npmjs.com/package/@discordjs/voice"><img src="https://img.shields.io/npm/v/@discordjs/voice.svg?maxAge=3600" alt="npm version" /></a>
<a href="https://www.npmjs.com/package/@discordjs/voice"><img src="https://img.shields.io/npm/dt/@discordjs/voice.svg?maxAge=3600" alt="npm downloads" /></a>
<a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/test.yml/badge.svg" alt="Build status" /></a>
<a href="https://codecov.io/gh/discordjs/discord.js" ><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2&flag=voice" alt="Code coverage" /></a>
<a href="https://github.com/discordjs/discord.js/actions"><img src="https://github.com/discordjs/discord.js/actions/workflows/tests.yml/badge.svg" alt="Build status" /></a>
<a href="https://github.com/discordjs/discord.js/commits/main/packages/voice"><img alt="Last commit." src="https://img.shields.io/github/last-commit/discordjs/discord.js?logo=github&logoColor=ffffff&path=packages%2Fvoice" /></a>
<a href="https://codecov.io/gh/discordjs/discord.js"><img src="https://codecov.io/gh/discordjs/discord.js/branch/main/graph/badge.svg?precision=2&flag=voice" alt="Code coverage" /></a>
</p>
<p>
<a href="https://vercel.com/?utm_source=discordjs&utm_campaign=oss"><img src="https://raw.githubusercontent.com/discordjs/discord.js/main/.github/powered-by-vercel.svg" alt="Vercel" /></a>
@@ -24,7 +25,7 @@
**Features:**
- Send and receive\* audio in Discord voice-based channels
- A strong focus on reliability and predictable behaviour
- A strong focus on reliability and predictable behavior
- Horizontal scalability and libraries other than [discord.js](https://discord.js.org/) are supported with custom adapters
- A robust audio processing system that can handle a wide range of audio sources
@@ -32,7 +33,7 @@
## Installation
**Node.js 16.11.0 or newer is required.**
**Node.js 22.12.0 or newer is required.**
```sh
npm install @discordjs/voice
@@ -51,9 +52,13 @@ try installing another.
**Encryption Libraries (npm install):**
> [!NOTE]
> You only need to install one of these libraries if your system does not support `aes-256-gcm` (verify by running `require('node:crypto').getCiphers().includes('aes-256-gcm')`).
- `sodium-native`: ^3.3.0
- `sodium`: ^3.0.2
- `tweetnacl`: ^1.0.3
- `@stablelib/xchacha20poly1305`: ^2.0.0
- `@noble/ciphers`: ^1.0.0
- `libsodium-wrappers`: ^0.7.9
**Opus Libraries (npm install):**
@@ -77,7 +82,7 @@ The [voice-examples][voice-examples] repository contains examples on how to use
- [Guide][guide] ([source][guide-source])
Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
- [discord.js Discord server][discord]
- [Discord API Discord server][discord-api]
- [Discord Developers Discord server][discord-developers]
- [GitHub][source]
- [npm][npm]
- [Related libraries][related-libs]
@@ -99,7 +104,7 @@ If you don't understand something in the documentation, you are experiencing pro
[guide-source]: https://github.com/discordjs/guide
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
[discord]: https://discord.gg/djs
[discord-api]: https://discord.gg/discord-api
[discord-developers]: https://discord.gg/discord-developers
[source]: https://github.com/discordjs/discord.js/tree/main/packages/voice
[npm]: https://www.npmjs.com/package/@discordjs/voice
[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries

View File

@@ -2,6 +2,7 @@ import { Buffer } from 'node:buffer';
import { EventEmitter } from 'node:events';
import { Readable, ReadableOptions } from 'node:stream';
import prism from 'prism-media';
import { VoiceDavePrepareTransitionData, VoiceDavePrepareEpochData, VoiceOpcodes, VoiceSendPayload, VoiceReceivePayload } from 'discord-api-types/voice/v8';
import WebSocket, { MessageEvent } from 'ws';
import { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from 'discord-api-types/v10';
@@ -442,11 +443,11 @@ declare class AudioPlayer extends EventEmitter {
private unsubscribe;
/**
* The state that the player is in.
*
* @remarks
* The setter will perform clean-up operations where necessary.
*/
get state(): AudioPlayerState;
/**
* Sets a new state for the player, performing clean-up operations where necessary.
*/
set state(newState: AudioPlayerState);
/**
* Plays a new resource on the player. If the player is already playing a resource, the existing resource is destroyed
@@ -556,6 +557,174 @@ declare function getVoiceConnections(group: string): Map<string, VoiceConnection
*/
declare function getVoiceConnection(guildId: string, group?: string): VoiceConnection | undefined;
interface SessionMethods {
canPassthrough(userId: string): boolean;
decrypt(userId: string, mediaType: 0 | 1, packet: Buffer): Buffer;
encryptOpus(packet: Buffer): Buffer;
getSerializedKeyPackage(): Buffer;
getVerificationCode(userId: string): Promise<string>;
processCommit(commit: Buffer): void;
processProposals(optype: 0 | 1, proposals: Buffer, recognizedUserIds?: string[]): ProposalsResult;
processWelcome(welcome: Buffer): void;
ready: boolean;
reinit(protocolVersion: number, userId: string, channelId: string): void;
reset(): void;
setExternalSender(externalSender: Buffer): void;
setPassthroughMode(passthrough: boolean, expiry: number): void;
voicePrivacyCode: string;
}
interface ProposalsResult {
commit?: Buffer;
welcome?: Buffer;
}
interface TransitionResult {
success: boolean;
transitionId: number;
}
/**
* Options that dictate the session behavior.
*/
interface DAVESessionOptions {
decryptionFailureTolerance?: number | undefined;
}
interface DAVESession extends EventEmitter {
on(event: 'error', listener: (error: Error) => void): this;
on(event: 'debug', listener: (message: string) => void): this;
on(event: 'keyPackage', listener: (message: Buffer) => void): this;
on(event: 'invalidateTransition', listener: (transitionId: number) => void): this;
}
/**
* Manages the DAVE protocol group session.
*/
declare class DAVESession extends EventEmitter {
/**
* The channel id represented by this session.
*/
channelId: string;
/**
* The user id represented by this session.
*/
userId: string;
/**
* The protocol version being used.
*/
protocolVersion: number;
/**
* The last transition id executed.
*/
lastTransitionId?: number | undefined;
/**
* The pending transition.
*/
private pendingTransition?;
/**
* Whether this session was downgraded previously.
*/
private downgraded;
/**
* The amount of consecutive failures encountered when decrypting.
*/
private consecutiveFailures;
/**
* The amount of consecutive failures needed to attempt to recover.
*/
private readonly failureTolerance;
/**
* Whether this session is currently re-initializing due to an invalid transition.
*/
reinitializing: boolean;
/**
* The underlying DAVE Session of this wrapper.
*/
session: SessionMethods | undefined;
constructor(protocolVersion: number, userId: string, channelId: string, options: DAVESessionOptions);
/**
* The current voice privacy code of the session. Will be `null` if there is no session.
*/
get voicePrivacyCode(): string | null;
/**
* Gets the verification code for a user in the session.
*
* @throws Will throw if there is not an active session or the user id provided is invalid or not in the session.
*/
getVerificationCode(userId: string): Promise<string>;
/**
* Re-initializes (or initializes) the underlying session.
*/
reinit(): void;
/**
* Set the external sender for this session.
*
* @param externalSender - The external sender
*/
setExternalSender(externalSender: Buffer): void;
/**
* Prepare for a transition.
*
* @param data - The transition data
* @returns Whether we should signal to the voice server that we are ready
*/
prepareTransition(data: VoiceDavePrepareTransitionData): boolean;
/**
* Execute a transition.
*
* @param transitionId - The transition id to execute on
*/
executeTransition(transitionId: number): boolean | undefined;
/**
* Prepare for a new epoch.
*
* @param data - The epoch data
*/
prepareEpoch(data: VoiceDavePrepareEpochData): void;
/**
* Recover from an invalid transition by re-initializing.
*
* @param transitionId - The transition id to invalidate
*/
recoverFromInvalidTransition(transitionId: number): void;
/**
* Processes proposals from the MLS group.
*
* @param payload - The binary message payload
* @param connectedClients - The set of connected client IDs
* @returns The payload to send back to the voice server, if there is one
*/
processProposals(payload: Buffer, connectedClients: Set<string>): Buffer | undefined;
/**
* Processes a commit from the MLS group.
*
* @param payload - The payload
* @returns The transaction id and whether it was successful
*/
processCommit(payload: Buffer): TransitionResult;
/**
* Processes a welcome from the MLS group.
*
* @param payload - The payload
* @returns The transaction id and whether it was successful
*/
processWelcome(payload: Buffer): TransitionResult;
/**
* Encrypt a packet using end-to-end encryption.
*
* @param packet - The packet to encrypt
*/
encrypt(packet: Buffer): Buffer;
/**
* Decrypt a packet using end-to-end encryption.
*
* @param packet - The packet to decrypt
* @param userId - The user id that sent the packet
* @returns The decrypted packet, or `null` if the decryption failed but should be ignored
*/
decrypt(packet: Buffer, userId: string): Buffer | null;
/**
* Resets the session.
*/
destroy(): void;
}
/**
* Stores an IP address and port. Used to store socket details for the local client as well as
* for Discord.
@@ -634,6 +803,14 @@ declare class VoiceUDPSocket extends EventEmitter {
performIPDiscovery(ssrc: number): Promise<SocketConfig>;
}
/**
* A binary WebSocket message.
*/
interface BinaryWebSocketMessage {
op: VoiceOpcodes;
payload: Buffer;
seq: number;
}
interface VoiceWebSocket extends EventEmitter {
on(event: 'error', listener: (error: Error) => void): this;
on(event: 'open', listener: (event: WebSocket.Event) => void): this;
@@ -650,6 +827,12 @@ interface VoiceWebSocket extends EventEmitter {
* @eventProperty
*/
on(event: 'packet', listener: (packet: any) => void): this;
/**
* Binary message event.
*
* @eventProperty
*/
on(event: 'binary', listener: (message: BinaryWebSocketMessage) => void): this;
}
/**
* An extension of the WebSocket class to provide helper functionality when interacting
@@ -678,6 +861,10 @@ declare class VoiceWebSocket extends EventEmitter {
* The last recorded ping.
*/
ping?: number;
/**
* The last sequence number acknowledged from Discord. Will be `-1` if no sequence numbered messages have been received.
*/
sequence: number;
/**
* The debug logger function, if debugging is enabled.
*/
@@ -698,7 +885,7 @@ declare class VoiceWebSocket extends EventEmitter {
destroy(): void;
/**
* Handles message events on the WebSocket. Attempts to JSON parse the messages and emit them
* as packets.
* as packets. Binary messages will be parsed and emitted.
*
* @param event - The message event
*/
@@ -708,7 +895,14 @@ declare class VoiceWebSocket extends EventEmitter {
*
* @param packet - The packet to send
*/
sendPacket(packet: any): void;
sendPacket(packet: VoiceSendPayload): void;
/**
* Sends a binary message over the WebSocket.
*
* @param opcode - The opcode to use
* @param payload - The payload to send
*/
sendBinaryMessage(opcode: VoiceOpcodes, payload: Buffer): void;
/**
* Sends a heartbeat over the WebSocket.
*/
@@ -758,7 +952,7 @@ interface NetworkingIdentifyingState {
*/
interface NetworkingUdpHandshakingState {
code: NetworkingStatusCode.UdpHandshaking;
connectionData: Pick<ConnectionData, 'ssrc'>;
connectionData: Pick<ConnectionData, 'connectedClients' | 'ssrc'>;
connectionOptions: ConnectionOptions;
udp: VoiceUDPSocket;
ws: VoiceWebSocket;
@@ -768,7 +962,7 @@ interface NetworkingUdpHandshakingState {
*/
interface NetworkingSelectingProtocolState {
code: NetworkingStatusCode.SelectingProtocol;
connectionData: Pick<ConnectionData, 'ssrc'>;
connectionData: Pick<ConnectionData, 'connectedClients' | 'ssrc'>;
connectionOptions: ConnectionOptions;
udp: VoiceUDPSocket;
ws: VoiceWebSocket;
@@ -781,6 +975,7 @@ interface NetworkingReadyState {
code: NetworkingStatusCode.Ready;
connectionData: ConnectionData;
connectionOptions: ConnectionOptions;
dave?: DAVESession | undefined;
preparedPacket?: Buffer | undefined;
udp: VoiceUDPSocket;
ws: VoiceWebSocket;
@@ -793,6 +988,7 @@ interface NetworkingResumingState {
code: NetworkingStatusCode.Resuming;
connectionData: ConnectionData;
connectionOptions: ConnectionOptions;
dave?: DAVESession | undefined;
preparedPacket?: Buffer | undefined;
udp: VoiceUDPSocket;
ws: VoiceWebSocket;
@@ -814,6 +1010,7 @@ type NetworkingState = NetworkingClosedState | NetworkingIdentifyingState | Netw
* and VOICE_STATE_UPDATE packets.
*/
interface ConnectionOptions {
channelId: string;
endpoint: string;
serverId: string;
sessionId: string;
@@ -825,6 +1022,7 @@ interface ConnectionOptions {
* the connection, timing information for playback of streams.
*/
interface ConnectionData {
connectedClients: Set<string>;
encryptionMode: string;
nonce: number;
nonceBuffer: Buffer;
@@ -835,6 +1033,14 @@ interface ConnectionData {
ssrc: number;
timestamp: number;
}
/**
* Options for networking that dictate behavior.
*/
interface NetworkingOptions {
daveEncryption?: boolean | undefined;
debug?: boolean | undefined;
decryptionFailureTolerance?: number | undefined;
}
interface Networking extends EventEmitter {
/**
* Debug event for Networking.
@@ -845,6 +1051,7 @@ interface Networking extends EventEmitter {
on(event: 'error', listener: (error: Error) => void): this;
on(event: 'stateChange', listener: (oldState: NetworkingState, newState: NetworkingState) => void): this;
on(event: 'close', listener: (code: number) => void): this;
on(event: 'transitioned', listener: (transitionId: number) => void): this;
}
/**
* Manages the networking required to maintain a voice connection and dispatch audio packets
@@ -855,30 +1062,41 @@ declare class Networking extends EventEmitter {
* The debug logger function, if debugging is enabled.
*/
private readonly debug;
/**
* The options used to create this Networking instance.
*/
private readonly options;
/**
* Creates a new Networking instance.
*/
constructor(options: ConnectionOptions, debug: boolean);
constructor(connectionOptions: ConnectionOptions, options: NetworkingOptions);
/**
* Destroys the Networking instance, transitioning it into the Closed state.
*/
destroy(): void;
/**
* The current state of the networking instance.
*
* @remarks
* The setter will perform clean-up operations where necessary.
*/
get state(): NetworkingState;
/**
* Sets a new state for the networking instance, performing clean-up operations where necessary.
*/
set state(newState: NetworkingState);
/**
* Creates a new WebSocket to a Discord Voice gateway.
*
* @param endpoint - The endpoint to connect to
* @param lastSequence - The last sequence to set for this WebSocket
*/
private createWebSocket;
/**
* Propagates errors from the children VoiceWebSocket and VoiceUDPSocket.
* Creates a new DAVE session for this voice connection if we can create one.
*
* @param protocolVersion - The protocol version to use
*/
private createDaveSession;
/**
* Propagates errors from the children VoiceWebSocket, VoiceUDPSocket and DAVESession.
*
* @param error - The error that was emitted by a child
*/
@@ -906,6 +1124,24 @@ declare class Networking extends EventEmitter {
* @param packet - The received packet
*/
private onWsPacket;
/**
* Called when a binary message is received on the connection's WebSocket.
*
* @param message - The received message
*/
private onWsBinary;
/**
* Called when a new key package is ready to be sent to the voice server.
*
* @param keyPackage - The new key package
*/
private onDaveKeyPackage;
/**
* Called when the DAVE session wants to invalidate their transition and re-initialize.
*
* @param transitionId - The transition to invalidate
*/
private onDaveInvalidateTransition;
/**
* Propagates debug messages from the child WebSocket.
*
@@ -918,6 +1154,12 @@ declare class Networking extends EventEmitter {
* @param message - The emitted debug message
*/
private onUdpDebug;
/**
* Propagates debug messages from the child DAVESession.
*
* @param message - The emitted debug message
*/
private onDaveDebug;
/**
* Prepares an Opus packet for playback. This includes attaching metadata to it and encrypting it.
* It will be stored within the instance, and can be played by dispatchAudio()
@@ -953,6 +1195,7 @@ declare class Networking extends EventEmitter {
*
* @param opusPacket - The Opus packet to prepare
* @param connectionData - The current connection data of the instance
* @param daveSession - The DAVE session to use for encryption
*/
private createAudioPacket;
/**
@@ -960,6 +1203,7 @@ declare class Networking extends EventEmitter {
*
* @param opusPacket - The Opus packet to encrypt
* @param connectionData - The current connection data of the instance
* @param daveSession - The DAVE session to use for encryption
*/
private encryptOpusPacket;
}
@@ -1001,7 +1245,7 @@ declare class AudioReceiveStream extends Readable {
*/
readonly end: EndBehavior;
private endTimeout?;
constructor({ end, ...options }: AudioReceiveStreamOptions);
constructor(options: AudioReceiveStreamOptions);
push(buffer: Buffer | null): boolean;
private renewEndTimeout;
_read(): void;
@@ -1128,7 +1372,7 @@ declare class VoiceReceiver {
* @param packet - The received packet
* @internal
*/
onWsPacket(packet: any): void;
onWsPacket(packet: VoiceReceivePayload): void;
private decrypt;
/**
* Parses an audio packet, decrypting it to yield an Opus packet.
@@ -1137,6 +1381,7 @@ declare class VoiceReceiver {
* @param mode - The encryption mode
* @param nonce - The nonce buffer used by the connection for encryption
* @param secretKey - The secret key used by the connection for encryption
* @param userId - The user id that sent the packet
* @returns The parsed Opus packet
*/
private parsePacket;
@@ -1341,6 +1586,12 @@ interface VoiceConnection extends EventEmitter {
* @eventProperty
*/
on(event: 'stateChange', listener: (oldState: VoiceConnectionState, newState: VoiceConnectionState) => void): this;
/**
* Emitted when the end-to-end encrypted session has transitioned
*
* @eventProperty
*/
on(event: 'transitioned', listener: (transitionId: number) => void): this;
/**
* Emitted when the state of the voice connection changes to a specific status
*
@@ -1383,6 +1634,10 @@ declare class VoiceConnection extends EventEmitter {
* The debug logger function, if debugging is enabled.
*/
private readonly debug;
/**
* The options used to create this voice connection.
*/
private readonly options;
/**
* Creates a new voice connection.
*
@@ -1392,11 +1647,11 @@ declare class VoiceConnection extends EventEmitter {
constructor(joinConfig: JoinConfig, options: CreateVoiceConnectionOptions);
/**
* The current state of the voice connection.
*
* @remarks
* The setter will perform clean-up operations where necessary.
*/
get state(): VoiceConnectionState;
/**
* Updates the state of the voice connection, performing clean-up operations where necessary.
*/
set state(newState: VoiceConnectionState);
/**
* Registers a `VOICE_SERVER_UPDATE` packet to the voice connection. This will cause it to reconnect using the
@@ -1463,6 +1718,12 @@ declare class VoiceConnection extends EventEmitter {
* @param message - The debug message to propagate
*/
private onNetworkingDebug;
/**
* Propagates transitions from the underlying network instance.
*
* @param transitionId - The transition id
*/
private onNetworkingTransitioned;
/**
* Prepares an audio packet for dispatch.
*
@@ -1530,6 +1791,20 @@ declare class VoiceConnection extends EventEmitter {
ws: number | undefined;
udp: number | undefined;
};
/**
* The current voice privacy code of the encrypted session.
*
* @remarks
* For this data to be available, the VoiceConnection must be in the Ready state,
* and the connection would have to be end-to-end encrypted.
*/
get voicePrivacyCode(): string | undefined;
/**
* Gets the verification code for a user in the session.
*
* @throws Will throw if end-to-end encryption is not on or if the user id provided is not in the session.
*/
getVerificationCode(userId: string): Promise<string>;
/**
* Called when a subscription of this voice connection to an audio player is removed.
*
@@ -1543,11 +1818,20 @@ declare class VoiceConnection extends EventEmitter {
*/
interface CreateVoiceConnectionOptions {
adapterCreator: DiscordGatewayAdapterCreator;
/**
* Whether to use the DAVE protocol for end-to-end encryption. Defaults to true.
*/
daveEncryption?: boolean | undefined;
/**
* If true, debug messages will be enabled for the voice connection and its
* related components. Defaults to false.
*/
debug?: boolean | undefined;
/**
* The amount of consecutive decryption failures needed to try to
* re-initialize the end-to-end encrypted session to recover. Defaults to 24.
*/
decryptionFailureTolerance?: number | undefined;
}
/**
* The options that can be given when joining a voice channel.
@@ -1641,4 +1925,4 @@ declare function demuxProbe(stream: Readable, probeSize?: number, validator?: ty
*/
declare const version: string;
export { AudioPlayer, type AudioPlayerBufferingState, AudioPlayerError, type AudioPlayerIdleState, type AudioPlayerPausedState, type AudioPlayerPlayingState, type AudioPlayerState, AudioPlayerStatus, AudioReceiveStream, type AudioReceiveStreamOptions, AudioResource, type CreateAudioPlayerOptions, type CreateAudioResourceOptions, type CreateVoiceConnectionOptions, type DiscordGatewayAdapterCreator, type DiscordGatewayAdapterImplementerMethods, type DiscordGatewayAdapterLibraryMethods, type EndBehavior, EndBehaviorType, type JoinConfig, type JoinVoiceChannelOptions, NoSubscriberBehavior, PlayerSubscription, type ProbeInfo, SSRCMap, SpeakingMap, StreamType, VoiceConnection, type VoiceConnectionConnectingState, type VoiceConnectionDestroyedState, VoiceConnectionDisconnectReason, type VoiceConnectionDisconnectedBaseState, type VoiceConnectionDisconnectedOtherState, type VoiceConnectionDisconnectedState, type VoiceConnectionDisconnectedWebSocketState, type VoiceConnectionReadyState, type VoiceConnectionSignallingState, type VoiceConnectionState, VoiceConnectionStatus, VoiceReceiver, type VoiceUserData, createAudioPlayer, createAudioResource, createDefaultAudioReceiveStreamOptions, demuxProbe, entersState, generateDependencyReport, getGroups, getVoiceConnection, getVoiceConnections, joinVoiceChannel, validateDiscordOpusHead, version };
export { AudioPlayer, type AudioPlayerBufferingState, AudioPlayerError, type AudioPlayerIdleState, type AudioPlayerPausedState, type AudioPlayerPlayingState, type AudioPlayerState, AudioPlayerStatus, AudioReceiveStream, type AudioReceiveStreamOptions, AudioResource, type ConnectionData, type ConnectionOptions, type CreateAudioPlayerOptions, type CreateAudioResourceOptions, type CreateVoiceConnectionOptions, DAVESession, type DiscordGatewayAdapterCreator, type DiscordGatewayAdapterImplementerMethods, type DiscordGatewayAdapterLibraryMethods, type Edge, type EndBehavior, EndBehaviorType, type JoinConfig, type JoinVoiceChannelOptions, Networking, type NetworkingClosedState, type NetworkingIdentifyingState, type NetworkingOpeningWsState, type NetworkingReadyState, type NetworkingResumingState, type NetworkingSelectingProtocolState, type NetworkingState, NetworkingStatusCode, type NetworkingUdpHandshakingState, NoSubscriberBehavior, Node, PlayerSubscription, type ProbeInfo, SSRCMap, type SocketConfig, SpeakingMap, StreamType, TransformerType, VoiceConnection, type VoiceConnectionConnectingState, type VoiceConnectionDestroyedState, VoiceConnectionDisconnectReason, type VoiceConnectionDisconnectedBaseState, type VoiceConnectionDisconnectedOtherState, type VoiceConnectionDisconnectedState, type VoiceConnectionDisconnectedWebSocketState, type VoiceConnectionReadyState, type VoiceConnectionSignallingState, type VoiceConnectionState, VoiceConnectionStatus, VoiceReceiver, VoiceUDPSocket, type VoiceUserData, VoiceWebSocket, createAudioPlayer, createAudioResource, createDefaultAudioReceiveStreamOptions, demuxProbe, entersState, generateDependencyReport, getGroups, getVoiceConnection, getVoiceConnections, joinVoiceChannel, validateDiscordOpusHead, version };

View File

@@ -2,6 +2,7 @@ import { Buffer } from 'node:buffer';
import { EventEmitter } from 'node:events';
import { Readable, ReadableOptions } from 'node:stream';
import prism from 'prism-media';
import { VoiceDavePrepareTransitionData, VoiceDavePrepareEpochData, VoiceOpcodes, VoiceSendPayload, VoiceReceivePayload } from 'discord-api-types/voice/v8';
import WebSocket, { MessageEvent } from 'ws';
import { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from 'discord-api-types/v10';
@@ -442,11 +443,11 @@ declare class AudioPlayer extends EventEmitter {
private unsubscribe;
/**
* The state that the player is in.
*
* @remarks
* The setter will perform clean-up operations where necessary.
*/
get state(): AudioPlayerState;
/**
* Sets a new state for the player, performing clean-up operations where necessary.
*/
set state(newState: AudioPlayerState);
/**
* Plays a new resource on the player. If the player is already playing a resource, the existing resource is destroyed
@@ -556,6 +557,174 @@ declare function getVoiceConnections(group: string): Map<string, VoiceConnection
*/
declare function getVoiceConnection(guildId: string, group?: string): VoiceConnection | undefined;
interface SessionMethods {
canPassthrough(userId: string): boolean;
decrypt(userId: string, mediaType: 0 | 1, packet: Buffer): Buffer;
encryptOpus(packet: Buffer): Buffer;
getSerializedKeyPackage(): Buffer;
getVerificationCode(userId: string): Promise<string>;
processCommit(commit: Buffer): void;
processProposals(optype: 0 | 1, proposals: Buffer, recognizedUserIds?: string[]): ProposalsResult;
processWelcome(welcome: Buffer): void;
ready: boolean;
reinit(protocolVersion: number, userId: string, channelId: string): void;
reset(): void;
setExternalSender(externalSender: Buffer): void;
setPassthroughMode(passthrough: boolean, expiry: number): void;
voicePrivacyCode: string;
}
interface ProposalsResult {
commit?: Buffer;
welcome?: Buffer;
}
interface TransitionResult {
success: boolean;
transitionId: number;
}
/**
* Options that dictate the session behavior.
*/
interface DAVESessionOptions {
decryptionFailureTolerance?: number | undefined;
}
interface DAVESession extends EventEmitter {
on(event: 'error', listener: (error: Error) => void): this;
on(event: 'debug', listener: (message: string) => void): this;
on(event: 'keyPackage', listener: (message: Buffer) => void): this;
on(event: 'invalidateTransition', listener: (transitionId: number) => void): this;
}
/**
* Manages the DAVE protocol group session.
*/
declare class DAVESession extends EventEmitter {
/**
* The channel id represented by this session.
*/
channelId: string;
/**
* The user id represented by this session.
*/
userId: string;
/**
* The protocol version being used.
*/
protocolVersion: number;
/**
* The last transition id executed.
*/
lastTransitionId?: number | undefined;
/**
* The pending transition.
*/
private pendingTransition?;
/**
* Whether this session was downgraded previously.
*/
private downgraded;
/**
* The amount of consecutive failures encountered when decrypting.
*/
private consecutiveFailures;
/**
* The amount of consecutive failures needed to attempt to recover.
*/
private readonly failureTolerance;
/**
* Whether this session is currently re-initializing due to an invalid transition.
*/
reinitializing: boolean;
/**
* The underlying DAVE Session of this wrapper.
*/
session: SessionMethods | undefined;
constructor(protocolVersion: number, userId: string, channelId: string, options: DAVESessionOptions);
/**
* The current voice privacy code of the session. Will be `null` if there is no session.
*/
get voicePrivacyCode(): string | null;
/**
* Gets the verification code for a user in the session.
*
* @throws Will throw if there is not an active session or the user id provided is invalid or not in the session.
*/
getVerificationCode(userId: string): Promise<string>;
/**
* Re-initializes (or initializes) the underlying session.
*/
reinit(): void;
/**
* Set the external sender for this session.
*
* @param externalSender - The external sender
*/
setExternalSender(externalSender: Buffer): void;
/**
* Prepare for a transition.
*
* @param data - The transition data
* @returns Whether we should signal to the voice server that we are ready
*/
prepareTransition(data: VoiceDavePrepareTransitionData): boolean;
/**
* Execute a transition.
*
* @param transitionId - The transition id to execute on
*/
executeTransition(transitionId: number): boolean | undefined;
/**
* Prepare for a new epoch.
*
* @param data - The epoch data
*/
prepareEpoch(data: VoiceDavePrepareEpochData): void;
/**
* Recover from an invalid transition by re-initializing.
*
* @param transitionId - The transition id to invalidate
*/
recoverFromInvalidTransition(transitionId: number): void;
/**
* Processes proposals from the MLS group.
*
* @param payload - The binary message payload
* @param connectedClients - The set of connected client IDs
* @returns The payload to send back to the voice server, if there is one
*/
processProposals(payload: Buffer, connectedClients: Set<string>): Buffer | undefined;
/**
* Processes a commit from the MLS group.
*
* @param payload - The payload
* @returns The transaction id and whether it was successful
*/
processCommit(payload: Buffer): TransitionResult;
/**
* Processes a welcome from the MLS group.
*
* @param payload - The payload
* @returns The transaction id and whether it was successful
*/
processWelcome(payload: Buffer): TransitionResult;
/**
* Encrypt a packet using end-to-end encryption.
*
* @param packet - The packet to encrypt
*/
encrypt(packet: Buffer): Buffer;
/**
* Decrypt a packet using end-to-end encryption.
*
* @param packet - The packet to decrypt
* @param userId - The user id that sent the packet
* @returns The decrypted packet, or `null` if the decryption failed but should be ignored
*/
decrypt(packet: Buffer, userId: string): Buffer | null;
/**
* Resets the session.
*/
destroy(): void;
}
/**
* Stores an IP address and port. Used to store socket details for the local client as well as
* for Discord.
@@ -634,6 +803,14 @@ declare class VoiceUDPSocket extends EventEmitter {
performIPDiscovery(ssrc: number): Promise<SocketConfig>;
}
/**
* A binary WebSocket message.
*/
interface BinaryWebSocketMessage {
op: VoiceOpcodes;
payload: Buffer;
seq: number;
}
interface VoiceWebSocket extends EventEmitter {
on(event: 'error', listener: (error: Error) => void): this;
on(event: 'open', listener: (event: WebSocket.Event) => void): this;
@@ -650,6 +827,12 @@ interface VoiceWebSocket extends EventEmitter {
* @eventProperty
*/
on(event: 'packet', listener: (packet: any) => void): this;
/**
* Binary message event.
*
* @eventProperty
*/
on(event: 'binary', listener: (message: BinaryWebSocketMessage) => void): this;
}
/**
* An extension of the WebSocket class to provide helper functionality when interacting
@@ -678,6 +861,10 @@ declare class VoiceWebSocket extends EventEmitter {
* The last recorded ping.
*/
ping?: number;
/**
* The last sequence number acknowledged from Discord. Will be `-1` if no sequence numbered messages have been received.
*/
sequence: number;
/**
* The debug logger function, if debugging is enabled.
*/
@@ -698,7 +885,7 @@ declare class VoiceWebSocket extends EventEmitter {
destroy(): void;
/**
* Handles message events on the WebSocket. Attempts to JSON parse the messages and emit them
* as packets.
* as packets. Binary messages will be parsed and emitted.
*
* @param event - The message event
*/
@@ -708,7 +895,14 @@ declare class VoiceWebSocket extends EventEmitter {
*
* @param packet - The packet to send
*/
sendPacket(packet: any): void;
sendPacket(packet: VoiceSendPayload): void;
/**
* Sends a binary message over the WebSocket.
*
* @param opcode - The opcode to use
* @param payload - The payload to send
*/
sendBinaryMessage(opcode: VoiceOpcodes, payload: Buffer): void;
/**
* Sends a heartbeat over the WebSocket.
*/
@@ -758,7 +952,7 @@ interface NetworkingIdentifyingState {
*/
interface NetworkingUdpHandshakingState {
code: NetworkingStatusCode.UdpHandshaking;
connectionData: Pick<ConnectionData, 'ssrc'>;
connectionData: Pick<ConnectionData, 'connectedClients' | 'ssrc'>;
connectionOptions: ConnectionOptions;
udp: VoiceUDPSocket;
ws: VoiceWebSocket;
@@ -768,7 +962,7 @@ interface NetworkingUdpHandshakingState {
*/
interface NetworkingSelectingProtocolState {
code: NetworkingStatusCode.SelectingProtocol;
connectionData: Pick<ConnectionData, 'ssrc'>;
connectionData: Pick<ConnectionData, 'connectedClients' | 'ssrc'>;
connectionOptions: ConnectionOptions;
udp: VoiceUDPSocket;
ws: VoiceWebSocket;
@@ -781,6 +975,7 @@ interface NetworkingReadyState {
code: NetworkingStatusCode.Ready;
connectionData: ConnectionData;
connectionOptions: ConnectionOptions;
dave?: DAVESession | undefined;
preparedPacket?: Buffer | undefined;
udp: VoiceUDPSocket;
ws: VoiceWebSocket;
@@ -793,6 +988,7 @@ interface NetworkingResumingState {
code: NetworkingStatusCode.Resuming;
connectionData: ConnectionData;
connectionOptions: ConnectionOptions;
dave?: DAVESession | undefined;
preparedPacket?: Buffer | undefined;
udp: VoiceUDPSocket;
ws: VoiceWebSocket;
@@ -814,6 +1010,7 @@ type NetworkingState = NetworkingClosedState | NetworkingIdentifyingState | Netw
* and VOICE_STATE_UPDATE packets.
*/
interface ConnectionOptions {
channelId: string;
endpoint: string;
serverId: string;
sessionId: string;
@@ -825,6 +1022,7 @@ interface ConnectionOptions {
* the connection, timing information for playback of streams.
*/
interface ConnectionData {
connectedClients: Set<string>;
encryptionMode: string;
nonce: number;
nonceBuffer: Buffer;
@@ -835,6 +1033,14 @@ interface ConnectionData {
ssrc: number;
timestamp: number;
}
/**
* Options for networking that dictate behavior.
*/
interface NetworkingOptions {
daveEncryption?: boolean | undefined;
debug?: boolean | undefined;
decryptionFailureTolerance?: number | undefined;
}
interface Networking extends EventEmitter {
/**
* Debug event for Networking.
@@ -845,6 +1051,7 @@ interface Networking extends EventEmitter {
on(event: 'error', listener: (error: Error) => void): this;
on(event: 'stateChange', listener: (oldState: NetworkingState, newState: NetworkingState) => void): this;
on(event: 'close', listener: (code: number) => void): this;
on(event: 'transitioned', listener: (transitionId: number) => void): this;
}
/**
* Manages the networking required to maintain a voice connection and dispatch audio packets
@@ -855,30 +1062,41 @@ declare class Networking extends EventEmitter {
* The debug logger function, if debugging is enabled.
*/
private readonly debug;
/**
* The options used to create this Networking instance.
*/
private readonly options;
/**
* Creates a new Networking instance.
*/
constructor(options: ConnectionOptions, debug: boolean);
constructor(connectionOptions: ConnectionOptions, options: NetworkingOptions);
/**
* Destroys the Networking instance, transitioning it into the Closed state.
*/
destroy(): void;
/**
* The current state of the networking instance.
*
* @remarks
* The setter will perform clean-up operations where necessary.
*/
get state(): NetworkingState;
/**
* Sets a new state for the networking instance, performing clean-up operations where necessary.
*/
set state(newState: NetworkingState);
/**
* Creates a new WebSocket to a Discord Voice gateway.
*
* @param endpoint - The endpoint to connect to
* @param lastSequence - The last sequence to set for this WebSocket
*/
private createWebSocket;
/**
* Propagates errors from the children VoiceWebSocket and VoiceUDPSocket.
* Creates a new DAVE session for this voice connection if we can create one.
*
* @param protocolVersion - The protocol version to use
*/
private createDaveSession;
/**
* Propagates errors from the children VoiceWebSocket, VoiceUDPSocket and DAVESession.
*
* @param error - The error that was emitted by a child
*/
@@ -906,6 +1124,24 @@ declare class Networking extends EventEmitter {
* @param packet - The received packet
*/
private onWsPacket;
/**
* Called when a binary message is received on the connection's WebSocket.
*
* @param message - The received message
*/
private onWsBinary;
/**
* Called when a new key package is ready to be sent to the voice server.
*
* @param keyPackage - The new key package
*/
private onDaveKeyPackage;
/**
* Called when the DAVE session wants to invalidate their transition and re-initialize.
*
* @param transitionId - The transition to invalidate
*/
private onDaveInvalidateTransition;
/**
* Propagates debug messages from the child WebSocket.
*
@@ -918,6 +1154,12 @@ declare class Networking extends EventEmitter {
* @param message - The emitted debug message
*/
private onUdpDebug;
/**
* Propagates debug messages from the child DAVESession.
*
* @param message - The emitted debug message
*/
private onDaveDebug;
/**
* Prepares an Opus packet for playback. This includes attaching metadata to it and encrypting it.
* It will be stored within the instance, and can be played by dispatchAudio()
@@ -953,6 +1195,7 @@ declare class Networking extends EventEmitter {
*
* @param opusPacket - The Opus packet to prepare
* @param connectionData - The current connection data of the instance
* @param daveSession - The DAVE session to use for encryption
*/
private createAudioPacket;
/**
@@ -960,6 +1203,7 @@ declare class Networking extends EventEmitter {
*
* @param opusPacket - The Opus packet to encrypt
* @param connectionData - The current connection data of the instance
* @param daveSession - The DAVE session to use for encryption
*/
private encryptOpusPacket;
}
@@ -1001,7 +1245,7 @@ declare class AudioReceiveStream extends Readable {
*/
readonly end: EndBehavior;
private endTimeout?;
constructor({ end, ...options }: AudioReceiveStreamOptions);
constructor(options: AudioReceiveStreamOptions);
push(buffer: Buffer | null): boolean;
private renewEndTimeout;
_read(): void;
@@ -1128,7 +1372,7 @@ declare class VoiceReceiver {
* @param packet - The received packet
* @internal
*/
onWsPacket(packet: any): void;
onWsPacket(packet: VoiceReceivePayload): void;
private decrypt;
/**
* Parses an audio packet, decrypting it to yield an Opus packet.
@@ -1137,6 +1381,7 @@ declare class VoiceReceiver {
* @param mode - The encryption mode
* @param nonce - The nonce buffer used by the connection for encryption
* @param secretKey - The secret key used by the connection for encryption
* @param userId - The user id that sent the packet
* @returns The parsed Opus packet
*/
private parsePacket;
@@ -1341,6 +1586,12 @@ interface VoiceConnection extends EventEmitter {
* @eventProperty
*/
on(event: 'stateChange', listener: (oldState: VoiceConnectionState, newState: VoiceConnectionState) => void): this;
/**
* Emitted when the end-to-end encrypted session has transitioned
*
* @eventProperty
*/
on(event: 'transitioned', listener: (transitionId: number) => void): this;
/**
* Emitted when the state of the voice connection changes to a specific status
*
@@ -1383,6 +1634,10 @@ declare class VoiceConnection extends EventEmitter {
* The debug logger function, if debugging is enabled.
*/
private readonly debug;
/**
* The options used to create this voice connection.
*/
private readonly options;
/**
* Creates a new voice connection.
*
@@ -1392,11 +1647,11 @@ declare class VoiceConnection extends EventEmitter {
constructor(joinConfig: JoinConfig, options: CreateVoiceConnectionOptions);
/**
* The current state of the voice connection.
*
* @remarks
* The setter will perform clean-up operations where necessary.
*/
get state(): VoiceConnectionState;
/**
* Updates the state of the voice connection, performing clean-up operations where necessary.
*/
set state(newState: VoiceConnectionState);
/**
* Registers a `VOICE_SERVER_UPDATE` packet to the voice connection. This will cause it to reconnect using the
@@ -1463,6 +1718,12 @@ declare class VoiceConnection extends EventEmitter {
* @param message - The debug message to propagate
*/
private onNetworkingDebug;
/**
* Propagates transitions from the underlying network instance.
*
* @param transitionId - The transition id
*/
private onNetworkingTransitioned;
/**
* Prepares an audio packet for dispatch.
*
@@ -1530,6 +1791,20 @@ declare class VoiceConnection extends EventEmitter {
ws: number | undefined;
udp: number | undefined;
};
/**
* The current voice privacy code of the encrypted session.
*
* @remarks
* For this data to be available, the VoiceConnection must be in the Ready state,
* and the connection would have to be end-to-end encrypted.
*/
get voicePrivacyCode(): string | undefined;
/**
* Gets the verification code for a user in the session.
*
* @throws Will throw if end-to-end encryption is not on or if the user id provided is not in the session.
*/
getVerificationCode(userId: string): Promise<string>;
/**
* Called when a subscription of this voice connection to an audio player is removed.
*
@@ -1543,11 +1818,20 @@ declare class VoiceConnection extends EventEmitter {
*/
interface CreateVoiceConnectionOptions {
adapterCreator: DiscordGatewayAdapterCreator;
/**
* Whether to use the DAVE protocol for end-to-end encryption. Defaults to true.
*/
daveEncryption?: boolean | undefined;
/**
* If true, debug messages will be enabled for the voice connection and its
* related components. Defaults to false.
*/
debug?: boolean | undefined;
/**
* The amount of consecutive decryption failures needed to try to
* re-initialize the end-to-end encrypted session to recover. Defaults to 24.
*/
decryptionFailureTolerance?: number | undefined;
}
/**
* The options that can be given when joining a voice channel.
@@ -1641,4 +1925,4 @@ declare function demuxProbe(stream: Readable, probeSize?: number, validator?: ty
*/
declare const version: string;
export { AudioPlayer, type AudioPlayerBufferingState, AudioPlayerError, type AudioPlayerIdleState, type AudioPlayerPausedState, type AudioPlayerPlayingState, type AudioPlayerState, AudioPlayerStatus, AudioReceiveStream, type AudioReceiveStreamOptions, AudioResource, type CreateAudioPlayerOptions, type CreateAudioResourceOptions, type CreateVoiceConnectionOptions, type DiscordGatewayAdapterCreator, type DiscordGatewayAdapterImplementerMethods, type DiscordGatewayAdapterLibraryMethods, type EndBehavior, EndBehaviorType, type JoinConfig, type JoinVoiceChannelOptions, NoSubscriberBehavior, PlayerSubscription, type ProbeInfo, SSRCMap, SpeakingMap, StreamType, VoiceConnection, type VoiceConnectionConnectingState, type VoiceConnectionDestroyedState, VoiceConnectionDisconnectReason, type VoiceConnectionDisconnectedBaseState, type VoiceConnectionDisconnectedOtherState, type VoiceConnectionDisconnectedState, type VoiceConnectionDisconnectedWebSocketState, type VoiceConnectionReadyState, type VoiceConnectionSignallingState, type VoiceConnectionState, VoiceConnectionStatus, VoiceReceiver, type VoiceUserData, createAudioPlayer, createAudioResource, createDefaultAudioReceiveStreamOptions, demuxProbe, entersState, generateDependencyReport, getGroups, getVoiceConnection, getVoiceConnections, joinVoiceChannel, validateDiscordOpusHead, version };
export { AudioPlayer, type AudioPlayerBufferingState, AudioPlayerError, type AudioPlayerIdleState, type AudioPlayerPausedState, type AudioPlayerPlayingState, type AudioPlayerState, AudioPlayerStatus, AudioReceiveStream, type AudioReceiveStreamOptions, AudioResource, type ConnectionData, type ConnectionOptions, type CreateAudioPlayerOptions, type CreateAudioResourceOptions, type CreateVoiceConnectionOptions, DAVESession, type DiscordGatewayAdapterCreator, type DiscordGatewayAdapterImplementerMethods, type DiscordGatewayAdapterLibraryMethods, type Edge, type EndBehavior, EndBehaviorType, type JoinConfig, type JoinVoiceChannelOptions, Networking, type NetworkingClosedState, type NetworkingIdentifyingState, type NetworkingOpeningWsState, type NetworkingReadyState, type NetworkingResumingState, type NetworkingSelectingProtocolState, type NetworkingState, NetworkingStatusCode, type NetworkingUdpHandshakingState, NoSubscriberBehavior, Node, PlayerSubscription, type ProbeInfo, SSRCMap, type SocketConfig, SpeakingMap, StreamType, TransformerType, VoiceConnection, type VoiceConnectionConnectingState, type VoiceConnectionDestroyedState, VoiceConnectionDisconnectReason, type VoiceConnectionDisconnectedBaseState, type VoiceConnectionDisconnectedOtherState, type VoiceConnectionDisconnectedState, type VoiceConnectionDisconnectedWebSocketState, type VoiceConnectionReadyState, type VoiceConnectionSignallingState, type VoiceConnectionState, VoiceConnectionStatus, VoiceReceiver, VoiceUDPSocket, type VoiceUserData, VoiceWebSocket, createAudioPlayer, createAudioResource, createDefaultAudioReceiveStreamOptions, demuxProbe, entersState, generateDependencyReport, getGroups, getVoiceConnection, getVoiceConnections, joinVoiceChannel, validateDiscordOpusHead, version };

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -77,25 +77,22 @@ import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v10?dts';
The exports of each API version is split into three main parts:
- Everything exported with the `API` prefix represents a payload you may get from the REST API _or_ the Gateway.
- Everything exported with the `API` prefix represents a payload you may get from the REST API _or_ the Gateway.
- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway.
- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway.
- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
- Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2`
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
- If a type ends with `Result`, then it represents the expected result by calling its accompanying route.
- Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors.
- Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2`
- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).
- If a type ends with `Result`, then it represents the expected result by calling its accompanying route.
- Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors.
- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).
- There may be types exported that are identical for all versions. These will be exported as is and can be found in the `globals` file. They will still be prefixed accordingly as described above.
- There may be types exported that are identical for all versions. These will be exported as is and can be found in the `globals` file. They will still be prefixed accordingly as described above.
**A note about how types are documented**: This package will add types only for known and documented properties that are present in Discord's [API Documentation repository](https://github.com/discord/discord-api-docs),
that are mentioned in an open pull request, or known through other means _and have received the green light to be used_.

View File

@@ -1,5 +1,5 @@
/**
* https://discord.com/developers/docs/topics/gateway#connecting-gateway-url-query-string-params
* @see {@link https://discord.com/developers/docs/topics/gateway#connecting-gateway-url-query-string-params}
*/
export interface GatewayURLQuery {
v: string;

View File

@@ -6,3 +6,4 @@ export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
export const GatewayIntentBits = mod.GatewayIntentBits;
export const GatewayOpcodes = mod.GatewayOpcodes;
export const GatewayVersion = mod.GatewayVersion;
export const VoiceChannelEffectSendAnimationType = mod.VoiceChannelEffectSendAnimationType;

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -2,26 +2,11 @@
/**
* Types extracted from https://discord.com/developers/docs/topics/gateway
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0;
__exportStar(require("./common"), exports);
exports.VoiceChannelEffectSendAnimationType = exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0;
exports.GatewayVersion = '10';
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
* @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes}
*/
var GatewayOpcodes;
(function (GatewayOpcodes) {
@@ -70,9 +55,13 @@ var GatewayOpcodes;
* Sent in response to receiving a heartbeat to acknowledge that it has been received
*/
GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck";
/**
* Request information about soundboard sounds in a set of guilds
*/
GatewayOpcodes[GatewayOpcodes["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds";
})(GatewayOpcodes || (exports.GatewayOpcodes = GatewayOpcodes = {}));
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
* @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes}
*/
var GatewayCloseCodes;
(function (GatewayCloseCodes) {
@@ -83,25 +72,25 @@ var GatewayCloseCodes;
/**
* You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
*
* See https://discord.com/developers/docs/topics/gateway-events#payload-structure
* @see {@link https://discord.com/developers/docs/topics/gateway-events#payload-structure}
*/
GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode";
/**
* You sent an invalid payload to us. Don't do that!
*
* See https://discord.com/developers/docs/topics/gateway#sending-events
* @see {@link https://discord.com/developers/docs/topics/gateway#sending-events}
*/
GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError";
/**
* You sent us a payload prior to identifying
*
* See https://discord.com/developers/docs/topics/gateway-events#identify
* @see {@link https://discord.com/developers/docs/topics/gateway-events#identify}
*/
GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
/**
* The account token sent with your identify payload is incorrect
*
* See https://discord.com/developers/docs/topics/gateway-events#identify
* @see {@link https://discord.com/developers/docs/topics/gateway-events#identify}
*/
GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
/**
@@ -111,7 +100,7 @@ var GatewayCloseCodes;
/**
* The sequence sent when resuming the session was invalid. Reconnect and start a new session
*
* See https://discord.com/developers/docs/topics/gateway-events#resume
* @see {@link https://discord.com/developers/docs/topics/gateway-events#resume}
*/
GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq";
/**
@@ -125,13 +114,13 @@ var GatewayCloseCodes;
/**
* You sent us an invalid shard when identifying
*
* See https://discord.com/developers/docs/topics/gateway#sharding
* @see {@link https://discord.com/developers/docs/topics/gateway#sharding}
*/
GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard";
/**
* The session would have handled too many guilds - you are required to shard your connection in order to connect
*
* See https://discord.com/developers/docs/topics/gateway#sharding
* @see {@link https://discord.com/developers/docs/topics/gateway#sharding}
*/
GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired";
/**
@@ -141,21 +130,20 @@ var GatewayCloseCodes;
/**
* You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value
*
* See https://discord.com/developers/docs/topics/gateway#gateway-intents
* @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents}
*/
GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents";
/**
* You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not
* enabled or are not whitelisted for
*
* See https://discord.com/developers/docs/topics/gateway#gateway-intents
*
* See https://discord.com/developers/docs/topics/gateway#privileged-intents
* @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents}
* @see {@link https://discord.com/developers/docs/topics/gateway#privileged-intents}
*/
GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents";
})(GatewayCloseCodes || (exports.GatewayCloseCodes = GatewayCloseCodes = {}));
/**
* https://discord.com/developers/docs/topics/gateway#list-of-intents
* @see {@link https://discord.com/developers/docs/topics/gateway#list-of-intents}
*/
var GatewayIntentBits;
(function (GatewayIntentBits) {
@@ -163,9 +151,13 @@ var GatewayIntentBits;
GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers";
GatewayIntentBits[GatewayIntentBits["GuildModeration"] = 4] = "GuildModeration";
/**
* @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration}
* @deprecated This is the old name for {@link GatewayIntentBits.GuildModeration}
*/
GatewayIntentBits[GatewayIntentBits["GuildBans"] = 4] = "GuildBans";
GatewayIntentBits[GatewayIntentBits["GuildExpressions"] = 8] = "GuildExpressions";
/**
* @deprecated This is the old name for {@link GatewayIntentBits.GuildExpressions}
*/
GatewayIntentBits[GatewayIntentBits["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers";
GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations";
GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks";
@@ -186,15 +178,23 @@ var GatewayIntentBits;
GatewayIntentBits[GatewayIntentBits["DirectMessagePolls"] = 33554432] = "DirectMessagePolls";
})(GatewayIntentBits || (exports.GatewayIntentBits = GatewayIntentBits = {}));
/**
* https://discord.com/developers/docs/topics/gateway-events#receive-events
* @see {@link https://discord.com/developers/docs/topics/gateway-events#receive-events}
*/
var GatewayDispatchEvents;
(function (GatewayDispatchEvents) {
GatewayDispatchEvents["ApplicationCommandPermissionsUpdate"] = "APPLICATION_COMMAND_PERMISSIONS_UPDATE";
GatewayDispatchEvents["AutoModerationActionExecution"] = "AUTO_MODERATION_ACTION_EXECUTION";
GatewayDispatchEvents["AutoModerationRuleCreate"] = "AUTO_MODERATION_RULE_CREATE";
GatewayDispatchEvents["AutoModerationRuleDelete"] = "AUTO_MODERATION_RULE_DELETE";
GatewayDispatchEvents["AutoModerationRuleUpdate"] = "AUTO_MODERATION_RULE_UPDATE";
GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE";
GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE";
GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
GatewayDispatchEvents["EntitlementCreate"] = "ENTITLEMENT_CREATE";
GatewayDispatchEvents["EntitlementDelete"] = "ENTITLEMENT_DELETE";
GatewayDispatchEvents["EntitlementUpdate"] = "ENTITLEMENT_UPDATE";
GatewayDispatchEvents["GuildAuditLogEntryCreate"] = "GUILD_AUDIT_LOG_ENTRY_CREATE";
GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD";
GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE";
GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE";
@@ -208,6 +208,16 @@ var GatewayDispatchEvents;
GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE";
GatewayDispatchEvents["GuildScheduledEventCreate"] = "GUILD_SCHEDULED_EVENT_CREATE";
GatewayDispatchEvents["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE";
GatewayDispatchEvents["GuildScheduledEventUpdate"] = "GUILD_SCHEDULED_EVENT_UPDATE";
GatewayDispatchEvents["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD";
GatewayDispatchEvents["GuildScheduledEventUserRemove"] = "GUILD_SCHEDULED_EVENT_USER_REMOVE";
GatewayDispatchEvents["GuildSoundboardSoundCreate"] = "GUILD_SOUNDBOARD_SOUND_CREATE";
GatewayDispatchEvents["GuildSoundboardSoundDelete"] = "GUILD_SOUNDBOARD_SOUND_DELETE";
GatewayDispatchEvents["GuildSoundboardSoundsUpdate"] = "GUILD_SOUNDBOARD_SOUNDS_UPDATE";
GatewayDispatchEvents["GuildSoundboardSoundUpdate"] = "GUILD_SOUNDBOARD_SOUND_UPDATE";
GatewayDispatchEvents["SoundboardSounds"] = "SOUNDBOARD_SOUNDS";
GatewayDispatchEvents["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE";
GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE";
GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE";
@@ -219,17 +229,23 @@ var GatewayDispatchEvents;
GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE";
GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE";
GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
GatewayDispatchEvents["MessagePollVoteAdd"] = "MESSAGE_POLL_VOTE_ADD";
GatewayDispatchEvents["MessagePollVoteRemove"] = "MESSAGE_POLL_VOTE_REMOVE";
GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE";
GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE";
GatewayDispatchEvents["RateLimited"] = "RATE_LIMITED";
GatewayDispatchEvents["Ready"] = "READY";
GatewayDispatchEvents["Resumed"] = "RESUMED";
GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE";
GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE";
GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE";
GatewayDispatchEvents["Ready"] = "READY";
GatewayDispatchEvents["Resumed"] = "RESUMED";
GatewayDispatchEvents["SubscriptionCreate"] = "SUBSCRIPTION_CREATE";
GatewayDispatchEvents["SubscriptionDelete"] = "SUBSCRIPTION_DELETE";
GatewayDispatchEvents["SubscriptionUpdate"] = "SUBSCRIPTION_UPDATE";
GatewayDispatchEvents["ThreadCreate"] = "THREAD_CREATE";
GatewayDispatchEvents["ThreadDelete"] = "THREAD_DELETE";
GatewayDispatchEvents["ThreadListSync"] = "THREAD_LIST_SYNC";
@@ -238,24 +254,24 @@ var GatewayDispatchEvents;
GatewayDispatchEvents["ThreadUpdate"] = "THREAD_UPDATE";
GatewayDispatchEvents["TypingStart"] = "TYPING_START";
GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE";
GatewayDispatchEvents["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND";
GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
GatewayDispatchEvents["MessagePollVoteAdd"] = "MESSAGE_POLL_VOTE_ADD";
GatewayDispatchEvents["MessagePollVoteRemove"] = "MESSAGE_POLL_VOTE_REMOVE";
GatewayDispatchEvents["GuildScheduledEventCreate"] = "GUILD_SCHEDULED_EVENT_CREATE";
GatewayDispatchEvents["GuildScheduledEventUpdate"] = "GUILD_SCHEDULED_EVENT_UPDATE";
GatewayDispatchEvents["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE";
GatewayDispatchEvents["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD";
GatewayDispatchEvents["GuildScheduledEventUserRemove"] = "GUILD_SCHEDULED_EVENT_USER_REMOVE";
GatewayDispatchEvents["AutoModerationRuleCreate"] = "AUTO_MODERATION_RULE_CREATE";
GatewayDispatchEvents["AutoModerationRuleUpdate"] = "AUTO_MODERATION_RULE_UPDATE";
GatewayDispatchEvents["AutoModerationRuleDelete"] = "AUTO_MODERATION_RULE_DELETE";
GatewayDispatchEvents["AutoModerationActionExecution"] = "AUTO_MODERATION_ACTION_EXECUTION";
GatewayDispatchEvents["GuildAuditLogEntryCreate"] = "GUILD_AUDIT_LOG_ENTRY_CREATE";
GatewayDispatchEvents["EntitlementCreate"] = "ENTITLEMENT_CREATE";
GatewayDispatchEvents["EntitlementUpdate"] = "ENTITLEMENT_UPDATE";
GatewayDispatchEvents["EntitlementDelete"] = "ENTITLEMENT_DELETE";
})(GatewayDispatchEvents || (exports.GatewayDispatchEvents = GatewayDispatchEvents = {}));
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send-animation-types}
*/
var VoiceChannelEffectSendAnimationType;
(function (VoiceChannelEffectSendAnimationType) {
/**
* A fun animation, sent by a Nitro subscriber
*/
VoiceChannelEffectSendAnimationType[VoiceChannelEffectSendAnimationType["Premium"] = 0] = "Premium";
/**
* The standard animation
*/
VoiceChannelEffectSendAnimationType[VoiceChannelEffectSendAnimationType["Basic"] = 1] = "Basic";
})(VoiceChannelEffectSendAnimationType || (exports.VoiceChannelEffectSendAnimationType = VoiceChannelEffectSendAnimationType = {}));
// #endregion Shared
//# sourceMappingURL=v10.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"v10.js","sourceRoot":"","sources":["v10.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;AAsCH,2CAAyB;AAEZ,QAAA,cAAc,GAAG,IAAI,CAAC;AAEnC;;GAEG;AACH,IAAY,cA8CX;AA9CD,WAAY,cAAc;IACzB;;OAEG;IACH,2DAAQ,CAAA;IACR;;;OAGG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,2EAAgB,CAAA;IAChB;;OAEG;IACH,uDAAU,CAAA;IACV;;OAEG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,iFAAmB,CAAA;IACnB;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,sDAAK,CAAA;IACL;;OAEG;IACH,oEAAY,CAAA;AACb,CAAC,EA9CW,cAAc,8BAAd,cAAc,QA8CzB;AAED;;GAEG;AACH,IAAY,iBA8EX;AA9ED,WAAY,iBAAiB;IAC5B;;OAEG;IACH,4EAAoB,CAAA;IAC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mDAAnC,mCAAmC,QAS9C;AAogBD,oBAAoB"}

View File

@@ -6,3 +6,4 @@ export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
export const GatewayIntentBits = mod.GatewayIntentBits;
export const GatewayOpcodes = mod.GatewayOpcodes;
export const GatewayVersion = mod.GatewayVersion;
export const VoiceChannelEffectSendAnimationType = mod.VoiceChannelEffectSendAnimationType;

View File

@@ -2,7 +2,7 @@
* Types extracted from https://discord.com/developers/docs/topics/gateway
*/
import type { APIChannel, APIEmoji, APIGuild, APIGuildMember, APIMessage, APIRole, APIUnavailableGuild, APIUser, GatewayActivity, GatewayPresenceUpdate as RawGatewayPresenceUpdate, GatewayVoiceState, InviteTargetUserType, PresenceUpdateStatus } from '../payloads/v6/index';
export * from './common';
export type * from './common';
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/

File diff suppressed because one or more lines are too long

View File

@@ -2,23 +2,8 @@
/**
* Types extracted from https://discord.com/developers/docs/topics/gateway
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.VoiceCloseCodes = exports.VoiceOPCodes = exports.GatewayCloseCodes = exports.GatewayOPCodes = exports.GatewayVersion = void 0;
__exportStar(require("./common"), exports);
/**
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
*/

View File

@@ -1 +1 @@
{"version":3,"file":"v6.js","s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nC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,oEAA2C,CAAA;IAC3C,0EAAiD,CAAA;IACjD,iFAAwD,CAAA;IACxD,qFAA4D,CAAA;IAC5D,2DAAkC,CAAA;IAClC,qDAA4B,CAAA;IAC5B,mDAA0B,CAAA;IAC1B,gEAAuC,CAAA;IACvC,kEAAyC,CAAA;IACzC,2DAAkC,CAAA;AACnC,CAAC,EArCW,qBAAqB,qCAArB,qBAAqB,QAqChC;AAirBD,oBAAoB"}

View File

@@ -3,8 +3,8 @@
*/
import type { Snowflake } from '../globals';
import type { APIApplication, APIChannel, APIEmoji, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildScheduledEvent, APIInteraction, APIMessage, APIRole, APIStageInstance, APISticker, APIUnavailableGuild, APIUser, GatewayActivity, GatewayPresenceUpdate as RawGatewayPresenceUpdate, GatewayVoiceState, InviteTargetType, PresenceUpdateStatus } from '../payloads/v8/index';
import type { Nullable } from '../utils/internals';
export * from './common';
import type { _Nullable } from '../utils/internals';
export type * from './common';
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
@@ -641,7 +641,7 @@ export type GatewayGuildMemberUpdateDispatch = DataPayload<GatewayDispatchEvents
*
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type GatewayGuildMemberUpdateDispatchData = Nullable<Pick<APIGuildMember, 'joined_at'>> & Omit<APIGuildMember, 'deaf' | 'joined_at' | 'mute' | 'user'> & Partial<Pick<APIGuildMember, 'deaf' | 'mute'>> & Required<Pick<APIGuildMember, 'user'>> & {
export type GatewayGuildMemberUpdateDispatchData = _Nullable<Pick<APIGuildMember, 'joined_at'>> & Omit<APIGuildMember, 'deaf' | 'joined_at' | 'mute' | 'user'> & Partial<Pick<APIGuildMember, 'deaf' | 'mute'>> & Required<Pick<APIGuildMember, 'user'>> & {
/**
* The id of the guild
*/

File diff suppressed because one or more lines are too long

View File

@@ -2,23 +2,8 @@
/**
* Types extracted from https://discord.com/developers/docs/topics/gateway
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0;
__exportStar(require("./common"), exports);
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/

View File

@@ -1 +1 @@
{"version":3,"file":"v8.js","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;AA0BH,2CAAyB;AAEzB;;GAEG;AACU,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;;;GAIG;AACH,IAAY,cA8CX;AA9CD,WAAY,cAAc;IACzB;;OAEG;IACH,2DAAQ,CAAA;IACR;;;OAGG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,2EAAgB,CAAA;IAChB;;OAEG;IACH,uDAAU,CAAA;IACV;;OAEG;IACH,6DAAS,CAAA;IACT;;OAE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,CAAA;IAC1D,sFAA6D,CAAA;IAC7D,4FAAmE,CAAA;AACpE,CAAC,EAlDW,qBAAqB,qCAArB,qBAAqB,QAkDhC;AAgoDD,oBAAoB"}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -2,26 +2,11 @@
/**
* Types extracted from https://discord.com/developers/docs/topics/gateway
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0;
__exportStar(require("./common"), exports);
exports.VoiceChannelEffectSendAnimationType = exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0;
exports.GatewayVersion = '9';
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
* @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes}
*/
var GatewayOpcodes;
(function (GatewayOpcodes) {
@@ -70,9 +55,13 @@ var GatewayOpcodes;
* Sent in response to receiving a heartbeat to acknowledge that it has been received
*/
GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck";
/**
* Request information about soundboard sounds in a set of guilds
*/
GatewayOpcodes[GatewayOpcodes["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds";
})(GatewayOpcodes || (exports.GatewayOpcodes = GatewayOpcodes = {}));
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
* @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes}
*/
var GatewayCloseCodes;
(function (GatewayCloseCodes) {
@@ -83,25 +72,25 @@ var GatewayCloseCodes;
/**
* You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that!
*
* See https://discord.com/developers/docs/topics/gateway-events#payload-structure
* @see {@link https://discord.com/developers/docs/topics/gateway-events#payload-structure}
*/
GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode";
/**
* You sent an invalid payload to us. Don't do that!
*
* See https://discord.com/developers/docs/topics/gateway#sending-events
* @see {@link https://discord.com/developers/docs/topics/gateway#sending-events}
*/
GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError";
/**
* You sent us a payload prior to identifying
*
* See https://discord.com/developers/docs/topics/gateway-events#identify
* @see {@link https://discord.com/developers/docs/topics/gateway-events#identify}
*/
GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
/**
* The account token sent with your identify payload is incorrect
*
* See https://discord.com/developers/docs/topics/gateway-events#identify
* @see {@link https://discord.com/developers/docs/topics/gateway-events#identify}
*/
GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed";
/**
@@ -111,7 +100,7 @@ var GatewayCloseCodes;
/**
* The sequence sent when resuming the session was invalid. Reconnect and start a new session
*
* See https://discord.com/developers/docs/topics/gateway-events#resume
* @see {@link https://discord.com/developers/docs/topics/gateway-events#resume}
*/
GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq";
/**
@@ -125,13 +114,13 @@ var GatewayCloseCodes;
/**
* You sent us an invalid shard when identifying
*
* See https://discord.com/developers/docs/topics/gateway#sharding
* @see {@link https://discord.com/developers/docs/topics/gateway#sharding}
*/
GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard";
/**
* The session would have handled too many guilds - you are required to shard your connection in order to connect
*
* See https://discord.com/developers/docs/topics/gateway#sharding
* @see {@link https://discord.com/developers/docs/topics/gateway#sharding}
*/
GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired";
/**
@@ -141,21 +130,20 @@ var GatewayCloseCodes;
/**
* You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value
*
* See https://discord.com/developers/docs/topics/gateway#gateway-intents
* @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents}
*/
GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents";
/**
* You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not
* enabled or are not whitelisted for
*
* See https://discord.com/developers/docs/topics/gateway#gateway-intents
*
* See https://discord.com/developers/docs/topics/gateway#privileged-intents
* @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents}
* @see {@link https://discord.com/developers/docs/topics/gateway#privileged-intents}
*/
GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents";
})(GatewayCloseCodes || (exports.GatewayCloseCodes = GatewayCloseCodes = {}));
/**
* https://discord.com/developers/docs/topics/gateway#list-of-intents
* @see {@link https://discord.com/developers/docs/topics/gateway#list-of-intents}
*/
var GatewayIntentBits;
(function (GatewayIntentBits) {
@@ -163,9 +151,13 @@ var GatewayIntentBits;
GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers";
GatewayIntentBits[GatewayIntentBits["GuildModeration"] = 4] = "GuildModeration";
/**
* @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration}
* @deprecated This is the old name for {@link GatewayIntentBits.GuildModeration}
*/
GatewayIntentBits[GatewayIntentBits["GuildBans"] = 4] = "GuildBans";
GatewayIntentBits[GatewayIntentBits["GuildExpressions"] = 8] = "GuildExpressions";
/**
* @deprecated This is the old name for {@link GatewayIntentBits.GuildExpressions}
*/
GatewayIntentBits[GatewayIntentBits["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers";
GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations";
GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks";
@@ -185,15 +177,23 @@ var GatewayIntentBits;
GatewayIntentBits[GatewayIntentBits["DirectMessagePolls"] = 33554432] = "DirectMessagePolls";
})(GatewayIntentBits || (exports.GatewayIntentBits = GatewayIntentBits = {}));
/**
* https://discord.com/developers/docs/topics/gateway-events#receive-events
* @see {@link https://discord.com/developers/docs/topics/gateway-events#receive-events}
*/
var GatewayDispatchEvents;
(function (GatewayDispatchEvents) {
GatewayDispatchEvents["ApplicationCommandPermissionsUpdate"] = "APPLICATION_COMMAND_PERMISSIONS_UPDATE";
GatewayDispatchEvents["AutoModerationActionExecution"] = "AUTO_MODERATION_ACTION_EXECUTION";
GatewayDispatchEvents["AutoModerationRuleCreate"] = "AUTO_MODERATION_RULE_CREATE";
GatewayDispatchEvents["AutoModerationRuleDelete"] = "AUTO_MODERATION_RULE_DELETE";
GatewayDispatchEvents["AutoModerationRuleUpdate"] = "AUTO_MODERATION_RULE_UPDATE";
GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE";
GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE";
GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE";
GatewayDispatchEvents["EntitlementCreate"] = "ENTITLEMENT_CREATE";
GatewayDispatchEvents["EntitlementDelete"] = "ENTITLEMENT_DELETE";
GatewayDispatchEvents["EntitlementUpdate"] = "ENTITLEMENT_UPDATE";
GatewayDispatchEvents["GuildAuditLogEntryCreate"] = "GUILD_AUDIT_LOG_ENTRY_CREATE";
GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD";
GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE";
GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE";
@@ -207,6 +207,16 @@ var GatewayDispatchEvents;
GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE";
GatewayDispatchEvents["GuildScheduledEventCreate"] = "GUILD_SCHEDULED_EVENT_CREATE";
GatewayDispatchEvents["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE";
GatewayDispatchEvents["GuildScheduledEventUpdate"] = "GUILD_SCHEDULED_EVENT_UPDATE";
GatewayDispatchEvents["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD";
GatewayDispatchEvents["GuildScheduledEventUserRemove"] = "GUILD_SCHEDULED_EVENT_USER_REMOVE";
GatewayDispatchEvents["GuildSoundboardSoundCreate"] = "GUILD_SOUNDBOARD_SOUND_CREATE";
GatewayDispatchEvents["GuildSoundboardSoundDelete"] = "GUILD_SOUNDBOARD_SOUND_DELETE";
GatewayDispatchEvents["GuildSoundboardSoundsUpdate"] = "GUILD_SOUNDBOARD_SOUNDS_UPDATE";
GatewayDispatchEvents["GuildSoundboardSoundUpdate"] = "GUILD_SOUNDBOARD_SOUND_UPDATE";
GatewayDispatchEvents["SoundboardSounds"] = "SOUNDBOARD_SOUNDS";
GatewayDispatchEvents["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE";
GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE";
GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE";
@@ -218,17 +228,23 @@ var GatewayDispatchEvents;
GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE";
GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE";
GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
GatewayDispatchEvents["MessagePollVoteAdd"] = "MESSAGE_POLL_VOTE_ADD";
GatewayDispatchEvents["MessagePollVoteRemove"] = "MESSAGE_POLL_VOTE_REMOVE";
GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE";
GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE";
GatewayDispatchEvents["RateLimited"] = "RATE_LIMITED";
GatewayDispatchEvents["Ready"] = "READY";
GatewayDispatchEvents["Resumed"] = "RESUMED";
GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE";
GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE";
GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE";
GatewayDispatchEvents["Ready"] = "READY";
GatewayDispatchEvents["Resumed"] = "RESUMED";
GatewayDispatchEvents["SubscriptionCreate"] = "SUBSCRIPTION_CREATE";
GatewayDispatchEvents["SubscriptionDelete"] = "SUBSCRIPTION_DELETE";
GatewayDispatchEvents["SubscriptionUpdate"] = "SUBSCRIPTION_UPDATE";
GatewayDispatchEvents["ThreadCreate"] = "THREAD_CREATE";
GatewayDispatchEvents["ThreadDelete"] = "THREAD_DELETE";
GatewayDispatchEvents["ThreadListSync"] = "THREAD_LIST_SYNC";
@@ -237,24 +253,24 @@ var GatewayDispatchEvents;
GatewayDispatchEvents["ThreadUpdate"] = "THREAD_UPDATE";
GatewayDispatchEvents["TypingStart"] = "TYPING_START";
GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE";
GatewayDispatchEvents["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND";
GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
GatewayDispatchEvents["MessagePollVoteAdd"] = "MESSAGE_POLL_VOTE_ADD";
GatewayDispatchEvents["MessagePollVoteRemove"] = "MESSAGE_POLL_VOTE_REMOVE";
GatewayDispatchEvents["GuildScheduledEventCreate"] = "GUILD_SCHEDULED_EVENT_CREATE";
GatewayDispatchEvents["GuildScheduledEventUpdate"] = "GUILD_SCHEDULED_EVENT_UPDATE";
GatewayDispatchEvents["GuildScheduledEventDelete"] = "GUILD_SCHEDULED_EVENT_DELETE";
GatewayDispatchEvents["GuildScheduledEventUserAdd"] = "GUILD_SCHEDULED_EVENT_USER_ADD";
GatewayDispatchEvents["GuildScheduledEventUserRemove"] = "GUILD_SCHEDULED_EVENT_USER_REMOVE";
GatewayDispatchEvents["AutoModerationRuleCreate"] = "AUTO_MODERATION_RULE_CREATE";
GatewayDispatchEvents["AutoModerationRuleUpdate"] = "AUTO_MODERATION_RULE_UPDATE";
GatewayDispatchEvents["AutoModerationRuleDelete"] = "AUTO_MODERATION_RULE_DELETE";
GatewayDispatchEvents["AutoModerationActionExecution"] = "AUTO_MODERATION_ACTION_EXECUTION";
GatewayDispatchEvents["GuildAuditLogEntryCreate"] = "GUILD_AUDIT_LOG_ENTRY_CREATE";
GatewayDispatchEvents["EntitlementCreate"] = "ENTITLEMENT_CREATE";
GatewayDispatchEvents["EntitlementUpdate"] = "ENTITLEMENT_UPDATE";
GatewayDispatchEvents["EntitlementDelete"] = "ENTITLEMENT_DELETE";
})(GatewayDispatchEvents || (exports.GatewayDispatchEvents = GatewayDispatchEvents = {}));
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send-animation-types}
*/
var VoiceChannelEffectSendAnimationType;
(function (VoiceChannelEffectSendAnimationType) {
/**
* A fun animation, sent by a Nitro subscriber
*/
VoiceChannelEffectSendAnimationType[VoiceChannelEffectSendAnimationType["Premium"] = 0] = "Premium";
/**
* The standard animation
*/
VoiceChannelEffectSendAnimationType[VoiceChannelEffectSendAnimationType["Basic"] = 1] = "Basic";
})(VoiceChannelEffectSendAnimationType || (exports.VoiceChannelEffectSendAnimationType = VoiceChannelEffectSendAnimationType = {}));
// #endregion Shared
//# sourceMappingURL=v9.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"v9.js","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;AAsCH,2CAAyB;AAEZ,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;GAEG;AACH,IAAY,cA8CX;AA9CD,WAAY,cAAc;IACzB;;OAEG;IACH,2DAAQ,CAAA;IACR;;;OAGG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,2EAAgB,CAAA;IAChB;;OAEG;IACH,uDAAU,CAAA;IACV;;OAEG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,iFAAmB,CAAA;IACnB;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,sDAAK,CAAA;IACL;;OAEG;IACH,oEAAY,CAAA;AACb,CAAC,EA9CW,cAAc,8BAAd,cAAc,QA8CzB;AAED;;GAEG;AACH,IAAY,iBA8EX;AA9ED,WAAY,iBAAiB;IAC5B;;OAEG;IACH,4EAAoB,CAAA;IACpB;;;;OAIG;IACH,8EAAa,CAAA;IACb;;;;OAIG;IACH,0EAAW,CAAA;IACX;;;;OAIG;IACH,oFAAgB,CAAA;IAChB;;;;OAIG;IACH,4FAAoB,CAAA;IACpB;;OAEG;IACH,4FAAoB,CAAA;IACpB;;;;OAIG;IACH,wEAAkB,CAAA;IAClB;;OAEG;IACH,0EAAW,CAAA;IACX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C,CAAA;IACxC,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,qEAA4C,CAAA;IAC5C,2EAAkD,CAAA;IAClD,oEAA2C,CAAA;IAC3C,0EAAiD,CAAA;IACjD,iFAAwD,CAAA;IACxD,qFAA4D,CAAA;IAC5D,yDAAgC,CAAA;IAChC,2DAAkC,CAAA;IAClC,qDAA4B,CAAA;IAC5B,wCAAe,CAAA;IACf,4CAAmB,CAAA;IACnB,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,mEAA0C,CAAA;IAC1C,mEAA0C,CAAA;IAC1C,mEAA0C,CAAA;IAC1C,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,4DAAmC,CAAA;IACnC,sEAA6C,CAAA;IAC7C,oEAA2C,CAAA;IAC3C,uDAA8B,CAAA;IAC9B,qDAA4B,CAAA;IAC5B,mDAA0B,CAAA;IAC1B,6EAAoD,CAAA;IACpD,kEAAyC,CAAA;IACzC,gEAAuC,CAAA;IACvC,2DAAkC,CAAA;AACnC,CAAC,EA7EW,qBAAqB,qCAArB,qBAAqB,QA6EhC;AA4uDD;;GAEG;AACH,IAAY,mCASX;AATD,WAAY,mCAAmC;IAC9C;;OAEG;IACH,mGAAO,CAAA;IACP;;OAEG;IACH,+FAAK,CAAA;AACN,CAAC,EATW,mCAAmC,mDAAnC,mCAAmC,QAS9C;AAogBD,oBAAoB"}

View File

@@ -6,3 +6,4 @@ export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
export const GatewayIntentBits = mod.GatewayIntentBits;
export const GatewayOpcodes = mod.GatewayOpcodes;
export const GatewayVersion = mod.GatewayVersion;
export const VoiceChannelEffectSendAnimationType = mod.VoiceChannelEffectSendAnimationType;

View File

@@ -1,15 +1,13 @@
/**
* https://discord.com/developers/docs/reference#snowflakes
* @see {@link https://discord.com/developers/docs/reference#snowflakes}
*/
export type Snowflake = string;
/**
* https://discord.com/developers/docs/topics/permissions
*
* @internal
* @see {@link https://discord.com/developers/docs/topics/permissions}
*/
export type Permissions = string;
/**
* https://discord.com/developers/docs/reference#message-formatting-formats
* @see {@link https://discord.com/developers/docs/reference#message-formatting-formats}
*/
export declare const FormattingPatterns: {
/**
@@ -88,5 +86,17 @@ export declare const FormattingPatterns: {
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
*/
readonly StyledTimestamp: RegExp;
/**
* Regular expression for matching a guild navigation mention
*
* The `type` group property is present on the `exec` result of this expression
*/
readonly GuildNavigation: RegExp;
/**
* Regular expression for matching a linked role mention
*
* The `id` group property is present on the `exec` result of this expression
*/
readonly LinkedRole: RegExp;
};
//# sourceMappingURL=globals.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["globals.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,kBAAkB;IAC9B;;;;OAIG;;IAEH;;;;;;OAMG;;IAEH;;;;;;OAMG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAIH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAGH;;;;OAIG;;IAEH;;;;OAIG;;CAEM,CAAC"}
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["globals.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,kBAAkB;IAC9B;;;;OAIG;;IAEH;;;;;;OAMG;;IAEH;;;;;;OAMG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAGH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAGH;;;;OAIG;;IAEH;;;;OAIG;;IAGH;;;;OAIG;;IAEH;;;;OAIG;;CAEM,CAAC"}

View File

@@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormattingPatterns = void 0;
/**
* https://discord.com/developers/docs/reference#message-formatting-formats
* @see {@link https://discord.com/developers/docs/reference#message-formatting-formats}
*/
exports.FormattingPatterns = {
/**
@@ -44,9 +44,7 @@ exports.FormattingPatterns = {
*
* The `fullName` (possibly including `name`, `subcommandOrGroup` and `subcommand`) and `id` group properties are present on the `exec` result of this expression
*/
SlashCommand:
// eslint-disable-next-line unicorn/no-unsafe-regex
/<\/(?<fullName>(?<name>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32})(?: (?<subcommandOrGroup>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?(?: (?<subcommand>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?):(?<id>\d{17,20})>/u,
SlashCommand: /<\/(?<fullName>(?<name>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32})(?: (?<subcommandOrGroup>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?(?: (?<subcommand>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?):(?<id>\d{17,20})>/u,
/**
* Regular expression for matching a custom emoji, either static or animated
*
@@ -70,8 +68,8 @@ exports.FormattingPatterns = {
*
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
*/
// eslint-disable-next-line prefer-named-capture-group
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRTdft]))?>/,
// eslint-disable-next-line prefer-named-capture-group, unicorn/better-regex
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRSTdfst]))?>/,
/**
* Regular expression for matching strictly default styled timestamps
*
@@ -83,7 +81,20 @@ exports.FormattingPatterns = {
*
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
*/
StyledTimestamp: /<t:(?<timestamp>-?\d{1,13}):(?<style>[DFRTdft])>/,
// eslint-disable-next-line unicorn/better-regex
StyledTimestamp: /<t:(?<timestamp>-?\d{1,13}):(?<style>[DFRSTdfst])>/,
/**
* Regular expression for matching a guild navigation mention
*
* The `type` group property is present on the `exec` result of this expression
*/
GuildNavigation: /<id:(?<type>customize|browse|guide|linked-roles)>/,
/**
* Regular expression for matching a linked role mention
*
* The `id` group property is present on the `exec` result of this expression
*/
LinkedRole: /<id:linked-roles:(?<id>\d{17,20})>/,
};
/**
* Freezes the formatting patterns

View File

@@ -1 +1 @@
{"version":3,"file":"globals.js","sourceRoot":"","sources":["globals.ts"],"names":[],"mappings":";;;AAYA;;GAEG;AACU,QAAA,kBAAkB,GAAG;IACjC;;;;OAIG;IACH,IAAI,EAAE,qBAAqB;IAC3B;;;;;;OAMG;IACH,gBAAgB,EAAE,sBAAsB;IACxC;;;;;;OAMG;IACH,wBAAwB,EAAE,uBAAuB;IACjD;;;;OAIG;IACH,OAAO,EAAE,qBAAqB;IAC9B;;;;OAIG;IACH,IAAI,EAAE,sBAAsB;IAC5B;;;;OAIG;IACH,YAAY;IACX,mDAAmD;IACnD,2PAA2P;IAC5P;;;;OAIG;IACH,KAAK,EAAE,sDAAsD;IAC7D;;;;OAIG;IACH,aAAa,EAAE,qDAAqD;IACpE;;;;OAIG;IACH,WAAW,EAAE,uCAAuC;IACpD;;;;OAIG;IACH,sDAAsD;IACtD,SAAS,EAAE,qDAAqD;IAChE;;;;OAIG;IACH,sBAAsB,EAAE,8BAA8B;IACtD;;;;OAIG;IACH,eAAe,EAAE,kDAAkD;CAC1D,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,CAAC,0BAAkB,CAAC,CAAC"}
{"version":3,"file":"globals.js","sourceRoot":"","sources":["globals.ts"],"names":[],"mappings":";;;AAUA;;GAEG;AACU,QAAA,kBAAkB,GAAG;IACjC;;;;OAIG;IACH,IAAI,EAAE,qBAAqB;IAC3B;;;;;;OAMG;IACH,gBAAgB,EAAE,sBAAsB;IACxC;;;;;;OAMG;IACH,wBAAwB,EAAE,uBAAuB;IACjD;;;;OAIG;IACH,OAAO,EAAE,qBAAqB;IAC9B;;;;OAIG;IACH,IAAI,EAAE,sBAAsB;IAC5B;;;;OAIG;IACH,YAAY,EACX,2PAA2P;IAC5P;;;;OAIG;IACH,KAAK,EAAE,sDAAsD;IAC7D;;;;OAIG;IACH,aAAa,EAAE,qDAAqD;IACpE;;;;OAIG;IACH,WAAW,EAAE,uCAAuC;IACpD;;;;OAIG;IACH,4EAA4E;IAC5E,SAAS,EAAE,uDAAuD;IAClE;;;;OAIG;IACH,sBAAsB,EAAE,8BAA8B;IACtD;;;;OAIG;IACH,gDAAgD;IAChD,eAAe,EAAE,oDAAoD;IACrE;;;;OAIG;IACH,eAAe,EAAE,mDAAmD;IACpE;;;;OAIG;IACH,UAAU,EAAE,oCAAoC;CACvC,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,CAAC,0BAAkB,CAAC,CAAC"}

View File

@@ -1,204 +1,215 @@
{
"name": "discord-api-types",
"version": "0.37.83",
"description": "Discord API typings that are kept up to date for use in bot library creation.",
"homepage": "https://discord-api-types.dev",
"exports": {
"./globals": {
"types": "./globals.d.ts",
"require": "./globals.js",
"import": "./globals.mjs"
},
"./v6": {
"types": "./v6.d.ts",
"require": "./v6.js",
"import": "./v6.mjs"
},
"./v8": {
"types": "./v8.d.ts",
"require": "./v8.js",
"import": "./v8.mjs"
},
"./v9": {
"types": "./v9.d.ts",
"require": "./v9.js",
"import": "./v9.mjs"
},
"./v10": {
"types": "./v10.d.ts",
"require": "./v10.js",
"import": "./v10.mjs"
},
"./gateway": {
"types": "./gateway/index.d.ts",
"require": "./gateway/index.js",
"import": "./gateway/index.mjs"
},
"./gateway/v*": {
"types": "./gateway/v*.d.ts",
"require": "./gateway/v*.js",
"import": "./gateway/v*.mjs"
},
"./payloads": {
"types": "./payloads/index.d.ts",
"require": "./payloads/index.js",
"import": "./payloads/index.mjs"
},
"./payloads/v*": {
"types": "./payloads/v*/index.d.ts",
"require": "./payloads/v*/index.js",
"import": "./payloads/v*/index.mjs"
},
"./rest": {
"types": "./rest/index.d.ts",
"require": "./rest/index.js",
"import": "./rest/index.mjs"
},
"./rest/v*": {
"types": "./rest/v*/index.d.ts",
"require": "./rest/v*/index.js",
"import": "./rest/v*/index.mjs"
},
"./rpc": {
"types": "./rpc/index.d.ts",
"require": "./rpc/index.js",
"import": "./rpc/index.mjs"
},
"./rpc/v*": {
"types": "./rpc/v*.d.ts",
"require": "./rpc/v*.js",
"import": "./rpc/v*.mjs"
},
"./voice": {
"types": "./voice/index.d.ts",
"require": "./voice/index.js",
"import": "./voice/index.mjs"
},
"./voice/v*": {
"types": "./voice/v*.d.ts",
"require": "./voice/v*.js",
"import": "./voice/v*.mjs"
},
"./utils": {
"types": "./utils/index.d.ts",
"require": "./utils/index.js",
"import": "./utils/index.mjs"
},
"./utils/v*": {
"types": "./utils/v*.d.ts",
"require": "./utils/v*.js",
"import": "./utils/v*.mjs"
}
},
"scripts": {
"build:ci": "tsc --noEmit --incremental false",
"build:deno": "node ./scripts/deno.mjs",
"build:node": "tsc && run-p esm:*",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"ci:pr": "run-s changelog lint build:deno && node ./scripts/bump-website-version.mjs",
"clean:deno": "rimraf deno/",
"clean:node": "rimraf --glob \"{gateway,payloads,rest,rpc,voice,utils}/**/*.{js,mjs,d.ts,*map}\" \"{globals,v*}.{js,mjs,d.ts,*map}\"",
"clean": "run-p clean:*",
"esm:gateway": "gen-esm-wrapper ./gateway/index.js ./gateway/index.mjs",
"esm:globals": "gen-esm-wrapper ./globals.js ./globals.mjs",
"esm:payloads": "gen-esm-wrapper ./payloads/index.js ./payloads/index.mjs",
"esm:rest": "gen-esm-wrapper ./rest/index.js ./rest/index.mjs",
"esm:rpc": "gen-esm-wrapper ./rpc/index.js ./rpc/index.mjs",
"esm:utils": "gen-esm-wrapper ./utils/index.js ./utils/index.mjs",
"esm:versions": "node ./scripts/versions.mjs",
"esm:voice": "gen-esm-wrapper ./voice/index.js ./voice/index.mjs",
"lint": "prettier --write . && eslint --fix --ext mjs,ts \"{gateway,payloads,rest,rpc,voice,utils}/**/*.ts\" \"{globals,v*}.ts\" \"scripts/**/*.mjs\"",
"postpublish": "run-s clean:node build:deno",
"prepare": "tsc -p ./.eslint-plugin-local && (is-ci || husky)",
"prepublishOnly": "run-s clean test:lint build:node",
"test:lint": "prettier --check . && eslint --ext mjs,ts \"{gateway,payloads,rest,rpc,voice,utils}/**/*.ts\" \"{globals,v*}.ts\" \"scripts/**/*.mjs\"",
"pretest:types": "tsc",
"test:types": "tsd -t ./v10.d.ts",
"posttest:types": "npm run clean:node"
},
"keywords": [
"discord",
"discord api",
"types",
"discordjs"
],
"author": "Vlad Frangu <kingdgrizzle@gmail.com>",
"license": "MIT",
"files": [
"{gateway,payloads,rest,rpc,voice,utils}/**/*.{js,js.map,d.ts,d.ts.map,mjs}",
"{globals,v*}.{js,js.map,d.ts,d.ts.map,mjs}"
],
"devDependencies": {
"@commitlint/cli": "^19.0.3",
"@commitlint/config-angular": "^19.0.3",
"@favware/npm-deprecate": "^1.0.7",
"@octokit/action": "^6.0.7",
"@octokit/webhooks-types": "^7.3.2",
"@sapphire/prettier-config": "^2.0.0",
"@types/conventional-recommended-bump": "^9.0.3",
"@types/node": "^20.11.24",
"@typescript-eslint/utils": "^7.1.1",
"conventional-changelog-cli": "^4.1.0",
"conventional-recommended-bump": "^9.0.0",
"eslint": "^8.57.0",
"eslint-config-neon": "^0.1.59",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-local": "^4.2.1",
"gen-esm-wrapper": "^1.1.3",
"husky": "^9.0.11",
"is-ci": "^3.0.1",
"lint-staged": "^15.2.2",
"npm-run-all2": "^6.0.0",
"prettier": "^3.2.5",
"pretty-quick": "^4.0.0",
"rimraf": "^5.0.5",
"tsd": "^0.31.0",
"tsutils": "^3.21.0",
"typescript": "^5.3.3"
},
"publishConfig": {
"provenance": true
},
"repository": {
"type": "git",
"url": "https://github.com/discordjs/discord-api-types"
},
"lint-staged": {
"{gateway,payloads,rest,rpc,voice,utils}/**/*.{mjs,js,ts}": "eslint --fix --ext mjs,js,ts",
"{globals,v*}.ts": "eslint --fix --ext mjs,js,ts"
},
"commitlint": {
"extends": [
"@commitlint/config-angular"
],
"rules": {
"type-enum": [
2,
"always",
[
"chore",
"build",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test",
"types",
"wip"
]
],
"scope-case": [
1,
"always",
"pascal-case"
]
}
},
"tsd": {
"directory": "tests"
}
}
"name": "discord-api-types",
"version": "0.38.36",
"description": "Discord API typings that are kept up to date for use in bot library creation.",
"homepage": "https://discord-api-types.dev",
"workspaces": [
"scripts/actions/documentation"
],
"exports": {
"./globals": {
"types": "./globals.d.ts",
"require": "./globals.js",
"import": "./globals.mjs"
},
"./v6": {
"types": "./v6.d.ts",
"require": "./v6.js",
"import": "./v6.mjs"
},
"./v8": {
"types": "./v8.d.ts",
"require": "./v8.js",
"import": "./v8.mjs"
},
"./v9": {
"types": "./v9.d.ts",
"require": "./v9.js",
"import": "./v9.mjs"
},
"./v10": {
"types": "./v10.d.ts",
"require": "./v10.js",
"import": "./v10.mjs"
},
"./gateway": {
"types": "./gateway/index.d.ts",
"require": "./gateway/index.js",
"import": "./gateway/index.mjs"
},
"./gateway/v*": {
"types": "./gateway/v*.d.ts",
"require": "./gateway/v*.js",
"import": "./gateway/v*.mjs"
},
"./payloads": {
"types": "./payloads/index.d.ts",
"require": "./payloads/index.js",
"import": "./payloads/index.mjs"
},
"./payloads/v*": {
"types": "./payloads/v*/index.d.ts",
"require": "./payloads/v*/index.js",
"import": "./payloads/v*/index.mjs"
},
"./rest": {
"types": "./rest/index.d.ts",
"require": "./rest/index.js",
"import": "./rest/index.mjs"
},
"./rest/v*": {
"types": "./rest/v*/index.d.ts",
"require": "./rest/v*/index.js",
"import": "./rest/v*/index.mjs"
},
"./rpc": {
"types": "./rpc/index.d.ts",
"require": "./rpc/index.js",
"import": "./rpc/index.mjs"
},
"./rpc/v*": {
"types": "./rpc/v*.d.ts",
"require": "./rpc/v*.js",
"import": "./rpc/v*.mjs"
},
"./voice": {
"types": "./voice/index.d.ts",
"require": "./voice/index.js",
"import": "./voice/index.mjs"
},
"./voice/v*": {
"types": "./voice/v*.d.ts",
"require": "./voice/v*.js",
"import": "./voice/v*.mjs"
},
"./utils": {
"types": "./utils/index.d.ts",
"require": "./utils/index.js",
"import": "./utils/index.mjs"
},
"./utils/v*": {
"types": "./utils/v*.d.ts",
"require": "./utils/v*.js",
"import": "./utils/v*.mjs"
}
},
"scripts": {
"build:ci": "tsc --noEmit --incremental false",
"build:deno": "node ./scripts/deno.mjs",
"build:generated": "tsx ./scripts/generate-prettier-routes-interface.ts",
"build:node": "yarn build:generated && tsc && run-p 'esm:*'",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"ci:pr": "run-s changelog lint build:deno && node ./scripts/bump-website-version.mjs",
"clean:deno": "rimraf deno/",
"clean:node": "rimraf --glob \"{gateway,payloads,rest,rpc,voice,utils}/**/*.{js,mjs,d.ts,*map}\" \"{globals,v*}.{js,mjs,d.ts,*map}\"",
"clean": "run-p 'clean:*'",
"esm:gateway": "gen-esm-wrapper ./gateway/index.js ./gateway/index.mjs",
"esm:globals": "gen-esm-wrapper ./globals.js ./globals.mjs",
"esm:payloads": "gen-esm-wrapper ./payloads/index.js ./payloads/index.mjs",
"esm:rest": "gen-esm-wrapper ./rest/index.js ./rest/index.mjs",
"esm:rpc": "gen-esm-wrapper ./rpc/index.js ./rpc/index.mjs",
"esm:utils": "gen-esm-wrapper ./utils/index.js ./utils/index.mjs",
"esm:versions": "node ./scripts/versions.mjs",
"esm:voice": "gen-esm-wrapper ./voice/index.js ./voice/index.mjs",
"lint": "prettier --write . && eslint --format=pretty --fix --ext mjs,ts \"{gateway,payloads,rest,rpc,voice,utils}/**/*.ts\" \"{globals,v*}.ts\" \"scripts/**/*.mjs\"",
"postinstallDev": "is-ci || husky",
"prepack": "run-s clean test:lint build:node",
"postpack": "run-s clean:node build:deno && git checkout -- './deno/**/*.ts' './rest/**/*.ts'",
"test:lint": "prettier --check . && eslint --format=pretty --ext mjs,ts \"{gateway,payloads,rest,rpc,voice,utils}/**/*.ts\" \"{globals,v*}.ts\" \"scripts/**/*.mjs\"",
"test:types": "tsc -p tests"
},
"keywords": [
"discord",
"discord api",
"types",
"discordjs"
],
"author": "Vlad Frangu <me@vladfrangu.dev>",
"license": "MIT",
"files": [
"_generated_/**/*.{js,js.map,d.ts,d.ts.map,mjs}",
"{gateway,payloads,rest,rpc,voice,utils}/**/*.{js,js.map,d.ts,d.ts.map,mjs}",
"{globals,v*}.{js,js.map,d.ts,d.ts.map,mjs}"
],
"devDependencies": {
"@commitlint/cli": "^20.0.0",
"@commitlint/config-angular": "^20.0.0",
"@favware/npm-deprecate": "^2.0.0",
"@octokit/action": "^8.0.2",
"@octokit/webhooks-types": "^7.6.1",
"@sapphire/prettier-config": "^2.0.0",
"@types/lodash.merge": "^4",
"@types/node": "^24.0.0",
"@typescript-eslint/utils": "^8.33.0",
"conventional-changelog": "^7.0.2",
"conventional-changelog-angular": "^8.0.0",
"conventional-recommended-bump": "^11.1.0",
"eslint": "^9.28.0",
"eslint-config-neon": "^0.2.7",
"eslint-formatter-pretty": "^7.0.0",
"eslint-import-resolver-typescript": "^4.4.2",
"gen-esm-wrapper": "^1.1.3",
"husky": "^9.1.7",
"is-ci": "^4.1.0",
"lint-staged": "^16.1.0",
"lodash.merge": "^4.6.2",
"npm-run-all2": "^8.0.4",
"prettier": "^3.5.3",
"pretty-quick": "^4.1.1",
"rimraf": "^6.0.1",
"ts-morph": "^27.0.0",
"tsutils": "^3.21.0",
"tsx": "^4.20.3",
"typescript": "^5.8.3",
"typescript-eslint": "^8.33.0"
},
"publishConfig": {
"provenance": true,
"access": "public",
"registry": "https://registry.npmjs.org"
},
"repository": {
"type": "git",
"url": "https://github.com/discordjs/discord-api-types"
},
"lint-staged": {
"{gateway,payloads,rest,rpc,voice,utils}/**/*.{mjs,js,ts}": "eslint --fix --ext mjs,js,ts",
"{globals,v*}.ts": "eslint --fix --ext mjs,js,ts"
},
"commitlint": {
"extends": [
"@commitlint/config-angular"
],
"rules": {
"type-enum": [
2,
"always",
[
"chore",
"build",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test",
"types",
"wip"
]
],
"scope-case": [
1,
"always",
"pascal-case"
]
}
},
"packageManager": "yarn@4.12.0",
"volta": {
"node": "24.11.1",
"yarn": "4.12.0"
}
}

View File

@@ -1,6 +1,6 @@
import type { LocaleString } from '../rest/common';
import type { Locale } from '../rest/common';
/**
* https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
* @see {@link 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
@@ -176,7 +176,7 @@ export declare const PermissionFlagsBits: {
/**
* Allows management and editing of emojis, stickers, and soundboard sounds
*
* @deprecated This is the old name for {@apilink PermissionFlagsBits#ManageGuildExpressions}
* @deprecated This is the old name for {@link PermissionFlagsBits.ManageGuildExpressions}
*/
readonly ManageEmojisAndStickers: bigint;
/**
@@ -232,7 +232,7 @@ export declare const PermissionFlagsBits: {
*/
readonly SendMessagesInThreads: bigint;
/**
* Allows for using Activities (applications with the {@apilink ApplicationFlags.Embedded} flag) in a voice channel
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag) in a voice channel
*
* Applies to channel types: Voice
*/
@@ -280,10 +280,28 @@ export declare const PermissionFlagsBits: {
* Applies to channel types: Text, Voice, Stage
*/
readonly SendPolls: bigint;
/**
* Allows user-installed apps to send public responses. When disabled, users will still be allowed to use their apps but the responses will be ephemeral. This only applies to apps not also installed to the server
*
* Applies to channel types: Text, Voice, Stage
*/
readonly UseExternalApps: bigint;
/**
* Allows pinning and unpinning messages
*
* Applies to channel types: Text
*/
readonly PinMessages: bigint;
/**
* Allows bypassing slowmode restrictions
*
* Applies to channel types: Text, Voice, Stage
*/
readonly BypassSlowmode: bigint;
};
export type LocalizationMap = Partial<Record<LocaleString, string | null>>;
export type LocalizationMap = Partial<Record<Locale, string | null>>;
/**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#json
* @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#json}
*/
export interface RESTError {
code: number;
@@ -301,7 +319,7 @@ export type RESTErrorData = RESTErrorFieldInformation | RESTErrorGroupWrapper |
[k: string]: RESTErrorData;
};
/**
* https://discord.com/developers/docs/topics/rate-limits#exceeding-a-rate-limit-rate-limit-response-structure
* @see {@link https://discord.com/developers/docs/topics/rate-limits#exceeding-a-rate-limit-rate-limit-response-structure}
*/
export interface RESTRateLimit {
/**

View File

@@ -1 +1 @@
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;IAC/B;;;;OAIG;;IAEH;;OAEG;;IAGH;;OAEG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;;IAEH;;;;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AAM,CAAC;IAChB,MAAM,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,qBAAqB;IACrC,OAAO,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,MAAM,MAAM,aAAa,GAAG,yBAAyB,GAAG,qBAAqB,GAAG,MAAM,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,aAAa,CAAA;CAAE,CAAC;AAExH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACpB"}

View File

@@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.PermissionFlagsBits = void 0;
/**
* https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
* @see {@link 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
@@ -18,7 +18,6 @@ exports.PermissionFlagsBits = {
/**
* Allows kicking members
*/
// eslint-disable-next-line sonarjs/no-identical-expressions
KickMembers: 1n << 1n,
/**
* Allows banning members
@@ -179,7 +178,7 @@ exports.PermissionFlagsBits = {
/**
* Allows management and editing of emojis, stickers, and soundboard sounds
*
* @deprecated This is the old name for {@apilink PermissionFlagsBits#ManageGuildExpressions}
* @deprecated This is the old name for {@link PermissionFlagsBits.ManageGuildExpressions}
*/
ManageEmojisAndStickers: 1n << 30n,
/**
@@ -235,7 +234,7 @@ exports.PermissionFlagsBits = {
*/
SendMessagesInThreads: 1n << 38n,
/**
* Allows for using Activities (applications with the {@apilink ApplicationFlags.Embedded} flag) in a voice channel
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag) in a voice channel
*
* Applies to channel types: Voice
*/
@@ -283,6 +282,24 @@ exports.PermissionFlagsBits = {
* Applies to channel types: Text, Voice, Stage
*/
SendPolls: 1n << 49n,
/**
* Allows user-installed apps to send public responses. When disabled, users will still be allowed to use their apps but the responses will be ephemeral. This only applies to apps not also installed to the server
*
* Applies to channel types: Text, Voice, Stage
*/
UseExternalApps: 1n << 50n,
/**
* Allows pinning and unpinning messages
*
* Applies to channel types: Text
*/
PinMessages: 1n << 51n,
/**
* Allows bypassing slowmode restrictions
*
* Applies to channel types: Text, Voice, Stage
*/
BypassSlowmode: 1n << 52n,
};
/**
* Freeze the object of bits, preventing any modifications to it

View File

@@ -1 +1 @@
{"version":3,"file":"common.js","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACU,QAAA,mBAAmB,GAAG;IAClC;;;;OAIG;IACH,mBAAmB,EAAE,EAAE,IAAI,EAAE;IAC7B;;OAEG;IACH,4DAA4D;IAC5D,WAAW,EAAE,EAAE,IAAI,EAAE;IACrB;;OAEG;IACH,UAAU,EAAE,EAAE,IAAI,EAAE;IACpB;;OAEG;IACH,aAAa,EAAE,EAAE,IAAI,EAAE;IACvB;;;;OAIG;IACH,cAAc,EAAE,EAAE,IAAI,EAAE;IACxB;;OAEG;IACH,WAAW,EAAE,EAAE,IAAI,EAAE;IACrB;;;;OAIG;IACH,YAAY,EAAE,EAAE,IAAI,EAAE;IACtB;;OAEG;IACH,YAAY,EAAE,EAAE,IAAI,EAAE;IACtB;;;;OAIG;IACH,eAAe,EAAE,EAAE,IAAI,EAAE;IACzB;;;;OAIG;IACH,MAAM,EAAE,EAAE,IAAI,EAAE;IAChB;;;;OAIG;IACH,WAAW,EAAE,EAAE,IAAI,GAAG;IACtB;;;;;OAKG;IACH,YAAY,EAAE,EAAE,IAAI,GAAG;IACvB;;;;OAIG;IACH,eAAe,EAA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sBAAsB,EAAE,EAAE,IAAI,GAAG;IACjC;;;;OAIG;IACH,cAAc,EAAE,EAAE,IAAI,GAAG;IACzB;;;;OAIG;IACH,YAAY,EAAE,EAAE,IAAI,GAAG;IACvB;;;;OAIG;IACH,aAAa,EAAE,EAAE,IAAI,GAAG;IACxB;;;;OAIG;IACH,mBAAmB,EAAE,EAAE,IAAI,GAAG;IAC9B;;;;OAIG;IACH,oBAAoB,EAAE,EAAE,IAAI,GAAG;IAC/B;;;;OAIG;IACH,mBAAmB,EAAE,EAAE,IAAI,GAAG;IAC9B;;;;OAIG;IACH,qBAAqB,EAAE,EAAE,IAAI,GAAG;IAChC;;;;OAIG;IACH,qBAAqB,EAAE,EAAE,IAAI,GAAG;IAChC;;;OAGG;IACH,eAAe,EAAE,EAAE,IAAI,GAAG;IAC1B;;OAEG;IACH,gCAAgC,EAAE,EAAE,IAAI,GAAG;IAC3C;;;;OAIG;IACH,aAAa,EAAE,EAAE,IAAI,GAAG;IACxB;;OAEG;IACH,sBAAsB,EAAE,EAAE,IAAI,GAAG;IACjC;;;;OAIG;IACH,YAAY,EAAE,EAAE,IAAI,GAAG;IACvB;;;;OAIG;IACH,iBAAiB,EAAE,EAAE,IAAI,GAAG;IAC5B;;;;OAIG;IACH,iBAAiB,EAAE,EAAE,IAAI,GAAG;IAC5B;;;;OAIG;IACH,SAAS,EAAE,EAAE,IAAI,GAAG;IACpB;;;;OAIG;IACH,eAAe,EAAE,EAAE,IAAI,GAAG;IAC1B;;;;OAIG;IACH,WAAW,EAAE,EAAE,IAAI,GAAG;IACtB;;;;OAIG;IACH,cAAc,EAAE,EAAE,IAAI,GAAG;CAChB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,CAAC,2BAAmB,CAAC,CAAC"}

View File

@@ -10,7 +10,11 @@ export const ApplicationCommandOptionType = mod.ApplicationCommandOptionType;
export const ApplicationCommandPermissionType = mod.ApplicationCommandPermissionType;
export const ApplicationCommandType = mod.ApplicationCommandType;
export const ApplicationFlags = mod.ApplicationFlags;
export const ApplicationIntegrationType = mod.ApplicationIntegrationType;
export const ApplicationRoleConnectionMetadataType = mod.ApplicationRoleConnectionMetadataType;
export const ApplicationWebhookEventStatus = mod.ApplicationWebhookEventStatus;
export const ApplicationWebhookEventType = mod.ApplicationWebhookEventType;
export const ApplicationWebhookType = mod.ApplicationWebhookType;
export const AttachmentFlags = mod.AttachmentFlags;
export const AuditLogEvent = mod.AuditLogEvent;
export const AuditLogOptionsType = mod.AuditLogOptionsType;
@@ -26,6 +30,7 @@ export const ConnectionService = mod.ConnectionService;
export const ConnectionVisibility = mod.ConnectionVisibility;
export const EmbedType = mod.EmbedType;
export const EntitlementType = mod.EntitlementType;
export const EntryPointCommandHandlerType = mod.EntryPointCommandHandlerType;
export const ForumLayoutType = mod.ForumLayoutType;
export const GuildDefaultMessageNotifications = mod.GuildDefaultMessageNotifications;
export const GuildExplicitContentFilter = mod.GuildExplicitContentFilter;
@@ -39,19 +44,26 @@ export const GuildOnboardingPromptType = mod.GuildOnboardingPromptType;
export const GuildPremiumTier = mod.GuildPremiumTier;
export const GuildScheduledEventEntityType = mod.GuildScheduledEventEntityType;
export const GuildScheduledEventPrivacyLevel = mod.GuildScheduledEventPrivacyLevel;
export const GuildScheduledEventRecurrenceRuleFrequency = mod.GuildScheduledEventRecurrenceRuleFrequency;
export const GuildScheduledEventRecurrenceRuleMonth = mod.GuildScheduledEventRecurrenceRuleMonth;
export const GuildScheduledEventRecurrenceRuleWeekday = mod.GuildScheduledEventRecurrenceRuleWeekday;
export const GuildScheduledEventStatus = mod.GuildScheduledEventStatus;
export const GuildSystemChannelFlags = mod.GuildSystemChannelFlags;
export const GuildVerificationLevel = mod.GuildVerificationLevel;
export const GuildWidgetStyle = mod.GuildWidgetStyle;
export const IntegrationExpireBehavior = mod.IntegrationExpireBehavior;
export const InteractionContextType = mod.InteractionContextType;
export const InteractionResponseType = mod.InteractionResponseType;
export const InteractionType = mod.InteractionType;
export const InviteFlags = mod.InviteFlags;
export const InviteTargetType = mod.InviteTargetType;
export const InviteType = mod.InviteType;
export const MembershipScreeningFieldType = mod.MembershipScreeningFieldType;
export const MessageActivityType = mod.MessageActivityType;
export const MessageFlags = mod.MessageFlags;
export const MessageReferenceType = mod.MessageReferenceType;
export const MessageType = mod.MessageType;
export const NameplatePalette = mod.NameplatePalette;
export const OAuth2Scopes = mod.OAuth2Scopes;
export const OverwriteType = mod.OverwriteType;
export const PermissionFlagsBits = mod.PermissionFlagsBits;
@@ -61,15 +73,19 @@ export const RoleFlags = mod.RoleFlags;
export const SKUFlags = mod.SKUFlags;
export const SKUType = mod.SKUType;
export const SelectMenuDefaultValueType = mod.SelectMenuDefaultValueType;
export const SeparatorSpacingSize = mod.SeparatorSpacingSize;
export const SortOrderType = mod.SortOrderType;
export const StageInstancePrivacyLevel = mod.StageInstancePrivacyLevel;
export const StatusDisplayType = mod.StatusDisplayType;
export const StickerFormatType = mod.StickerFormatType;
export const StickerType = mod.StickerType;
export const SubscriptionStatus = mod.SubscriptionStatus;
export const TeamMemberMembershipState = mod.TeamMemberMembershipState;
export const TeamMemberRole = mod.TeamMemberRole;
export const TextInputStyle = mod.TextInputStyle;
export const ThreadAutoArchiveDuration = mod.ThreadAutoArchiveDuration;
export const ThreadMemberFlags = mod.ThreadMemberFlags;
export const UnfurledMediaItemLoadingState = mod.UnfurledMediaItemLoadingState;
export const UserFlags = mod.UserFlags;
export const UserPremiumType = mod.UserPremiumType;
export const VideoQualityMode = mod.VideoQualityMode;

View File

@@ -3,7 +3,7 @@ import type { ChannelType } from '../../../channel';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
import type { ApplicationCommandOptionType } from './shared';
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>[];
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory>[];
}
export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Channel, Snowflake>;
//# sourceMappingURL=channel.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,kCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E,aAAa,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;CAC7E;AAED,MAAM,MAAM,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,SAAS,CACT,CAAC"}
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC5F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,kCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E,aAAa,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,GAAG,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,cAAc,CAAC,EAAE,CAAC;CAC1G;AAED,MAAM,MAAM,iDAAiD,GAAG,4BAA4B,CAC3F,4BAA4B,CAAC,OAAO,EACpC,SAAS,CACT,CAAC"}

View File

@@ -1,6 +1,7 @@
import type { InteractionType } from '../../responses';
import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
export interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
/**
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
*/
@@ -11,8 +12,7 @@ interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOp
max_value?: number;
}
export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandIntegerOptionBase, APIApplicationCommandOptionChoice<number>>;
export interface APIApplicationCommandInteractionDataIntegerOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Integer, number> {
export interface APIApplicationCommandInteractionDataIntegerOption<Type extends InteractionType = InteractionType> extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Integer, Type extends InteractionType.ApplicationCommandAutocomplete ? string : number> {
focused?: boolean;
}
export {};
//# sourceMappingURL=integer.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,UAAU,sCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,kCAAkC,GAAG,2DAA2D,CAC3G,sCAAsC,EACtC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,iDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,OAAO,EAAE,MAAM,CAAC;IAClF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"}
{"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["integer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,WAAW,sCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,OAAO,CAAC;IAC7E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,kCAAkC,GAAG,2DAA2D,CAC3G,sCAAsC,EACtC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,iDAAiD,CAAC,IAAI,SAAS,eAAe,GAAG,eAAe,CAChH,SAAQ,4BAA4B,CACnC,4BAA4B,CAAC,OAAO,EACpC,IAAI,SAAS,eAAe,CAAC,8BAA8B,GAAG,MAAM,GAAG,MAAM,CAC7E;IACD,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"}

View File

@@ -1,6 +1,7 @@
import type { InteractionType } from '../../responses';
import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
export interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
/**
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
*/
@@ -11,8 +12,7 @@ interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOpt
max_value?: number;
}
export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandNumberOptionBase, APIApplicationCommandOptionChoice<number>>;
export interface APIApplicationCommandInteractionDataNumberOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Number, number> {
export interface APIApplicationCommandInteractionDataNumberOption<Type extends InteractionType = InteractionType> extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Number, Type extends InteractionType.ApplicationCommandAutocomplete ? string : number> {
focused?: boolean;
}
export {};
//# sourceMappingURL=number.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,UAAU,qCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,gDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"}
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,WAAW,qCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,gDAAgD,CAAC,IAAI,SAAS,eAAe,GAAG,eAAe,CAC/G,SAAQ,4BAA4B,CACnC,4BAA4B,CAAC,MAAM,EACnC,IAAI,SAAS,eAAe,CAAC,8BAA8B,GAAG,MAAM,GAAG,MAAM,CAC7E;IACD,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"}

View File

@@ -1,6 +1,6 @@
import type { LocalizationMap } from '../../../../../v10';
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type}
*/
export declare enum ApplicationCommandOptionType {
Subcommand = 1,
@@ -16,7 +16,7 @@ export declare enum ApplicationCommandOptionType {
Attachment = 11
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure}
*/
export interface APIApplicationCommandOptionChoice<ValueType = number | string> {
name: string;

View File

@@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApplicationCommandOptionType = void 0;
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type}
*/
var ApplicationCommandOptionType;
(function (ApplicationCommandOptionType) {

View File

@@ -1,6 +1,6 @@
import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
export interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
/**
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
*/
@@ -14,5 +14,4 @@ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithA
export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
focused?: boolean;
}
export {};
//# sourceMappingURL=string.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,UAAU,qCACT,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,gDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"}
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,+BAA+B,EAC/B,2DAA2D,EAC3D,4BAA4B,EAC5B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,WAAW,qCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,MAAM,CAAC;IAC5E;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,iCAAiC,GAAG,2DAA2D,CAC1G,qCAAqC,EACrC,iCAAiC,CAAC,MAAM,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,gDAChB,SAAQ,4BAA4B,CAAC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC;IACjF,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"}

View File

@@ -1,12 +1,13 @@
import type { InteractionType } from '../../responses';
import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput';
import type { APIApplicationCommandOptionBase } from './base';
import type { ApplicationCommandOptionType } from './shared';
export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
options?: APIApplicationCommandBasicOption[];
}
export interface APIApplicationCommandInteractionDataSubcommandOption {
export interface APIApplicationCommandInteractionDataSubcommandOption<Type extends InteractionType = InteractionType> {
name: string;
type: ApplicationCommandOptionType.Subcommand;
options?: APIApplicationCommandInteractionDataBasicOption[];
options?: APIApplicationCommandInteractionDataBasicOption<Type>[];
}
//# sourceMappingURL=subcommand.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"subcommand.d.ts","sourceRoot":"","sources":["subcommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,+CAA+C,EAAE,MAAM,cAAc,CAAC;AACtH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,qCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC;IAChF,OAAO,CAAC,EAAE,gCAAgC,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,oDAAoD;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,UAAU,CAAC;IAC9C,OAAO,CAAC,EAAE,+CAA+C,EAAE,CAAC;CAC5D"}
{"version":3,"file":"subcommand.d.ts","sourceRoot":"","sources":["subcommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,gCAAgC,EAAE,+CAA+C,EAAE,MAAM,cAAc,CAAC;AACtH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,qCAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,UAAU,CAAC;IAChF,OAAO,CAAC,EAAE,gCAAgC,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,oDAAoD,CAAC,IAAI,SAAS,eAAe,GAAG,eAAe;IACnH,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,UAAU,CAAC;IAC9C,OAAO,CAAC,EAAE,+CAA+C,CAAC,IAAI,CAAC,EAAE,CAAC;CAClE"}

View File

@@ -1,12 +1,13 @@
import type { InteractionType } from '../../responses';
import type { APIApplicationCommandOptionBase } from './base';
import type { ApplicationCommandOptionType } from './shared';
import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicationCommandSubcommandOption } from './subcommand';
export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
options?: APIApplicationCommandSubcommandOption[];
}
export interface APIApplicationCommandInteractionDataSubcommandGroupOption {
export interface APIApplicationCommandInteractionDataSubcommandGroupOption<Type extends InteractionType = InteractionType> {
name: string;
type: ApplicationCommandOptionType.SubcommandGroup;
options: APIApplicationCommandInteractionDataSubcommandOption[];
options: APIApplicationCommandInteractionDataSubcommandOption<Type>[];
}
//# sourceMappingURL=subcommandGroup.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"subcommandGroup.d.ts","sourceRoot":"","sources":["subcommandGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EACX,oDAAoD,EACpD,qCAAqC,EACrC,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,0CAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,eAAe,CAAC;IACrF,OAAO,CAAC,EAAE,qCAAqC,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,yDAAyD;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,eAAe,CAAC;IACnD,OAAO,EAAE,oDAAoD,EAAE,CAAC;CAChE"}
{"version":3,"file":"subcommandGroup.d.ts","sourceRoot":"","sources":["subcommandGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EACX,oDAAoD,EACpD,qCAAqC,EACrC,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,0CAChB,SAAQ,+BAA+B,CAAC,4BAA4B,CAAC,eAAe,CAAC;IACrF,OAAO,CAAC,EAAE,qCAAqC,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,yDAAyD,CACzE,IAAI,SAAS,eAAe,GAAG,eAAe;IAE9C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,4BAA4B,CAAC,eAAe,CAAC;IACnD,OAAO,EAAE,oDAAoD,CAAC,IAAI,CAAC,EAAE,CAAC;CACtE"}

View File

@@ -1,4 +1,4 @@
import type { APIInteractionDataResolved } from '../../index';
import type { APIInteractionDataResolved, InteractionType } from '../../index';
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base';
import type { APIApplicationCommandAttachmentOption, APIApplicationCommandInteractionDataAttachmentOption } from './_chatInput/attachment';
@@ -13,49 +13,56 @@ import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicati
import type { APIApplicationCommandInteractionDataSubcommandGroupOption, APIApplicationCommandSubcommandGroupOption } from './_chatInput/subcommandGroup';
import type { APIApplicationCommandInteractionDataUserOption, APIApplicationCommandUserOption } from './_chatInput/user';
import type { APIBaseApplicationCommandInteractionData } from './internals';
export * from './_chatInput/attachment';
export * from './_chatInput/base';
export * from './_chatInput/boolean';
export * from './_chatInput/channel';
export * from './_chatInput/integer';
export * from './_chatInput/mentionable';
export * from './_chatInput/number';
export * from './_chatInput/role';
export type * from './_chatInput/attachment';
export type * from './_chatInput/base';
export type * from './_chatInput/boolean';
export type * from './_chatInput/channel';
export type * from './_chatInput/integer';
export type * from './_chatInput/mentionable';
export type * from './_chatInput/number';
export type * from './_chatInput/role';
export * from './_chatInput/shared';
export * from './_chatInput/string';
export * from './_chatInput/subcommand';
export * from './_chatInput/subcommandGroup';
export * from './_chatInput/user';
export type * from './_chatInput/string';
export type * from './_chatInput/subcommand';
export type * from './_chatInput/subcommandGroup';
export type * from './_chatInput/user';
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure}
*/
export type APIApplicationCommandBasicOption = APIApplicationCommandAttachmentOption | APIApplicationCommandBooleanOption | APIApplicationCommandChannelOption | APIApplicationCommandIntegerOption | APIApplicationCommandMentionableOption | APIApplicationCommandNumberOption | APIApplicationCommandRoleOption | APIApplicationCommandStringOption | APIApplicationCommandUserOption;
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure}
*/
export type APIApplicationCommandOption = APIApplicationCommandBasicOption | APIApplicationCommandSubcommandGroupOption | APIApplicationCommandSubcommandOption;
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure}
*/
export type APIApplicationCommandInteractionDataOption = APIApplicationCommandInteractionDataBasicOption | APIApplicationCommandInteractionDataSubcommandGroupOption | APIApplicationCommandInteractionDataSubcommandOption;
export type APIApplicationCommandInteractionDataBasicOption = APIApplicationCommandInteractionDataAttachmentOption | APIApplicationCommandInteractionDataBooleanOption | APIApplicationCommandInteractionDataChannelOption | APIApplicationCommandInteractionDataIntegerOption | APIApplicationCommandInteractionDataMentionableOption | APIApplicationCommandInteractionDataNumberOption | APIApplicationCommandInteractionDataRoleOption | APIApplicationCommandInteractionDataStringOption | APIApplicationCommandInteractionDataUserOption;
export type APIApplicationCommandInteractionDataOption<Type extends InteractionType = InteractionType> = APIApplicationCommandInteractionDataBasicOption<Type> | APIApplicationCommandInteractionDataSubcommandGroupOption<Type> | APIApplicationCommandInteractionDataSubcommandOption<Type>;
export type APIApplicationCommandInteractionDataBasicOption<Type extends InteractionType = InteractionType> = APIApplicationCommandInteractionDataAttachmentOption | APIApplicationCommandInteractionDataBooleanOption | APIApplicationCommandInteractionDataChannelOption | APIApplicationCommandInteractionDataIntegerOption<Type> | APIApplicationCommandInteractionDataMentionableOption | APIApplicationCommandInteractionDataNumberOption<Type> | APIApplicationCommandInteractionDataRoleOption | APIApplicationCommandInteractionDataStringOption | APIApplicationCommandInteractionDataUserOption;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
options?: APIApplicationCommandInteractionDataOption[];
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[];
resolved?: APIInteractionDataResolved;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[];
resolved?: APIInteractionDataResolved;
}
/**
* @see {@link 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
* @see {@link 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
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIChatInputApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIChatInputApplicationCommandInteraction>;
//# sourceMappingURL=chatInput.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"chatInput.d.ts","sourceRoot":"","sources":["chat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BAA8B,CAAC,EAAE,CAAC;IACvG,QAAQ,CAAC,EAAE,0BAA0B,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,MAAM,yCAAyC,GACpD,uCAAuC,CAAC,6CAA6C,CAAC,CAAC;AAExF;;GAEG;AACH,MAAM,MAAM,2CAA2C,GACtD,uBAAuB,CAAC,yCAAyC,CAAC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,8CAA8C,GACzD,0BAA0B,CAAC,yCAAyC,CAAC,CAAC"}

View File

@@ -14,17 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./_chatInput/attachment"), exports);
__exportStar(require("./_chatInput/base"), exports);
__exportStar(require("./_chatInput/boolean"), exports);
__exportStar(require("./_chatInput/channel"), exports);
__exportStar(require("./_chatInput/integer"), exports);
__exportStar(require("./_chatInput/mentionable"), exports);
__exportStar(require("./_chatInput/number"), exports);
__exportStar(require("./_chatInput/role"), exports);
__exportStar(require("./_chatInput/shared"), exports);
__exportStar(require("./_chatInput/string"), exports);
__exportStar(require("./_chatInput/subcommand"), exports);
__exportStar(require("./_chatInput/subcommandGroup"), exports);
__exportStar(require("./_chatInput/user"), exports);
//# sourceMappingURL=chatInput.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"chatInput.js","sourceRoot":"","sources":["chatInput.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAiDA,0DAAwC;AACxC,oDAAkC;AAClC,uDAAqC;AACrC,uDAAqC;AACrC,uDAAqC;AACrC,2DAAyC;AACzC,sDAAoC;AACpC,oDAAkC;AAClC,sDAAoC;AACpC,sDAAoC;AACpC,0DAAwC;AACxC,+DAA6C;AAC7C,oDAAkC"}
{"version":3,"file":"chatInput.js","sourceRoot":"","sources":["chatInput.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAyDA,sDAAoC"}

View File

@@ -1,66 +1,66 @@
import type { Snowflake } from '../../../../globals';
import type { APIMessage } from '../../channel';
import type { APIMessage } from '../../message';
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIUserInteractionDataResolved } from '../base';
import type { APIBaseApplicationCommandInteractionData } from './internals';
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
target_id: Snowflake;
resolved: APIUserInteractionDataResolved;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
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
* @see {@link 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
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export type APIContextMenuInteractionData = APIMessageApplicationCommandInteractionData | APIUserApplicationCommandInteractionData;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link 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
* @see {@link 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
* @see {@link 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
* @see {@link 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
* @see {@link 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
* @see {@link 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
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIContextMenuInteraction = APIMessageApplicationCommandInteraction | APIUserApplicationCommandInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIContextMenuDMInteraction = APIMessageApplicationCommandDMInteraction | APIUserApplicationCommandDMInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIContextMenuGuildInteraction = APIMessageApplicationCommandGuildInteraction | APIUserApplicationCommandGuildInteraction;
//# sourceMappingURL=contextMenu.d.ts.map

View File

@@ -1,6 +1,6 @@
import type { Snowflake } from '../../../../globals';
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure}
*/
export interface APIGuildApplicationCommandPermissions {
/**
@@ -21,7 +21,7 @@ export interface APIGuildApplicationCommandPermissions {
permissions: APIApplicationCommandPermission[];
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure}
*/
export interface APIApplicationCommandPermission {
/**
@@ -38,7 +38,7 @@ export interface APIApplicationCommandPermission {
permission: boolean;
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type}
*/
export declare enum ApplicationCommandPermissionType {
Role = 1,
@@ -46,7 +46,7 @@ export declare enum ApplicationCommandPermissionType {
Channel = 3
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants}
*/
export declare const APIApplicationCommandPermissionsConstant: {
Everyone: (guildId: bigint | string) => Snowflake;

View File

@@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.APIApplicationCommandPermissionsConstant = exports.ApplicationCommandPermissionType = void 0;
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type}
*/
var ApplicationCommandPermissionType;
(function (ApplicationCommandPermissionType) {
@@ -11,7 +11,7 @@ var ApplicationCommandPermissionType;
ApplicationCommandPermissionType[ApplicationCommandPermissionType["Channel"] = 3] = "Channel";
})(ApplicationCommandPermissionType || (exports.ApplicationCommandPermissionType = ApplicationCommandPermissionType = {}));
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants}
*/
exports.APIApplicationCommandPermissionsConstant = {
// eslint-disable-next-line unicorn/prefer-native-coercion-functions

View File

@@ -2,13 +2,16 @@ import type { Permissions, Snowflake } from '../../../globals';
import type { LocalizationMap } from '../../../v10';
import type { APIApplicationCommandOption, APIChatInputApplicationCommandDMInteraction, APIChatInputApplicationCommandGuildInteraction, APIChatInputApplicationCommandInteraction, APIChatInputApplicationCommandInteractionData } from './_applicationCommands/chatInput';
import type { APIContextMenuDMInteraction, APIContextMenuGuildInteraction, APIContextMenuInteraction, APIContextMenuInteractionData } from './_applicationCommands/contextMenu';
import type { APIPrimaryEntryPointCommandDMInteraction, APIPrimaryEntryPointCommandGuildInteraction, APIPrimaryEntryPointCommandInteraction, APIPrimaryEntryPointCommandInteractionData } from './_applicationCommands/entryPoint';
import type { APIBaseInteraction } from './base';
import type { InteractionType } from './responses';
export * from './_applicationCommands/chatInput';
export * from './_applicationCommands/contextMenu';
export type * from './_applicationCommands/contextMenu';
export * from './_applicationCommands/permissions';
export type * from './_applicationCommands/entryPoint';
export type * from './_applicationCommands/internals';
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object}
*/
export interface APIApplicationCommand {
/**
@@ -61,6 +64,8 @@ export interface APIApplicationCommand {
default_member_permissions: Permissions | null;
/**
* Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible
*
* @deprecated Use {@link APIApplicationCommand.contexts} instead
*/
dm_permission?: boolean;
/**
@@ -68,44 +73,122 @@ export interface APIApplicationCommand {
*
* If missing, this property should be assumed as `true`
*
* @deprecated Use `dm_permission` and/or `default_member_permissions` instead
* @deprecated Use {@link APIApplicationCommand.dm_permission} and/or {@link APIApplicationCommand.default_member_permissions} instead
*/
default_permission?: boolean;
/**
* Indicates whether the command is age-restricted, defaults to `false`
* Indicates whether the command is age-restricted
*
* @defaultValue `false`
*/
nsfw?: boolean;
/**
* Installation context(s) where the command is available, only for globally-scoped commands
*
* @defaultValue `[ApplicationIntegrationType.GuildInstall]`
*/
integration_types?: ApplicationIntegrationType[];
/**
* Interaction context(s) where the command can be used, only for globally-scoped commands
*
* @defaultValue `[InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel]`
*/
contexts?: InteractionContextType[] | null;
/**
* Autoincrementing version identifier updated during substantial record changes
*/
version: Snowflake;
/**
* Determines whether the interaction is handled by the app's interactions handler or by Discord
*
* @remarks
* This is only available for {@link ApplicationCommandType.PrimaryEntryPoint} commands
*/
handler?: EntryPointCommandHandlerType;
}
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types}
*/
export declare enum ApplicationCommandType {
/**
* Slash commands; a text-based command that shows up when a user types `/`
*/
ChatInput = 1,
/**
* A UI-based command that shows up when you right click or tap on a user
*/
User = 2,
Message = 3
/**
* A UI-based command that shows up when you right click or tap on a message
*/
Message = 3,
/**
* A UI-based command that represents the primary way to invoke an app's Activity
*/
PrimaryEntryPoint = 4
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-integration-types}
*/
export type APIApplicationCommandInteractionData = APIChatInputApplicationCommandInteractionData | APIContextMenuInteractionData;
export declare enum ApplicationIntegrationType {
/**
* App is installable to servers
*/
GuildInstall = 0,
/**
* App is installable to users
*/
UserInstall = 1
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types}
*/
export declare enum InteractionContextType {
/**
* Interaction can be used within servers
*/
Guild = 0,
/**
* Interaction can be used within DMs with the app's bot user
*/
BotDM = 1,
/**
* Interaction can be used within Group DMs and DMs other than the app's bot user
*/
PrivateChannel = 2
}
/**
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types}
*/
export declare enum EntryPointCommandHandlerType {
/**
* The app handles the interaction using an interaction token
*/
AppHandler = 1,
/**
* Discord handles the interaction by launching an Activity and sending a follow-up message without coordinating with
* the app
*/
DiscordLaunchActivity = 2
}
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
*/
export type APIApplicationCommandInteractionData = APIChatInputApplicationCommandInteractionData | APIContextMenuInteractionData | APIPrimaryEntryPointCommandInteractionData;
/**
* @see {@link 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>, 'app_permissions' | 'channel_id' | 'channel' | 'data'>>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandInteraction = APIChatInputApplicationCommandInteraction | APIContextMenuInteraction;
export type APIApplicationCommandInteraction = APIChatInputApplicationCommandInteraction | APIContextMenuInteraction | APIPrimaryEntryPointCommandInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandDMInteraction = APIChatInputApplicationCommandDMInteraction | APIContextMenuDMInteraction;
export type APIApplicationCommandDMInteraction = APIChatInputApplicationCommandDMInteraction | APIContextMenuDMInteraction | APIPrimaryEntryPointCommandDMInteraction;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandGuildInteraction = APIChatInputApplicationCommandGuildInteraction | APIContextMenuGuildInteraction;
export type APIApplicationCommandGuildInteraction = APIChatInputApplicationCommandGuildInteraction | APIContextMenuGuildInteraction | APIPrimaryEntryPointCommandGuildInteraction;
//# sourceMappingURL=applicationCommands.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"applicationCommands.d.ts","sourceRoot":"","sources":["applicationCommands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EACX,2BAA2B,EAC3B,2CAA2C,EAC3C,8CAA8C,EAC9C,yCAAyC,EACzC,6CAA6C,EAC7C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EACX,2BAA2B,EAC3B,8BAA8B,EAC9B,yBAAyB,EACzB,6BAA6B,EAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,sBAAsB,CAAC;IAC7B;;OAEG;IACH,cAAc,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,kBAAkB,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC5C;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,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,YAAY,GAAG,SAAS,GAAG,MAAM,CACrD,CACD,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,gCAAgC,GACzC,yCAAyC,GACzC,yBAAyB,GACzB,sCAAsC,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAC3C,2CAA2C,GAC3C,2BAA2B,GAC3B,wCAAwC,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAC9C,8CAA8C,GAC9C,8BAA8B,GAC9B,2CAA2C,CAAC"}

View File

@@ -14,17 +14,76 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApplicationCommandType = void 0;
exports.EntryPointCommandHandlerType = exports.InteractionContextType = exports.ApplicationIntegrationType = exports.ApplicationCommandType = void 0;
__exportStar(require("./_applicationCommands/chatInput"), exports);
__exportStar(require("./_applicationCommands/contextMenu"), exports);
__exportStar(require("./_applicationCommands/permissions"), exports);
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types}
*/
var ApplicationCommandType;
(function (ApplicationCommandType) {
/**
* Slash commands; a text-based command that shows up when a user types `/`
*/
ApplicationCommandType[ApplicationCommandType["ChatInput"] = 1] = "ChatInput";
/**
* A UI-based command that shows up when you right click or tap on a user
*/
ApplicationCommandType[ApplicationCommandType["User"] = 2] = "User";
/**
* A UI-based command that shows up when you right click or tap on a message
*/
ApplicationCommandType[ApplicationCommandType["Message"] = 3] = "Message";
/**
* A UI-based command that represents the primary way to invoke an app's Activity
*/
ApplicationCommandType[ApplicationCommandType["PrimaryEntryPoint"] = 4] = "PrimaryEntryPoint";
})(ApplicationCommandType || (exports.ApplicationCommandType = ApplicationCommandType = {}));
/**
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-integration-types}
*/
var ApplicationIntegrationType;
(function (ApplicationIntegrationType) {
/**
* App is installable to servers
*/
ApplicationIntegrationType[ApplicationIntegrationType["GuildInstall"] = 0] = "GuildInstall";
/**
* App is installable to users
*/
ApplicationIntegrationType[ApplicationIntegrationType["UserInstall"] = 1] = "UserInstall";
})(ApplicationIntegrationType || (exports.ApplicationIntegrationType = ApplicationIntegrationType = {}));
/**
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types}
*/
var InteractionContextType;
(function (InteractionContextType) {
/**
* Interaction can be used within servers
*/
InteractionContextType[InteractionContextType["Guild"] = 0] = "Guild";
/**
* Interaction can be used within DMs with the app's bot user
*/
InteractionContextType[InteractionContextType["BotDM"] = 1] = "BotDM";
/**
* Interaction can be used within Group DMs and DMs other than the app's bot user
*/
InteractionContextType[InteractionContextType["PrivateChannel"] = 2] = "PrivateChannel";
})(InteractionContextType || (exports.InteractionContextType = InteractionContextType = {}));
/**
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types}
*/
var EntryPointCommandHandlerType;
(function (EntryPointCommandHandlerType) {
/**
* The app handles the interaction using an interaction token
*/
EntryPointCommandHandlerType[EntryPointCommandHandlerType["AppHandler"] = 1] = "AppHandler";
/**
* Discord handles the interaction by launching an Activity and sending a follow-up message without coordinating with
* the app
*/
EntryPointCommandHandlerType[EntryPointCommandHandlerType["DiscordLaunchActivity"] = 2] = "DiscordLaunchActivity";
})(EntryPointCommandHandlerType || (exports.EntryPointCommandHandlerType = EntryPointCommandHandlerType = {}));
//# sourceMappingURL=applicationCommands.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"applicationCommands.js","sourceRoot":"","sources":["applicationCommands.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkBA,mEAAiD;AACjD,qEAAmD;AACnD,qEAAmD;AA4EnD;;GAEG;AACH,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IACjC,6EAAa,CAAA;IACb,mEAAI,CAAA;IACJ,yEAAO,CAAA;AACR,CAAC,EAJW,sBAAsB,sCAAtB,sBAAsB,QAIjC"}
{"version":3,"file":"applicationCommands.js","sourceRoot":"","sources":["applicationCommands.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAwBA,mEAAiD;AAEjD,qEAAmD;AAqGnD;;GAEG;AACH,IAAY,sBAiBX;AAjBD,WAAY,sBAAsB;IACjC;;OAEG;IACH,6EAAa,CAAA;IACb;;OAEG;IACH,mEAAI,CAAA;IACJ;;OAEG;IACH,yEAAO,CAAA;IACP;;OAEG;IACH,6FAAiB,CAAA;AAClB,CAAC,EAjBW,sBAAsB,sCAAtB,sBAAsB,QAiBjC;AAED;;GAEG;AACH,IAAY,0BASX;AATD,WAAY,0BAA0B;IACrC;;OAEG;IACH,2FAAY,CAAA;IACZ;;OAEG;IACH,yFAAW,CAAA;AACZ,CAAC,EATW,0BAA0B,0CAA1B,0BAA0B,QASrC;AAED;;GAEG;AACH,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IACjC;;OAEG;IACH,qEAAK,CAAA;IACL;;OAEG;IACH,qEAAK,CAAA;IACL;;OAEG;IACH,uFAAc,CAAA;AACf,CAAC,EAbW,sBAAsB,sCAAtB,sBAAsB,QAajC;AAED;;GAEG;AACH,IAAY,4BAUX;AAVD,WAAY,4BAA4B;IACvC;;OAEG;IACH,2FAAc,CAAA;IACd;;;OAGG;IACH,iHAAqB,CAAA;AACtB,CAAC,EAVW,4BAA4B,4CAA5B,4BAA4B,QAUvC"}

View File

@@ -1,11 +1,11 @@
import type { APIBaseInteraction, APIChatInputApplicationCommandInteractionData, APIDMInteractionWrapper, APIGuildInteractionWrapper, InteractionType } from '../index';
export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>>, 'data'>>;
import type { APIBaseInteraction, APIAutocompleteApplicationCommandInteractionData, APIDMInteractionWrapper, APIGuildInteractionWrapper, InteractionType } from '../index';
export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIAutocompleteApplicationCommandInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, Required<Pick<APIAutocompleteApplicationCommandInteractionData, 'options'>>>, 'data'>>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link 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
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIApplicationCommandAutocompleteGuildInteraction = APIGuildInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
//# sourceMappingURL=autocomplete.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAClB,6CAA6C,EAC7C,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,4CAA4C,GAAG,kBAAkB,CAC5E,eAAe,CAAC,8BAA8B,EAC9C,6CAA6C,CAC7C,GACA,QAAQ,CACP,IAAI,CACH,kBAAkB,CACjB,eAAe,CAAC,8BAA8B,EAC9C,QAAQ,CAAC,IAAI,CAAC,6CAA6C,EAAE,SAAS,CAAC,CAAC,CACxE,EACD,MAAM,CACN,CACD,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,8CAA8C,GACzD,uBAAuB,CAAC,4CAA4C,CAAC,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAC5D,0BAA0B,CAAC,4CAA4C,CAAC,CAAC"}
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["autocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kBAAkB,EAClB,gDAAgD,EAChD,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,4CAA4C,GAAG,kBAAkB,CAC5E,eAAe,CAAC,8BAA8B,EAC9C,gDAAgD,CAChD,GACA,QAAQ,CACP,IAAI,CACH,kBAAkB,CACjB,eAAe,CAAC,8BAA8B,EAC9C,QAAQ,CAAC,IAAI,CAAC,gDAAgD,EAAE,SAAS,CAAC,CAAC,CAC3E,EACD,MAAM,CACN,CACD,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,8CAA8C,GACzD,uBAAuB,CAAC,4CAA4C,CAAC,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,iDAAiD,GAC5D,0BAA0B,CAAC,4CAA4C,CAAC,CAAC"}

View File

@@ -1,13 +1,72 @@
import type { Permissions, Snowflake } from '../../../globals';
import type { APIRole, LocaleString } from '../../../v10';
import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadChannel, ChannelType, ThreadChannelType } from '../channel';
import type { APIGuildMember } from '../guild';
import type { APIRole, ApplicationIntegrationType, InteractionContextType, Locale } from '../../../v10';
import type { APIChannel, APIPartialChannel, APIThreadChannel, ChannelType, ThreadChannelType } from '../channel';
import type { APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined, APIPartialInteractionGuild } from '../guild';
import type { APIAttachment, APIMessage } from '../message';
import type { APIEntitlement } from '../monetization';
import type { APIUser } from '../user';
import type { InteractionType } from './responses';
/**
* @see {@link https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object}
*/
export type APIMessageInteractionMetadata = APIApplicationCommandInteractionMetadata | APIMessageComponentInteractionMetadata | APIModalSubmitInteractionMetadata;
export interface APIBaseInteractionMetadata<Type extends InteractionType> {
/**
* ID of the interaction
*/
id: Snowflake;
/**
* Type of interaction
*/
type: Type;
/**
* User who triggered the interaction
*/
user: APIUser;
/**
* IDs for installation context(s) related to an interaction
*/
authorizing_integration_owners: APIAuthorizingIntegrationOwnersMap;
/**
* ID of the original response message, present only on follow-up messages
*/
original_response_message_id?: Snowflake;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure}
*/
export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
/**
* The user the command was run on, present only on user commands interactions
*/
target_user?: APIUser;
/**
* The ID of the message the command was run on, present only on message command interactions.
* The original response message will also have `message_reference` and `referenced_message` pointing to this message.
*/
target_message_id?: Snowflake;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure}
*/
export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
/**
* ID of the message that contained the interactive component
*/
interacted_message_id: Snowflake;
}
/**
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-modal-submit-interaction-metadata-structure}
*/
export interface APIModalSubmitInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ModalSubmit> {
/**
* Metadata for the interaction that was used to open the modal
*/
triggering_interaction_metadata: APIApplicationCommandInteractionMetadata | APIMessageComponentInteractionMetadata;
}
export type PartialAPIMessageInteractionGuildMember = Pick<APIGuildMember, 'avatar' | 'communication_disabled_until' | 'deaf' | 'joined_at' | 'mute' | 'nick' | 'pending' | 'premium_since' | 'roles'>;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object}
*/
export interface APIMessageInteraction {
/**
@@ -32,14 +91,14 @@ export interface APIMessageInteraction {
member?: PartialAPIMessageInteractionGuildMember;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIInteractionGuildMember extends APIGuildMember {
permissions: Permissions;
user: APIUser;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export interface APIBaseInteraction<Type extends InteractionType, Data> {
/**
@@ -59,7 +118,11 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
*/
data?: Data;
/**
* The guild it was sent from
* Guild that the interaction was sent from
*/
guild?: APIPartialInteractionGuild;
/**
* Guild that the interaction was sent from
*/
guild_id?: Snowflake;
/**
@@ -69,7 +132,7 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
/**
* The id of the channel it was sent from
*
* @deprecated Use {@apilink APIBaseInteraction#channel} instead
* @deprecated Use {@link APIBaseInteraction.channel} instead
*/
channel_id?: Snowflake;
/**
@@ -97,20 +160,35 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
/**
* Bitwise set of permissions the app or bot has within the channel the interaction was sent from
*/
app_permissions?: Permissions;
app_permissions: Permissions;
/**
* The selected language of the invoking user
*/
locale: LocaleString;
locale: Locale;
/**
* The guild's preferred locale, if invoked in a guild
*/
guild_locale?: LocaleString;
guild_locale?: Locale;
/**
* For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
*/
entitlements: APIEntitlement[];
/**
* Mapping of installation contexts that the interaction was authorized for to related user or guild IDs.
*/
authorizing_integration_owners: APIAuthorizingIntegrationOwnersMap;
/**
* Context where the interaction was triggered from
*/
context?: InteractionContextType;
/**
* Attachment size limit in bytes
*/
attachment_size_limit: number;
}
export type APIAuthorizingIntegrationOwnersMap = {
[key in ApplicationIntegrationType]?: Snowflake;
};
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<Original, 'guild_id' | 'member'> & Required<Pick<Original, 'user'>>;
export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<Original, 'user'> & Required<Pick<Original, 'guild_id' | 'member'>>;
export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> extends Required<APIPartialChannel> {
@@ -118,17 +196,17 @@ export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> ex
permissions: Permissions;
}
/**
* https://discord.com/developers/docs/resources/channel#channel-object
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object}
*/
export type APIInteractionDataResolvedChannel = APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>> | (APIInteractionDataResolvedChannelBase<ThreadChannelType> & Pick<APIThreadChannel, 'parent_id' | 'thread_metadata'>);
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'deaf' | 'mute' | 'user'> {
export interface APIInteractionDataResolvedGuildMember extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined {
permissions: Permissions;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
*/
export interface APIInteractionDataResolved {
users?: Record<Snowflake, APIUser>;

View File

@@ -1 +1 @@
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EACX,aAAa,EACb,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,O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C;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,qCAAqC,CAAC,CAAC;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,iCAAiC,CAAC,CAAC;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,MAAM,qDAAqD,GAAG,0BAA0B,CAAC;AAE/F;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAAC,0BAA0B,EAAE,SAAS,CAAC,GACvF,QAAQ,CAAC,IAAI,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,gDAAgD,GAAG,8BAA8B,CAAC"}

View File

@@ -1,6 +1,6 @@
import type { Snowflake } from '../../../globals';
import type { ComponentType } from '../channel';
import type { APIBaseInteraction, InteractionType } from '../interactions';
import type { ComponentType } from '../message';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIInteractionDataResolved, APIUserInteractionDataResolved } from './base';
export type APIMessageComponentInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageComponentInteractionData>, 'app_permissions' | 'channel_id' | 'channel' | 'data' | 'message'>>;
export type APIMessageComponentButtonInteraction = APIBaseInteraction<InteractionType.MessageComponent, APIMessageButtonInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.MessageComponent, APIMessageButtonInteractionData>, 'app_permissions' | 'channel_id' | 'channel' | 'data' | 'message'>>;

View File

@@ -1 +1 @@
{"version":3,"file":"messageComponents.d.ts","sourceRoot":"","sources":["messageComponents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,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C,aAAa,CAAC,MAAM,CAAC,CAAC;AAE3G,MAAM,WAAW,qCAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,YAAY,CAAC;IAC1E,MAAM,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,mCAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,UAAU,CAAC;IACxE,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,8BAA8B,CAAC;CACzC;AAED,MAAM,WAAW,mCAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,UAAU,CAAC;IACxE,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC,CAAC;CAC9D;AAED,MAAM,WAAW,0CAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,iBAAiB,CAAC;IAC/E,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,IAAI,CAAC,0BAA0B,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC,CAAC;CAC1E;AAED,MAAM,WAAW,sCAChB,SAAQ,sCAAsC,CAAC,aAAa,CAAC,aAAa,CAAC;IAC3E,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAAC,CAAC;CACjE;AAED,MAAM,MAAM,mCAAmC,GAC5C,sCAAsC,GACtC,0CAA0C,GAC1C,mCAAmC,GACnC,qCAAqC,GACrC,mCAAmC,CAAC;AAEvC,MAAM,MAAM,gCAAgC,GAAG,uBAAuB,CAAC,8BAA8B,CAAC,CAAC;AAEvG,MAAM,MAAM,mCAAmC,GAAG,0BAA0B,CAAC,8BAA8B,CAAC,CAAC"}

View File

@@ -1,17 +1,49 @@
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel';
import type { APIBaseInteraction, APIDMInteractionWrapper, APIGuildInteractionWrapper, ComponentType, InteractionType } from '../index';
export interface ModalSubmitComponent {
type: ComponentType;
import type { APIBaseInteraction, APIDMInteractionWrapper, APIGuildInteractionWrapper, APIInteractionDataResolved, ComponentType, InteractionType } from '../index';
import type { APIBaseComponent } from '../message';
export interface APIBaseModalSubmitComponent<T extends ComponentType> extends APIBaseComponent<T> {
custom_id: string;
}
export interface APIModalSubmitTextInputComponent extends APIBaseModalSubmitComponent<ComponentType.TextInput> {
value: string;
}
export interface ModalSubmitActionRowComponent extends Omit<APIActionRowComponent<APIModalActionRowComponent>, 'components'> {
components: ModalSubmitComponent[];
export interface APIModalSubmitStringSelectComponent extends APIBaseModalSubmitComponent<ComponentType.StringSelect> {
values: string[];
}
export interface APIModalSubmitUserSelectComponent extends APIBaseModalSubmitComponent<ComponentType.UserSelect> {
values: string[];
}
export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitComponent<ComponentType.RoleSelect> {
values: string[];
}
export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
values: string[];
}
export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmitComponent<ComponentType.ChannelSelect> {
values: string[];
}
export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitComponent<ComponentType.FileUpload> {
values: string[];
}
export type ModalSubmitComponent = APIModalSubmitChannelSelectComponent | APIModalSubmitFileUploadComponent | APIModalSubmitMentionableSelectComponent | APIModalSubmitRoleSelectComponent | APIModalSubmitStringSelectComponent | APIModalSubmitTextInputComponent | APIModalSubmitUserSelectComponent;
export interface ModalSubmitActionRowComponent extends APIBaseComponent<ComponentType.ActionRow> {
components: APIModalSubmitTextInputComponent[];
}
export interface ModalSubmitTextDisplayComponent extends APIBaseComponent<ComponentType.TextDisplay> {
}
export interface ModalSubmitLabelComponent extends APIBaseComponent<ComponentType.Label> {
component: ModalSubmitComponent;
}
export type APIModalSubmissionComponent = ModalSubmitActionRowComponent | ModalSubmitLabelComponent | ModalSubmitTextDisplayComponent;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure}
*/
export interface APIModalSubmission {
/**
* Data for users, members, channels, and roles in the modal's auto-populated select menus
*
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
*/
resolved?: APIInteractionDataResolved;
/**
* A developer-defined identifier for the component, max 100 characters
*/
@@ -19,18 +51,18 @@ export interface APIModalSubmission {
/**
* A list of child components
*/
components: ModalSubmitActionRowComponent[];
components: APIModalSubmissionComponent[];
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
* @see {@link 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
* @see {@link 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
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
*/
export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>;
//# sourceMappingURL=modalSubmit.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"modalSubmit.d.ts","sourceRoot":"","sources":["modalSubmit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,KAAK,EACX,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,aAAa,EACb,eAAe,EACf,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,oBAAoB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kB;IAClC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,0BAA0B,CAAC;IACtC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,2BAA2B,EAAE,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,GAC1G,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,uBAAuB,CAAC,yBAAyB,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,0BAA0B,CAAC,yBAAyB,CAAC,CAAC"}

View File

@@ -1,9 +1,8 @@
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v10';
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel';
import type { MessageFlags } from '../index';
import type { APIActionRowComponent, APIComponentInModalActionRow, APILabelComponent, APITextDisplayComponent } from '../message';
import type { APIApplicationCommandOptionChoice } from './applicationCommands';
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type}
*/
export declare enum InteractionType {
Ping = 1,
@@ -13,9 +12,9 @@ export declare enum InteractionType {
ModalSubmit = 5
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object}
*/
export type APIInteractionResponse = APIApplicationCommandAutocompleteResponse | APIInteractionResponseChannelMessageWithSource | APIInteractionResponseDeferredChannelMessageWithSource | APIInteractionResponseDeferredMessageUpdate | APIInteractionResponsePong | APIInteractionResponseUpdateMessage | APIModalInteractionResponse | APIPremiumRequiredInteractionResponse;
export type APIInteractionResponse = APIApplicationCommandAutocompleteResponse | APIInteractionResponseChannelMessageWithSource | APIInteractionResponseDeferredChannelMessageWithSource | APIInteractionResponseDeferredMessageUpdate | APIInteractionResponseLaunchActivity | APIInteractionResponsePong | APIInteractionResponseUpdateMessage | APIModalInteractionResponse | APIPremiumRequiredInteractionResponse;
export interface APIInteractionResponsePong {
type: InteractionResponseType.Pong;
}
@@ -45,8 +44,11 @@ export interface APIInteractionResponseUpdateMessage {
type: InteractionResponseType.UpdateMessage;
data?: APIInteractionResponseCallbackData;
}
export interface APIInteractionResponseLaunchActivity {
type: InteractionResponseType.LaunchActivity;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type}
*/
export declare enum InteractionResponseType {
/**
@@ -79,20 +81,29 @@ export declare enum InteractionResponseType {
Modal = 9,
/**
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
*
* @deprecated Send a button with Premium type instead.
* {@link https://discord.com/developers/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes | Learn more here}
*/
PremiumRequired = 10
PremiumRequired = 10,
/**
* Launch the Activity associated with the app.
*
* @remarks
* Only available for apps with Activities enabled
*/
LaunchActivity = 12
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure}
*/
export type APIInteractionResponseCallbackData = Omit<RESTPostAPIWebhookWithTokenJSONBody, 'avatar_url' | 'username'> & {
flags?: MessageFlags;
};
export type APIInteractionResponseCallbackData = Omit<RESTPostAPIWebhookWithTokenJSONBody, 'avatar_url' | 'username'>;
export interface APICommandAutocompleteInteractionResponseCallbackData {
choices?: APIApplicationCommandOptionChoice[];
}
export type APIModalInteractionResponseCallbackComponent = APIActionRowComponent<APIComponentInModalActionRow> | APILabelComponent | APITextDisplayComponent;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal}
*/
export interface APIModalInteractionResponseCallbackData {
/**
@@ -105,7 +116,9 @@ export interface APIModalInteractionResponseCallbackData {
title: string;
/**
* Between 1 and 5 (inclusive) components that make up the modal
*
* @remarks Using action rows inside modals is deprecated.
*/
components: APIActionRowComponent<APIModalActionRowComponent>[];
components: APIModalInteractionResponseCallbackComponent[];
}
//# sourceMappingURL=responses.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["responses.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,KAAK,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AAE/E;;GAEG;AACH,oBAAY,eAAe;IAC1B,IAAI,IAAI;IACR,kBAAkB,IAAA;IAClB,gBAAgB,IAAA;IAChB,8BAA8B,IAAA;IAC9B,WAAW,IAAA;CACX;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAC/B,yCAAyC,GACzC,8CAA8C,GAC9C,sDAAsD,GACtD,2CAA2C,GAC3C,0BAA0B,GAC1B,mCAAmC,GACnC,2BAA2B,GAC3B,qCAAqC,CAAC;AAEzC,MAAM,WAAW,0BAA0B;IAC1C,IAAI,EAAE,uBAAuB,CAAC,IAAI,CAAC;CACnC;AAED,MAAM,WAAW,yCAAyC;IACzD,IAAI,EAAE,uBAAuB,CAAC,oCAAoC,CAAC;IACnE,IAAI,EAAE,qDAAqD,CAAC;CAC5D;AAED,MAAM,WAAW,2BAA2B;IAC3C,IAAI,EAAE,uBAAuB,CAAC,KAAK,CAAC;IACpC,IAAI,E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AAkC,EAAE,OAAO,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,2CAA2C;IAC3D,IAAI,EAAE,uBAAuB,CAAC,qBAAqB,CAAC;CACpD;AAED,MAAM,WAAW,mCAAmC;IACnD,IAAI,EAAE,uBAAuB,CAAC,aAAa,CAAC;IAC5C,IAAI,CAAC,EAAE,kCAAkC,CAAC;CAC1C;AAED,MAAM,WAAW,oCAAoC;IACpD,IAAI,EAAE,uBAAuB,CAAC,cAAc,CAAC;CAC7C;AAED;;GAEG;AACH,oBAAY,uBAAuB;IAClC;;OAEG;IACH,IAAI,IAAI;IACR;;OAEG;IACH,wBAAwB,IAAI;IAC5B;;OAEG;IACH,gCAAgC,IAAA;IAChC;;OAEG;IACH,qBAAqB,IAAA;IACrB;;OAEG;IACH,aAAa,IAAA;IACb;;OAEG;IACH,oCAAoC,IAAA;IACpC;;OAEG;IACH,KAAK,IAAA;IACL;;;;;OAKG;IACH,eAAe,KAAA;IAEf;;;;;OAKG;IACH,cAAc,KAAK;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG,IAAI,CAAC,mCAAmC,EAAE,YAAY,GAAG,UAAU,CAAC,CAAC;AAEtH,MAAM,WAAW,qDAAqD;IACrE,OAAO,CAAC,EAAE,iCAAiC,EAAE,CAAC;CAC9C;AAED,MAAM,MAAM,4CAA4C,GACrD,qBAAqB,CAAC,4BAA4B,CAAC,GACnD,iBAAiB,GACjB,uBAAuB,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACvD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,UAAU,EAAE,4CAA4C,EAAE,CAAC;CAC3D"}

View File

@@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.InteractionResponseType = exports.InteractionType = void 0;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type}
*/
var InteractionType;
(function (InteractionType) {
@@ -13,7 +13,7 @@ var InteractionType;
InteractionType[InteractionType["ModalSubmit"] = 5] = "ModalSubmit";
})(InteractionType || (exports.InteractionType = InteractionType = {}));
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type}
*/
var InteractionResponseType;
(function (InteractionResponseType) {
@@ -47,7 +47,17 @@ var InteractionResponseType;
InteractionResponseType[InteractionResponseType["Modal"] = 9] = "Modal";
/**
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
*
* @deprecated Send a button with Premium type instead.
* {@link https://discord.com/developers/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes | Learn more here}
*/
InteractionResponseType[InteractionResponseType["PremiumRequired"] = 10] = "PremiumRequired";
/**
* Launch the Activity associated with the app.
*
* @remarks
* Only available for apps with Activities enabled
*/
InteractionResponseType[InteractionResponseType["LaunchActivity"] = 12] = "LaunchActivity";
})(InteractionResponseType || (exports.InteractionResponseType = InteractionResponseType = {}));
//# sourceMappingURL=responses.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"responses.js","sourceRoot":"","sources":["responses.ts"],"names":[],"mappings":";;;AAKA;;GAEG;AACH,IAAY,eAMX;AAND,WAAY,eAAe;IAC1B,qDAAQ,CAAA;IACR,iFAAkB,CAAA;IAClB,6EAAgB,CAAA;IAChB,yGAA8B,CAAA;IAC9B,mEAAW,CAAA;AACZ,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B;AAoDD;;GAEG;AACH,IAAY,uBAiCX;AAjCD,WAAY,uBAAuB;IAClC;;OAEG;IACH,qEAAQ,CAAA;IACR;;OAEG;IACH,6GAA4B,CAAA;IAC5B;;OAEG;IACH,6HAAgC,CAAA;IAChC;;OAEG;IACH,uGAAqB,CAAA;IACrB;;OAEG;IACH,uFAAa,CAAA;IACb;;OAEG;IACH,qIAAoC,CAAA;IACpC;;OAEG;IACH,uEAAK,CAAA;IACL;;OAEG;IACH,4FAAe,CAAA;AAChB,CAAC,EAjCW,uBAAuB,uCAAvB,uBAAuB,QAiClC"}
{"version":3,"file":"responses.js","sourceRoot":"","sources":["responses.ts"],"names":[],"mappings":";;;AASA;;GAEG;AACH,IAAY,eAMX;AAND,WAAY,eAAe;IAC1B,qDAAQ,CAAA;IACR,iFAAkB,CAAA;IAClB,6EAAgB,CAAA;IAChB,yGAA8B,CAAA;IAC9B,mEAAW,CAAA;AACZ,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B;AAyDD;;GAEG;AACH,IAAY,uBA4CX;AA5CD,WAAY,uBAAuB;IAClC;;OAEG;IACH,qEAAQ,CAAA;IACR;;OAEG;IACH,6GAA4B,CAAA;IAC5B;;OAEG;IACH,6HAAgC,CAAA;IAChC;;OAEG;IACH,uGAAqB,CAAA;IACrB;;OAEG;IACH,uFAAa,CAAA;IACb;;OAEG;IACH,qIAAoC,CAAA;IACpC;;OAEG;IACH,uEAAK,CAAA;IACL;;;;;OAKG;IACH,4FAAe,CAAA;IAEf;;;;;OAKG;IACH,0FAAmB,CAAA;AACpB,CAAC,EA5CW,uBAAuB,uCAAvB,uBAAuB,QA4ClC"}

View File

@@ -4,11 +4,13 @@
import type { Permissions, Snowflake } from '../../globals';
import type { LocalizationMap } from '../common';
import type { APIPartialGuild } from './guild';
import type { ApplicationIntegrationType } from './interactions';
import type { OAuth2Scopes } from './oauth2';
import type { APITeam } from './teams';
import type { APIUser } from './user';
import type { ApplicationWebhookEventType } from './webhook';
/**
* https://discord.com/developers/docs/resources/application#application-object
* @see {@link https://discord.com/developers/docs/resources/application#application-object}
*/
export interface APIApplication {
/**
@@ -54,25 +56,26 @@ export interface APIApplication {
/**
* Partial user object containing info on the owner of the application
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
owner?: APIUser;
/**
* An empty string
*
* @deprecated This field will be removed in v11
* @unstable This field is no longer documented by Discord and 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#getticket
* @see {@link https://discord.com/developers/docs/game-sdk/applications#getticket}
*/
verify_key: string;
/**
* The team this application belongs to
*
* See https://discord.com/developers/docs/topics/teams#data-models-team-object
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-object}
*/
team: APITeam | null;
/**
@@ -98,13 +101,21 @@ export interface APIApplication {
/**
* The application's public flags
*
* See https://discord.com/developers/docs/resources/application#application-object-application-flags
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags}
*/
flags: ApplicationFlags;
/**
* Approximate count of guilds the application has been added to
*/
approximate_guild_count?: number;
/**
* Approximate count of users that have installed the app (authorized with `application.commands` as a scope)
*/
approximate_user_install_count?: number;
/**
* Approximate count of users that have OAuth2 authorizations for the app
*/
approximate_user_authorization_count?: number;
/**
* Array of redirect URIs for the application
*/
@@ -112,12 +123,12 @@ export interface APIApplication {
/**
* The interactions endpoint URL for the application
*/
interactions_endpoint_url?: string;
interactions_endpoint_url?: string | null;
/**
* The application's role connection verification entry point,
* which when configured will render the app as a verification method in the guild role verification configuration
*/
role_connections_verification_url?: string;
role_connections_verification_url?: string | null;
/**
* Up to 5 tags of max 20 characters each describing the content and functionality of the application
*/
@@ -126,17 +137,39 @@ export interface APIApplication {
* Settings for the application's default in-app authorization link, if enabled
*/
install_params?: APIApplicationInstallParams;
/**
* Default scopes and permissions for each supported installation context. Value for each key is an integration type configuration object
*/
integration_types_config?: APIApplicationIntegrationTypesConfigMap;
/**
* The application's default custom authorization link, if enabled
*/
custom_install_url?: string;
/**
* Event webhook URL for the app to receive webhook events
*/
event_webhooks_url?: string | null;
/**
* If webhook events are enabled for the app
*/
event_webhooks_status: ApplicationWebhookEventStatus;
/**
* List of webhook event types the app subscribes to
*/
event_webhooks_types?: ApplicationWebhookEventType[];
}
export interface APIApplicationInstallParams {
scopes: OAuth2Scopes[];
permissions: Permissions;
}
export interface APIApplicationIntegrationTypeConfiguration {
oauth2_install_params?: APIApplicationInstallParams;
}
export type APIApplicationIntegrationTypesConfigMap = {
[key in ApplicationIntegrationType]?: APIApplicationIntegrationTypeConfiguration;
};
/**
* https://discord.com/developers/docs/resources/application#application-object-application-flags
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags}
*/
export declare enum ApplicationFlags {
/**
@@ -173,12 +206,14 @@ export declare enum ApplicationFlags {
GatewayPresenceLimited = 8192,
/**
* Intent required for bots in 100 or more servers to receive member-related events like `guild_member_add`.
* See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
*
* @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`}
*/
GatewayGuildMembers = 16384,
/**
* Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found in Bot Settings.
* See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
*
* @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`}
*/
GatewayGuildMembersLimited = 32768,
/**
@@ -190,11 +225,11 @@ export declare enum ApplicationFlags {
*/
Embedded = 131072,
/**
* Intent required for bots in 100 or more servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055)
* Intent required for bots in 100 or more servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content}
*/
GatewayMessageContent = 262144,
/**
* Intent required for bots in under 100 servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055),
* Intent required for bots in under 100 servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content},
* found in Bot Settings
*/
GatewayMessageContentLimited = 524288,
@@ -203,12 +238,12 @@ export declare enum ApplicationFlags {
*/
EmbeddedFirstParty = 1048576,
/**
* Indicates if an app has registered global [application commands](https://discord.com/developers/docs/interactions/application-commands)
* Indicates if an app has registered global {@link https://discord.com/developers/docs/interactions/application-commands | application commands}
*/
ApplicationCommandBadge = 8388608
}
/**
* https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-structure
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-structure}
*/
export interface APIApplicationRoleConnectionMetadata {
/**
@@ -237,7 +272,7 @@ export interface APIApplicationRoleConnectionMetadata {
description_localizations?: LocalizationMap;
}
/**
* https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type}
*/
export declare enum ApplicationRoleConnectionMetadataType {
/**
@@ -273,4 +308,21 @@ export declare enum ApplicationRoleConnectionMetadataType {
*/
BooleanNotEqual = 8
}
/**
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status}
*/
export declare enum ApplicationWebhookEventStatus {
/**
* Webhook events are disabled by developer
*/
Disabled = 1,
/**
* Webhook events are enabled by developer
*/
Enabled = 2,
/**
* Webhook events are disabled by Discord, usually due to inactivity
*/
DisabledByDiscord = 3
}
//# sourceMappingURL=application.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,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E,eAAe,CAAC;CAC5C;AAED;;GAEG;AACH,oBAAY,qCAAqC;IAChD;;OAEG;IACH,sBAAsB,IAAI;IAC1B;;OAEG;IACH,yBAAyB,IAAA;IACzB;;OAEG;IACH,YAAY,IAAA;IACZ;;OAEG;IACH,eAAe,IAAA;IACf;;OAEG;IACH,uBAAuB,IAAA;IACvB;;OAEG;IACH,0BAA0B,IAAA;IAC1B;;OAEG;IACH,YAAY,IAAA;IACZ;;OAEG;IACH,eAAe,IAAA;CACf;AAED;;GAEG;AACH,oBAAY,6BAA6B;IACxC;;OAEG;IACH,QAAQ,IAAI;IACZ;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,iBAAiB,IAAA;CACjB"}

View File

@@ -3,9 +3,9 @@
* Types extracted from https://discord.com/developers/docs/resources/application
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = void 0;
exports.ApplicationWebhookEventStatus = exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = void 0;
/**
* https://discord.com/developers/docs/resources/application#application-object-application-flags
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags}
*/
var ApplicationFlags;
(function (ApplicationFlags) {
@@ -43,12 +43,14 @@ var ApplicationFlags;
ApplicationFlags[ApplicationFlags["GatewayPresenceLimited"] = 8192] = "GatewayPresenceLimited";
/**
* Intent required for bots in 100 or more servers to receive member-related events like `guild_member_add`.
* See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
*
* @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`}
*/
ApplicationFlags[ApplicationFlags["GatewayGuildMembers"] = 16384] = "GatewayGuildMembers";
/**
* Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found in Bot Settings.
* See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
*
* @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`}
*/
ApplicationFlags[ApplicationFlags["GatewayGuildMembersLimited"] = 32768] = "GatewayGuildMembersLimited";
/**
@@ -60,11 +62,11 @@ var ApplicationFlags;
*/
ApplicationFlags[ApplicationFlags["Embedded"] = 131072] = "Embedded";
/**
* Intent required for bots in 100 or more servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055)
* Intent required for bots in 100 or more servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content}
*/
ApplicationFlags[ApplicationFlags["GatewayMessageContent"] = 262144] = "GatewayMessageContent";
/**
* Intent required for bots in under 100 servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055),
* Intent required for bots in under 100 servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content},
* found in Bot Settings
*/
ApplicationFlags[ApplicationFlags["GatewayMessageContentLimited"] = 524288] = "GatewayMessageContentLimited";
@@ -73,12 +75,12 @@ var ApplicationFlags;
*/
ApplicationFlags[ApplicationFlags["EmbeddedFirstParty"] = 1048576] = "EmbeddedFirstParty";
/**
* Indicates if an app has registered global [application commands](https://discord.com/developers/docs/interactions/application-commands)
* Indicates if an app has registered global {@link https://discord.com/developers/docs/interactions/application-commands | application commands}
*/
ApplicationFlags[ApplicationFlags["ApplicationCommandBadge"] = 8388608] = "ApplicationCommandBadge";
})(ApplicationFlags || (exports.ApplicationFlags = ApplicationFlags = {}));
/**
* https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type}
*/
var ApplicationRoleConnectionMetadataType;
(function (ApplicationRoleConnectionMetadataType) {
@@ -115,4 +117,22 @@ var ApplicationRoleConnectionMetadataType;
*/
ApplicationRoleConnectionMetadataType[ApplicationRoleConnectionMetadataType["BooleanNotEqual"] = 8] = "BooleanNotEqual";
})(ApplicationRoleConnectionMetadataType || (exports.ApplicationRoleConnectionMetadataType = ApplicationRoleConnectionMetadataType = {}));
/**
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status}
*/
var ApplicationWebhookEventStatus;
(function (ApplicationWebhookEventStatus) {
/**
* Webhook events are disabled by developer
*/
ApplicationWebhookEventStatus[ApplicationWebhookEventStatus["Disabled"] = 1] = "Disabled";
/**
* Webhook events are enabled by developer
*/
ApplicationWebhookEventStatus[ApplicationWebhookEventStatus["Enabled"] = 2] = "Enabled";
/**
* Webhook events are disabled by Discord, usually due to inactivity
*/
ApplicationWebhookEventStatus[ApplicationWebhookEventStatus["DisabledByDiscord"] = 3] = "DisabledByDiscord";
})(ApplicationWebhookEventStatus || (exports.ApplicationWebhookEventStatus = ApplicationWebhookEventStatus = {}));
//# sourceMappingURL=application.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA2IH;;GAEG;AACH,IAAY,gBAoEX;AApED,WAAY,gBAAgB;IAC3B;;OAEG;IACH,+EAAyB,CAAA;IACzB;;OAEG;IACH,uEAAqB,CAAA;IACrB;;OAEG;IACH,qEAAoB,CAAA;IACpB;;OAEG;IACH,0EAAsB,CAAA;IACtB;;OAEG;IACH,gIAAiD,CAAA;IACjD;;OAEG;IACH,gFAAyB,CAAA;IACzB;;OAEG;IACH,gFAAyB,CAAA;IACzB;;OAEG;IACH,8FAAgC,CAAA;IAChC;;;OAGG;IACH,yFAA6B,CAAA;IAC7B;;;OAGG;IACH,uGAAoC,CAAA;IACpC;;OAEG;IACH,6GAAuC,CAAA;IACvC;;OAEG;IACH,oEAAkB,CAAA;IAClB;;OAEG;IACH,8FAA+B,CAAA;IAC/B;;;OAGG;IACH,4GAAsC,CAAA;IACtC;;OAEG;IACH,yFAA4B,CAAA;IAC5B;;OAEG;IACH,mGAAiC,CAAA;AAClC,CAAC,EApEW,gBAAgB,gCAAhB,gBAAgB,QAoE3B;AAgCD;;GAEG;AACH,IAAY,qCAiCX;AAjCD,WAAY,qCAAqC;IAChD;;OAEG;IACH,qIAA0B,CAAA;IAC1B;;OAEG;IACH,2IAAyB,CAAA;IACzB;;OAEG;IACH,iHAAY,CAAA;IACZ;;OAEG;IACH,uHAAe,CAAA;IACf;;OAEG;IACH,uIAAuB,CAAA;IACvB;;OAEG;IACH,6IAA0B,CAAA;IAC1B;;OAEG;IACH,iHAAY,CAAA;IACZ;;OAEG;IACH,uHAAe,CAAA;AAChB,CAAC,EAjCW,qCAAqC,qDAArC,qCAAqC,QAiChD"}
{"version":3,"file":"application.js","sourceRoot":"","sources":["application.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AA8KH;;GAEG;AACH,IAAY,gBAsEX;AAtED,WAAY,gBAAgB;IAC3B;;OAEG;IACH,+EAAyB,CAAA;IACzB;;OAEG;IACH,uEAAqB,CAAA;IACrB;;OAEG;IACH,qEAAoB,CAAA;IACpB;;OAEG;IACH,0EAAsB,CAAA;IACtB;;OAEG;IACH,gIAAiD,CAAA;IACjD;;OAEG;IACH,gFAAyB,CAAA;IACzB;;OAEG;IACH,gFAAyB,CAAA;IACzB;;OAEG;IACH,8FAAgC,CAAA;IAChC;;;;OAIG;IACH,yFAA6B,CAAA;IAC7B;;;;OAIG;IACH,uGAAoC,CAAA;IACpC;;OAEG;IACH,6GAAuC,CAAA;IACvC;;OAEG;IACH,oEAAkB,CAAA;IAClB;;OAEG;IACH,8FAA+B,CAAA;IAC/B;;;OAGG;IACH,4GAAsC,CAAA;IACtC;;OAEG;IACH,yFAA4B,CAAA;IAC5B;;OAEG;IACH,mGAAiC,CAAA;AAClC,CAAC,EAtEW,gBAAgB,gCAAhB,gBAAgB,QAsE3B;AAgCD;;GAEG;AACH,IAAY,qCAiCX;AAjCD,WAAY,qCAAqC;IAChD;;OAEG;IACH,qIAA0B,CAAA;IAC1B;;OAEG;IACH,2IAAyB,CAAA;IACzB;;OAEG;IACH,iHAAY,CAAA;IACZ;;OAEG;IACH,uHAAe,CAAA;IACf;;OAEG;IACH,uIAAuB,CAAA;IACvB;;OAEG;IACH,6IAA0B,CAAA;IAC1B;;OAEG;IACH,iHAAY,CAAA;IACZ;;OAEG;IACH,uHAAe,CAAA;AAChB,CAAC,EAjCW,qCAAqC,qDAArC,qCAAqC,QAiChD;AAED;;GAEG;AACH,IAAY,6BAaX;AAbD,WAAY,6BAA6B;IACxC;;OAEG;IACH,yFAAY,CAAA;IACZ;;OAEG;IACH,uFAAO,CAAA;IACP;;OAEG;IACH,2GAAiB,CAAA;AAClB,CAAC,EAbW,6BAA6B,6CAA7B,6BAA6B,QAaxC"}

View File

@@ -3,9 +3,9 @@
*/
import type { Snowflake } from '../../globals';
import type { APIAutoModerationAction, APIAutoModerationRule, APIAutoModerationRuleTriggerMetadata, AutoModerationRuleEventType, AutoModerationRuleTriggerType } from './autoModeration';
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel';
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite, VideoQualityMode } from './channel';
import type { APIGuildIntegration, APIGuildIntegrationType, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildMFALevel, GuildSystemChannelFlags, GuildVerificationLevel, IntegrationExpireBehavior } from './guild';
import type { APIGuildScheduledEvent, GuildScheduledEventEntityType, GuildScheduledEventStatus } from './guildScheduledEvent';
import type { APIGuildScheduledEvent, APIGuildScheduledEventRecurrenceRule, GuildScheduledEventEntityType, GuildScheduledEventStatus } from './guildScheduledEvent';
import type { APIApplicationCommand } from './interactions';
import type { APIRole } from './permissions';
import type { StageInstancePrivacyLevel } from './stageInstance';
@@ -13,43 +13,43 @@ import type { StickerFormatType } from './sticker';
import type { APIUser } from './user';
import type { APIWebhook } from './webhook';
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure}
*/
export interface APIAuditLog {
/**
* List of application commands found in the audit log
*
* See https://discord.com/developers/docs/interactions/application-commands#application-command-object
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object}
*/
application_commands: APIApplicationCommand[];
/**
* Webhooks found in the audit log
*
* See https://discord.com/developers/docs/resources/webhook#webhook-object
* @see {@link 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
* @see {@link 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
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object}
*/
audit_log_entries: APIAuditLogEntry[];
/**
* List of auto moderation rules referenced in the audit log
*
* See https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object}
*/
auto_moderation_rules: APIAutoModerationRule[];
/**
* Partial integration objects
*
* See https://discord.com/developers/docs/resources/guild#integration-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object}
*/
integrations: APIGuildIntegration[];
/**
@@ -57,18 +57,18 @@ export interface APIAuditLog {
*
* 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
* @see {@link 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
* @see {@link 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
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure}
*/
export interface APIAuditLogEntry {
/**
@@ -78,7 +78,7 @@ export interface APIAuditLogEntry {
/**
* Changes made to the `target_id`
*
* See https://discord.com/developers/docs/resources/audit-log#audit-log-change-object
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-change-object}
*/
changes?: APIAuditLogChange[];
/**
@@ -94,13 +94,13 @@ export interface APIAuditLogEntry {
/**
* Type of action that occurred
*
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
* @see {@link 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
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info}
*/
options?: APIAuditLogOptions;
/**
@@ -109,7 +109,7 @@ export interface APIAuditLogEntry {
reason?: string;
}
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events}
*/
export declare enum AuditLogEvent {
GuildUpdate = 1,
@@ -160,22 +160,28 @@ export declare enum AuditLogEvent {
ThreadUpdate = 111,
ThreadDelete = 112,
ApplicationCommandPermissionUpdate = 121,
SoundboardSoundCreate = 130,
SoundboardSoundUpdate = 131,
SoundboardSoundDelete = 132,
AutoModerationRuleCreate = 140,
AutoModerationRuleUpdate = 141,
AutoModerationRuleDelete = 142,
AutoModerationBlockMessage = 143,
AutoModerationFlagToChannel = 144,
AutoModerationUserCommunicationDisabled = 145,
AutoModerationQuarantineUser = 146,
CreatorMonetizationRequestCreated = 150,
CreatorMonetizationTermsAccepted = 151,
OnboardingPromptCreate = 163,
OnboardingPromptUpdate = 164,
OnboardingPromptDelete = 165,
OnboardingCreate = 166,
OnboardingUpdate = 167
OnboardingUpdate = 167,
HomeSettingsCreate = 190,
HomeSettingsUpdate = 191
}
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info}
*/
export interface APIAuditLogOptions {
/**
@@ -185,6 +191,7 @@ export interface APIAuditLogOptions {
* - AUTO_MODERATION_BLOCK_MESSAGE
* - AUTO_MODERATION_FLAG_TO_CHANNEL
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
* - AUTO_MODERATION_QUARANTINE_USER
*/
auto_moderation_rule_name?: string;
/**
@@ -194,6 +201,7 @@ export interface APIAuditLogOptions {
* - AUTO_MODERATION_BLOCK_MESSAGE
* - AUTO_MODERATION_FLAG_TO_CHANNEL
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
* - AUTO_MODERATION_QUARANTINE_USER
*/
auto_moderation_rule_trigger_type?: AuditLogRuleTriggerType;
/**
@@ -224,6 +232,7 @@ export interface APIAuditLogOptions {
* - AUTO_MODERATION_BLOCK_MESSAGE
* - AUTO_MODERATION_FLAG_TO_CHANNEL
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
* - AUTO_MODERATION_QUARANTINE_USER
*/
channel_id?: Snowflake;
/**
@@ -272,7 +281,7 @@ export interface APIAuditLogOptions {
* - CHANNEL_OVERWRITE_UPDATE
* - CHANNEL_OVERWRITE_DELETE
*
* **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
* **Present only if the {@link APIAuditLogOptions."type" | entry type} is "0"**
*/
role_name?: string;
/**
@@ -290,345 +299,381 @@ export declare enum AuditLogOptionsType {
}
export type AuditLogRuleTriggerType = `${AutoModerationRuleTriggerType}`;
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure}
*/
export type APIAuditLogChange = APIAuditLogChangeKey$Add | APIAuditLogChangeKey$Remove | APIAuditLogChangeKeyActions | APIAuditLogChangeKeyAFKChannelId | APIAuditLogChangeKeyAFKTimeout | APIAuditLogChangeKeyAllow | APIAuditLogChangeKeyApplicationId | APIAuditLogChangeKeyArchived | APIAuditLogChangeKeyAsset | APIAuditLogChangeKeyAutoArchiveDuration | APIAuditLogChangeKeyAvailable | APIAuditLogChangeKeyAvailableTags | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyBannerHash | APIAuditLogChangeKeyBitrate | APIAuditLogChangeKeyChannelId | APIAuditLogChangeKeyCode | APIAuditLogChangeKeyColor | APIAuditLogChangeKeyCommunicationDisabledUntil | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyDefaultAutoArchiveDuration | APIAuditLogChangeKeyDefaultMessageNotifications | APIAuditLogChangeKeyDefaultReactionEmoji | APIAuditLogChangeKeyDefaultThreadRateLimitPerUser | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyDescription | APIAuditLogChangeKeyDiscoverySplashHash | APIAuditLogChangeKeyEnabled | APIAuditLogChangeKeyEnableEmoticons | APIAuditLogChangeKeyEntityType | APIAuditLogChangeKeyEventType | APIAuditLogChangeKeyExemptChannels | APIAuditLogChangeKeyExemptRoles | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod | APIAuditLogChangeKeyExplicitContentFilter | APIAuditLogChangeKeyFlags | APIAuditLogChangeKeyFormatType | APIAuditLogChangeKeyGuildId | APIAuditLogChangeKeyHoist | APIAuditLogChangeKeyIconHash | APIAuditLogChangeKeyId | APIAuditLogChangeKeyImageHash | APIAuditLogChangeKeyInviterId | APIAuditLogChangeKeyLocation | APIAuditLogChangeKeyLocked | APIAuditLogChangeKeyMaxAge | APIAuditLogChangeKeyMaxUses | APIAuditLogChangeKeyMentionable | APIAuditLogChangeKeyMFALevel | APIAuditLogChangeKeyMute | APIAuditLogChangeKeyName | APIAuditLogChangeKeyNick | APIAuditLogChangeKeyNSFW | APIAuditLogChangeKeyOwnerId | APIAuditLogChangeKeyPermissionOverwrites | APIAuditLogChangeKeyPermissions | APIAuditLogChangeKeyPosition | APIAuditLogChangeKeyPreferredLocale | APIAuditLogChangeKeyPrivacyLevel | APIAuditLogChangeKeyPruneDeleteDays | APIAuditLogChangeKeyPublicUpdatesChannelId | APIAuditLogChangeKeyRateLimitPerUser | APIAuditLogChangeKeyRegion | APIAuditLogChangeKeyRulesChannelId | APIAuditLogChangeKeySplashHash | APIAuditLogChangeKeyStatus | APIAuditLogChangeKeySystemChannelFlags | APIAuditLogChangeKeySystemChannelId | APIAuditLogChangeKeyTags | APIAuditLogChangeKeyTemporary | APIAuditLogChangeKeyTopic | APIAuditLogChangeKeyTriggerMetadata | APIAuditLogChangeKeyTriggerType | APIAuditLogChangeKeyType | APIAuditLogChangeKeyUserLimit | APIAuditLogChangeKeyUses | APIAuditLogChangeKeyVanityURLCode | APIAuditLogChangeKeyVerificationLevel | APIAuditLogChangeKeyWidgetChannelId | APIAuditLogChangeKeyWidgetEnabled;
export type APIAuditLogChange = APIAuditLogChangeKey$Add | APIAuditLogChangeKey$Remove | APIAuditLogChangeKeyActions | APIAuditLogChangeKeyAFKChannelId | APIAuditLogChangeKeyAFKTimeout | APIAuditLogChangeKeyAllow | APIAuditLogChangeKeyApplicationId | APIAuditLogChangeKeyArchived | APIAuditLogChangeKeyAsset | APIAuditLogChangeKeyAutoArchiveDuration | APIAuditLogChangeKeyAvailable | APIAuditLogChangeKeyAvailableTags | APIAuditLogChangeKeyAvatarHash | APIAuditLogChangeKeyBannerHash | APIAuditLogChangeKeyBitrate | APIAuditLogChangeKeyChannelId | APIAuditLogChangeKeyCode | APIAuditLogChangeKeyColor | APIAuditLogChangeKeyCommunicationDisabledUntil | APIAuditLogChangeKeyDeaf | APIAuditLogChangeKeyDefaultAutoArchiveDuration | APIAuditLogChangeKeyDefaultMessageNotifications | APIAuditLogChangeKeyDefaultReactionEmoji | APIAuditLogChangeKeyDefaultThreadRateLimitPerUser | APIAuditLogChangeKeyDeny | APIAuditLogChangeKeyDescription | APIAuditLogChangeKeyDiscoverySplashHash | APIAuditLogChangeKeyEmojiId | APIAuditLogChangeKeyEmojiName | APIAuditLogChangeKeyEnabled | APIAuditLogChangeKeyEnableEmoticons | APIAuditLogChangeKeyEntityType | APIAuditLogChangeKeyEventType | APIAuditLogChangeKeyExemptChannels | APIAuditLogChangeKeyExemptRoles | APIAuditLogChangeKeyExpireBehavior | APIAuditLogChangeKeyExpireGracePeriod | APIAuditLogChangeKeyExplicitContentFilter | APIAuditLogChangeKeyFlags | APIAuditLogChangeKeyFormatType | APIAuditLogChangeKeyGuildId | APIAuditLogChangeKeyHoist | APIAuditLogChangeKeyIconHash | APIAuditLogChangeKeyId | APIAuditLogChangeKeyImageHash | APIAuditLogChangeKeyInviterId | APIAuditLogChangeKeyLocation | APIAuditLogChangeKeyLocked | APIAuditLogChangeKeyMaxAge | APIAuditLogChangeKeyMaxUses | APIAuditLogChangeKeyMentionable | APIAuditLogChangeKeyMFALevel | APIAuditLogChangeKeyMute | APIAuditLogChangeKeyName | APIAuditLogChangeKeyNick | APIAuditLogChangeKeyNSFW | APIAuditLogChangeKeyOwnerId | APIAuditLogChangeKeyPermissionOverwrites | APIAuditLogChangeKeyPermissions | APIAuditLogChangeKeyPosition | APIAuditLogChangeKeyPreferredLocale | APIAuditLogChangeKeyPremiumProgressBarEnabled | APIAuditLogChangeKeyPrivacyLevel | APIAuditLogChangeKeyPruneDeleteDays | APIAuditLogChangeKeyPublicUpdatesChannelId | APIAuditLogChangeKeyRateLimitPerUser | APIAuditLogChangeKeyRecurrenceRule | APIAuditLogChangeKeyRegion | APIAuditLogChangeKeyRTCRegion | APIAuditLogChangeKeyRulesChannelId | APIAuditLogChangeKeySafetyAlertsChannelId | APIAuditLogChangeKeySoundId | APIAuditLogChangeKeySplashHash | APIAuditLogChangeKeyStatus | APIAuditLogChangeKeySystemChannelFlags | APIAuditLogChangeKeySystemChannelId | APIAuditLogChangeKeyTags | APIAuditLogChangeKeyTemporary | APIAuditLogChangeKeyTopic | APIAuditLogChangeKeyTriggerMetadata | APIAuditLogChangeKeyTriggerType | APIAuditLogChangeKeyType | APIAuditLogChangeKeyUserId | APIAuditLogChangeKeyUserLimit | APIAuditLogChangeKeyUses | APIAuditLogChangeKeyVanityURLCode | APIAuditLogChangeKeyVerificationLevel | APIAuditLogChangeKeyVideoQualityMode | APIAuditLogChangeKeyVolume | APIAuditLogChangeKeyWidgetChannelId | APIAuditLogChangeKeyWidgetEnabled;
/**
* Returned when an entity's name is changed
*/
export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
export type APIAuditLogChangeKeyName = APIAuditLogChangeData<'name', string>;
/**
* Returned when a guild's or sticker's or guild scheduled event's description is changed
*/
export type APIAuditLogChangeKeyDescription = AuditLogChangeData<'description', string>;
export type APIAuditLogChangeKeyDescription = APIAuditLogChangeData<'description', string>;
/**
* Returned when a guild's icon is changed
*/
export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>;
export type APIAuditLogChangeKeyIconHash = APIAuditLogChangeData<'icon_hash', string>;
/**
* Returned when a guild's scheduled event's cover image is changed
*/
export type APIAuditLogChangeKeyImageHash = AuditLogChangeData<'image_hash', string>;
export type APIAuditLogChangeKeyImageHash = APIAuditLogChangeData<'image_hash', string>;
/**
* Returned when a guild's splash is changed
*/
export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
export type APIAuditLogChangeKeySplashHash = APIAuditLogChangeData<'splash_hash', string>;
/**
* Returned when a guild's discovery splash is changed
*/
export type APIAuditLogChangeKeyDiscoverySplashHash = AuditLogChangeData<'discovery_splash_hash', string>;
export type APIAuditLogChangeKeyDiscoverySplashHash = APIAuditLogChangeData<'discovery_splash_hash', string>;
/**
* Returned when a guild's banner hash is changed
*/
export type APIAuditLogChangeKeyBannerHash = AuditLogChangeData<'banner_hash', string>;
export type APIAuditLogChangeKeyBannerHash = APIAuditLogChangeData<'banner_hash', string>;
/**
* Returned when a guild's owner_id is changed
*/
export type APIAuditLogChangeKeyOwnerId = AuditLogChangeData<'owner_id', Snowflake>;
export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snowflake>;
/**
* Returned when a guild's region is changed
*/
export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>;
/**
* Returned when a channel's rtc_region is changed
*/
export type APIAuditLogChangeKeyRTCRegion = APIAuditLogChangeData<'rtc_region', string>;
/**
* Returned when a guild's preferred_locale is changed
*/
export type APIAuditLogChangeKeyPreferredLocale = AuditLogChangeData<'preferred_locale', string>;
export type APIAuditLogChangeKeyPreferredLocale = APIAuditLogChangeData<'preferred_locale', string>;
/**
* Returned when a guild's afk_channel_id is changed
*/
export type APIAuditLogChangeKeyAFKChannelId = AuditLogChangeData<'afk_channel_id', Snowflake>;
export type APIAuditLogChangeKeyAFKChannelId = APIAuditLogChangeData<'afk_channel_id', Snowflake>;
/**
* Returned when a guild's afk_timeout is changed
*/
export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
export type APIAuditLogChangeKeyAFKTimeout = APIAuditLogChangeData<'afk_timeout', number>;
/**
* Returned when a guild's rules_channel_id is changed
*/
export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_channel_id', string>;
export type APIAuditLogChangeKeyRulesChannelId = APIAuditLogChangeData<'rules_channel_id', string>;
/**
* Returned when a guild's public_updates_channel_id is changed
*/
export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
export type APIAuditLogChangeKeyPublicUpdatesChannelId = APIAuditLogChangeData<'public_updates_channel_id', string>;
/**
* Returned when a guild's safety_alerts_channel_id is changed
*/
export type APIAuditLogChangeKeySafetyAlertsChannelId = AuditLogChangeData<'safety_alerts_channel_id', string>;
export type APIAuditLogChangeKeySafetyAlertsChannelId = APIAuditLogChangeData<'safety_alerts_channel_id', string>;
/**
* Returned when a guild's mfa_level is changed
*/
export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>;
export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', GuildMFALevel>;
/**
* Returned when a guild's verification_level is changed
*/
export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>;
export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>;
/**
* Returned when a channel's video_quality_mode is changed
*/
export type APIAuditLogChangeKeyVideoQualityMode = APIAuditLogChangeData<'video_quality_mode', VideoQualityMode>;
/**
* Returned when a guild's explicit_content_filter is changed
*/
export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<'explicit_content_filter', GuildExplicitContentFilter>;
export type APIAuditLogChangeKeyExplicitContentFilter = APIAuditLogChangeData<'explicit_content_filter', GuildExplicitContentFilter>;
/**
* Returned when a guild's default_message_notifications is changed
*/
export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<'default_message_notifications', GuildDefaultMessageNotifications>;
export type APIAuditLogChangeKeyDefaultMessageNotifications = APIAuditLogChangeData<'default_message_notifications', GuildDefaultMessageNotifications>;
/**
* Returned when a guild's vanity_url_code is changed
*/
export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>;
export type APIAuditLogChangeKeyVanityURLCode = APIAuditLogChangeData<'vanity_url_code', string>;
/**
* Returned when a guild's boost progress bar is enabled
*/
export type APIAuditLogChangeKeyPremiumProgressBarEnabled = APIAuditLogChangeData<'premium_progress_bar_enabled', boolean>;
/**
* Returned when new role(s) are added
*/
export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', APIRole[]>;
export type APIAuditLogChangeKey$Add = APIAuditLogChangeData<'$add', Pick<APIRole, 'id' | 'name'>[]>;
/**
* Returned when role(s) are removed
*/
export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', APIRole[]>;
export type APIAuditLogChangeKey$Remove = APIAuditLogChangeData<'$remove', Pick<APIRole, 'id' | 'name'>[]>;
/**
* 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>;
export type APIAuditLogChangeKeyPruneDeleteDays = APIAuditLogChangeData<'prune_delete_days', number>;
/**
* Returned when a guild's widget is enabled
*/
export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>;
export type APIAuditLogChangeKeyWidgetEnabled = APIAuditLogChangeData<'widget_enabled', boolean>;
/**
* Returned when a guild's widget_channel_id is changed
*/
export type APIAuditLogChangeKeyWidgetChannelId = AuditLogChangeData<'widget_channel_id', Snowflake>;
export type APIAuditLogChangeKeyWidgetChannelId = APIAuditLogChangeData<'widget_channel_id', Snowflake>;
/**
* Returned when a guild's system_channel_flags is changed
*/
export type APIAuditLogChangeKeySystemChannelFlags = AuditLogChangeData<'system_channel_flags', GuildSystemChannelFlags>;
export type APIAuditLogChangeKeySystemChannelFlags = APIAuditLogChangeData<'system_channel_flags', GuildSystemChannelFlags>;
/**
* Returned when a guild's system_channel_id is changed
*/
export type APIAuditLogChangeKeySystemChannelId = AuditLogChangeData<'system_channel_id', Snowflake>;
export type APIAuditLogChangeKeySystemChannelId = APIAuditLogChangeData<'system_channel_id', Snowflake>;
/**
* Returned when a channel's position is changed
*/
export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>;
export type APIAuditLogChangeKeyPosition = APIAuditLogChangeData<'position', number>;
/**
* Returned when a channel's topic is changed
*/
export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>;
export type APIAuditLogChangeKeyTopic = APIAuditLogChangeData<'topic', string>;
/**
* Returned when a voice channel's bitrate is changed
*/
export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>;
export type APIAuditLogChangeKeyBitrate = APIAuditLogChangeData<'bitrate', number>;
/**
* Returned when a channel's permission overwrites is changed
*/
export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
export type APIAuditLogChangeKeyPermissionOverwrites = APIAuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
/**
* Returned when a channel's NSFW restriction is changed
*/
export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>;
export type APIAuditLogChangeKeyNSFW = APIAuditLogChangeData<'nsfw', boolean>;
/**
* The application ID of the added or removed Webhook or Bot
*/
export type APIAuditLogChangeKeyApplicationId = AuditLogChangeData<'application_id', Snowflake>;
export type APIAuditLogChangeKeyApplicationId = APIAuditLogChangeData<'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>;
export type APIAuditLogChangeKeyRateLimitPerUser = APIAuditLogChangeData<'rate_limit_per_user', number>;
/**
* Returned when a guild scheduled event's recurrence_rule is changed
*/
export type APIAuditLogChangeKeyRecurrenceRule = APIAuditLogChangeData<'recurrence_rule', APIGuildScheduledEventRecurrenceRule>;
/**
* Returned when a permission bitfield is changed
*/
export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', string>;
export type APIAuditLogChangeKeyPermissions = APIAuditLogChangeData<'permissions', string>;
/**
* Returned when a role's color is changed
*/
export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>;
export type APIAuditLogChangeKeyColor = APIAuditLogChangeData<'color', number>;
/**
* Represents a change where the key is a snowflake.
* Currently, the only known instance of this is returned when permissions for a command were updated (<insert name of object here>)
* Currently, the only known instance of this is returned when permissions for a command were updated
*/
export type APIAuditLogChangeKeySnowflake = AuditLogChangeData<Snowflake, unknown>;
export type APIAuditLogChangeKeySnowflake = APIAuditLogChangeData<Snowflake, unknown>;
/**
* Returned when a role's hoist status is changed
*/
export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>;
export type APIAuditLogChangeKeyHoist = APIAuditLogChangeData<'hoist', boolean>;
/**
* Returned when a role's mentionable status is changed
*/
export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>;
export type APIAuditLogChangeKeyMentionable = APIAuditLogChangeData<'mentionable', boolean>;
/**
* Returned when an overwrite's allowed permissions bitfield is changed
*/
export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', string>;
export type APIAuditLogChangeKeyAllow = APIAuditLogChangeData<'allow', string>;
/**
* Returned when an overwrite's denied permissions bitfield is changed
*/
export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', string>;
export type APIAuditLogChangeKeyDeny = APIAuditLogChangeData<'deny', string>;
/**
* Returned when an invite's code is changed
*/
export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>;
export type APIAuditLogChangeKeyCode = APIAuditLogChangeData<'code', string>;
/**
* Returned when an invite's or guild scheduled event's channel_id is changed
*/
export type APIAuditLogChangeKeyChannelId = AuditLogChangeData<'channel_id', Snowflake>;
export type APIAuditLogChangeKeyChannelId = APIAuditLogChangeData<'channel_id', Snowflake>;
/**
* Returned when an invite's inviter_id is changed
*/
export type APIAuditLogChangeKeyInviterId = AuditLogChangeData<'inviter_id', Snowflake>;
export type APIAuditLogChangeKeyInviterId = APIAuditLogChangeData<'inviter_id', Snowflake>;
/**
* Returned when an invite's max_uses is changed
*/
export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>;
export type APIAuditLogChangeKeyMaxUses = APIAuditLogChangeData<'max_uses', number>;
/**
* Returned when an invite's uses is changed
*/
export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>;
export type APIAuditLogChangeKeyUses = APIAuditLogChangeData<'uses', number>;
/**
* Returned when an invite's max_age is changed
*/
export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>;
export type APIAuditLogChangeKeyMaxAge = APIAuditLogChangeData<'max_age', number>;
/**
* Returned when an invite's temporary status is changed
*/
export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>;
export type APIAuditLogChangeKeyTemporary = APIAuditLogChangeData<'temporary', boolean>;
/**
* Returned when a user's deaf status is changed
*/
export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>;
export type APIAuditLogChangeKeyDeaf = APIAuditLogChangeData<'deaf', boolean>;
/**
* Returned when a user's mute status is changed
*/
export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>;
export type APIAuditLogChangeKeyMute = APIAuditLogChangeData<'mute', boolean>;
/**
* Returned when a user's nick is changed
*/
export type APIAuditLogChangeKeyNick = AuditLogChangeData<'nick', string>;
export type APIAuditLogChangeKeyNick = APIAuditLogChangeData<'nick', string>;
/**
* Returned when a user's avatar_hash is changed
*/
export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>;
export type APIAuditLogChangeKeyAvatarHash = APIAuditLogChangeData<'avatar_hash', string>;
/**
* The ID of the changed entity - sometimes used in conjunction with other keys
*/
export type APIAuditLogChangeKeyId = AuditLogChangeData<'id', Snowflake>;
export type APIAuditLogChangeKeyId = APIAuditLogChangeData<'id', Snowflake>;
/**
* The type of entity created
*/
export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', number | string>;
export type APIAuditLogChangeKeyType = APIAuditLogChangeData<'type', number | string>;
/**
* Returned when an integration's enable_emoticons is changed
*/
export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>;
export type APIAuditLogChangeKeyEnableEmoticons = APIAuditLogChangeData<'enable_emoticons', boolean>;
/**
* Returned when an integration's expire_behavior is changed
*/
export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
export type APIAuditLogChangeKeyExpireBehavior = APIAuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
/**
* Returned when an integration's expire_grace_period is changed
*/
export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;
export type APIAuditLogChangeKeyExpireGracePeriod = APIAuditLogChangeData<'expire_grace_period', number>;
/**
* Returned when a voice channel's user_limit is changed
*/
export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
export type APIAuditLogChangeKeyUserLimit = APIAuditLogChangeData<'user_limit', number>;
/**
* Returned when privacy level of a stage instance or guild scheduled event is changed
*/
export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
export type APIAuditLogChangeKeyPrivacyLevel = APIAuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
/**
* Returned when a sticker's related emoji is changed
*/
export type APIAuditLogChangeKeyTags = AuditLogChangeData<'tags', string>;
export type APIAuditLogChangeKeyTags = APIAuditLogChangeData<'tags', string>;
/**
* Returned when a sticker's format_type is changed
*/
export type APIAuditLogChangeKeyFormatType = AuditLogChangeData<'format_type', StickerFormatType>;
export type APIAuditLogChangeKeyFormatType = APIAuditLogChangeData<'format_type', StickerFormatType>;
/**
* Empty string
*/
export type APIAuditLogChangeKeyAsset = AuditLogChangeData<'asset', ''>;
export type APIAuditLogChangeKeyAsset = APIAuditLogChangeData<'asset', ''>;
/**
* Returned when a sticker's availability is changed
*/
export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', boolean>;
export type APIAuditLogChangeKeyAvailable = APIAuditLogChangeData<'available', boolean>;
/**
* Returned when a sticker's guild_id is changed
*/
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
export type APIAuditLogChangeKeyGuildId = APIAuditLogChangeData<'guild_id', Snowflake>;
/**
* Returned when a thread's archive status is changed
*/
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
export type APIAuditLogChangeKeyArchived = APIAuditLogChangeData<'archived', boolean>;
/**
* Returned when a thread's lock status is changed
*/
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
export type APIAuditLogChangeKeyLocked = APIAuditLogChangeData<'locked', boolean>;
/**
* Returned when a thread's auto archive duration is changed
*/
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
export type APIAuditLogChangeKeyAutoArchiveDuration = APIAuditLogChangeData<'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>;
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = APIAuditLogChangeData<'default_auto_archive_duration', number>;
/**
* Returned when entity type of a guild scheduled event is changed
*/
export type APIAuditLogChangeKeyEntityType = AuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
export type APIAuditLogChangeKeyEntityType = APIAuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
/**
* Returned when status of a guild scheduled event is changed
*/
export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildScheduledEventStatus>;
export type APIAuditLogChangeKeyStatus = APIAuditLogChangeData<'status', GuildScheduledEventStatus>;
/**
* Returned when location of a guild scheduled event is changed
*/
export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
export type APIAuditLogChangeKeyLocation = APIAuditLogChangeData<'location', string>;
/**
* Returned when a user's timeout is changed
*/
export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;
export type APIAuditLogChangeKeyCommunicationDisabledUntil = APIAuditLogChangeData<'communication_disabled_until', string>;
/**
* Returned when an auto moderation rule's trigger type is changed (only in rule creation or deletion)
*/
export type APIAuditLogChangeKeyTriggerType = AuditLogChangeData<'trigger_type', AutoModerationRuleTriggerType>;
export type APIAuditLogChangeKeyTriggerType = APIAuditLogChangeData<'trigger_type', AutoModerationRuleTriggerType>;
/**
* Returned when an auto moderation rule's event type is changed
*/
export type APIAuditLogChangeKeyEventType = AuditLogChangeData<'event_type', AutoModerationRuleEventType>;
export type APIAuditLogChangeKeyEventType = APIAuditLogChangeData<'event_type', AutoModerationRuleEventType>;
/**
* Returned when an auto moderation rule's trigger metadata is changed
*/
export type APIAuditLogChangeKeyTriggerMetadata = AuditLogChangeData<'trigger_metadata', APIAutoModerationRuleTriggerMetadata>;
export type APIAuditLogChangeKeyTriggerMetadata = APIAuditLogChangeData<'trigger_metadata', APIAutoModerationRuleTriggerMetadata>;
/**
* Returned when an auto moderation rule's actions is changed
*/
export type APIAuditLogChangeKeyActions = AuditLogChangeData<'actions', APIAutoModerationAction[]>;
export type APIAuditLogChangeKeyActions = APIAuditLogChangeData<'actions', APIAutoModerationAction[]>;
/**
* Returned when an auto moderation rule's enabled status is changed
*/
export type APIAuditLogChangeKeyEnabled = AuditLogChangeData<'enabled', boolean>;
export type APIAuditLogChangeKeyEnabled = APIAuditLogChangeData<'enabled', boolean>;
/**
* Returned when an auto moderation rule's exempt roles is changed
*/
export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles', Snowflake[]>;
export type APIAuditLogChangeKeyExemptRoles = APIAuditLogChangeData<'exempt_roles', Snowflake[]>;
/**
* Returned when an auto moderation rule's exempt channels is changed
*/
export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>;
export type APIAuditLogChangeKeyExemptChannels = APIAuditLogChangeData<'exempt_channels', Snowflake[]>;
/**
* Returned when a guild forum's available tags gets changed
*/
export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>;
export type APIAuditLogChangeKeyAvailableTags = APIAuditLogChangeData<'available_tags', APIGuildForumTag[]>;
/**
* Returned when a guild forum's default reaction emoji gets changed
*/
export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<'default_reaction_emoji', APIGuildForumDefaultReactionEmoji>;
export type APIAuditLogChangeKeyDefaultReactionEmoji = APIAuditLogChangeData<'default_reaction_emoji', APIGuildForumDefaultReactionEmoji>;
/**
* Returned when a channel flag gets changed
*/
export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>;
export type APIAuditLogChangeKeyFlags = APIAuditLogChangeData<'flags', number>;
/**
* Returned when a thread's amount of seconds a user has to wait before creating another thread
* gets changed
*/
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData<'default_thread_rate_limit_per_user', number>;
interface AuditLogChangeData<K extends string, D> {
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = APIAuditLogChangeData<'default_thread_rate_limit_per_user', number>;
/**
* Returned when a soundboard is create or deleted
*/
export type APIAuditLogChangeKeySoundId = APIAuditLogChangeData<'sound_id', Snowflake>;
/**
* Returned when a soundboard's volume is changed
*/
export type APIAuditLogChangeKeyVolume = APIAuditLogChangeData<'volume', number>;
/**
* Returned when a soundboard's custom emoji is changed
*/
export type APIAuditLogChangeKeyEmojiId = APIAuditLogChangeData<'emoji_id', Snowflake>;
/**
* Returned when a soundboard's unicode emoji is changed
*/
export type APIAuditLogChangeKeyEmojiName = APIAuditLogChangeData<'emoji_name', string>;
/**
* Returned when a sounboard is created
*/
export type APIAuditLogChangeKeyUserId = APIAuditLogChangeData<'user_id', Snowflake>;
export interface APIAuditLogChangeData<K extends string, D> {
key: K;
/**
* The new value
@@ -639,5 +684,4 @@ interface AuditLogChangeData<K extends string, D> {
new_value?: D;
old_value?: D;
}
export {};
//# sourceMappingURL=auditLog.d.ts.map

File diff suppressed because one or more lines are too long

View File

@@ -5,7 +5,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuditLogOptionsType = exports.AuditLogEvent = void 0;
/**
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events}
*/
var AuditLogEvent;
(function (AuditLogEvent) {
@@ -57,12 +57,16 @@ var AuditLogEvent;
AuditLogEvent[AuditLogEvent["ThreadUpdate"] = 111] = "ThreadUpdate";
AuditLogEvent[AuditLogEvent["ThreadDelete"] = 112] = "ThreadDelete";
AuditLogEvent[AuditLogEvent["ApplicationCommandPermissionUpdate"] = 121] = "ApplicationCommandPermissionUpdate";
AuditLogEvent[AuditLogEvent["SoundboardSoundCreate"] = 130] = "SoundboardSoundCreate";
AuditLogEvent[AuditLogEvent["SoundboardSoundUpdate"] = 131] = "SoundboardSoundUpdate";
AuditLogEvent[AuditLogEvent["SoundboardSoundDelete"] = 132] = "SoundboardSoundDelete";
AuditLogEvent[AuditLogEvent["AutoModerationRuleCreate"] = 140] = "AutoModerationRuleCreate";
AuditLogEvent[AuditLogEvent["AutoModerationRuleUpdate"] = 141] = "AutoModerationRuleUpdate";
AuditLogEvent[AuditLogEvent["AutoModerationRuleDelete"] = 142] = "AutoModerationRuleDelete";
AuditLogEvent[AuditLogEvent["AutoModerationBlockMessage"] = 143] = "AutoModerationBlockMessage";
AuditLogEvent[AuditLogEvent["AutoModerationFlagToChannel"] = 144] = "AutoModerationFlagToChannel";
AuditLogEvent[AuditLogEvent["AutoModerationUserCommunicationDisabled"] = 145] = "AutoModerationUserCommunicationDisabled";
AuditLogEvent[AuditLogEvent["AutoModerationQuarantineUser"] = 146] = "AutoModerationQuarantineUser";
AuditLogEvent[AuditLogEvent["CreatorMonetizationRequestCreated"] = 150] = "CreatorMonetizationRequestCreated";
AuditLogEvent[AuditLogEvent["CreatorMonetizationTermsAccepted"] = 151] = "CreatorMonetizationTermsAccepted";
AuditLogEvent[AuditLogEvent["OnboardingPromptCreate"] = 163] = "OnboardingPromptCreate";
@@ -70,6 +74,8 @@ var AuditLogEvent;
AuditLogEvent[AuditLogEvent["OnboardingPromptDelete"] = 165] = "OnboardingPromptDelete";
AuditLogEvent[AuditLogEvent["OnboardingCreate"] = 166] = "OnboardingCreate";
AuditLogEvent[AuditLogEvent["OnboardingUpdate"] = 167] = "OnboardingUpdate";
AuditLogEvent[AuditLogEvent["HomeSettingsCreate"] = 190] = "HomeSettingsCreate";
AuditLogEvent[AuditLogEvent["HomeSettingsUpdate"] = 191] = "HomeSettingsUpdate";
})(AuditLogEvent || (exports.AuditLogEvent = AuditLogEvent = {}));
var AuditLogOptionsType;
(function (AuditLogOptionsType) {

View File

@@ -1 +1 @@
{"version":3,"file":"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/B,6FAAyB,CAAA;IACzB,6FAAyB,CAAA;IAEzB,mEAAkB,CAAA;IAClB,mEAAY,CAAA;IACZ,mEAAY,CAAA;IAEZ,+GAAwC,CAAA;IAExC,qFAA2B,CAAA;IAC3B,qFAAqB,CAAA;IACrB,qFAAqB,CAAA;IAErB,2FAA8B,CAAA;IAC9B,2FAAwB,CAAA;IACxB,2FAAwB,CAAA;IACxB,+FAA0B,CAAA;IAC1B,iGAA2B,CAAA;IAC3B,yHAAuC,CAAA;IACvC,mGAA4B,CAAA;IAE5B,6GAAuC,CAAA;IACvC,2GAAgC,CAAA;IAEhC,uFAA4B,CAAA;IAC5B,uFAAsB,CAAA;IACtB,uFAAsB,CAAA;IACtB,2EAAgB,CAAA;IAChB,2EAAgB,CAAA;IAEhB,+EAAwB,CAAA;IACxB,+EAAkB,CAAA;AACnB,CAAC,EArFW,aAAa,6BAAb,aAAa,QAqFxB;AA2HD,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC9B,iCAAU,CAAA;IACV,mCAAY,CAAA;AACb,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B"}

View File

@@ -3,7 +3,7 @@
*/
import type { Snowflake } from '../../globals';
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-auto-moderation-rule-structure
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-auto-moderation-rule-structure}
*/
export interface APIAutoModerationRule {
/**
@@ -52,7 +52,7 @@ export interface APIAutoModerationRule {
exempt_channels: Snowflake[];
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types}
*/
export declare enum AutoModerationRuleTriggerType {
/**
@@ -70,19 +70,24 @@ export declare enum AutoModerationRuleTriggerType {
/**
* Check if content contains more mentions than allowed (Maximum of 1 per guild)
*/
MentionSpam = 5
MentionSpam = 5,
/**
* Check if member profile contains words from a user defined list of keywords (Maximum of 1 per guild)
*/
MemberProfile = 6
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata}
*/
export interface APIAutoModerationRuleTriggerMetadata {
/**
* Substrings which will be searched for in content (Maximum of 1000)
*
* A keyword can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less
* See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies)
*
* Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword}
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies | Keyword matching strategies}
*
* Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile}
*/
keyword_filter?: string[];
/**
@@ -95,9 +100,10 @@ export interface APIAutoModerationRuleTriggerMetadata {
* Substrings which will be exempt from triggering the preset trigger type (Maximum of 1000)
*
* A allowed-word can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less
* See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies)
*
* Associated trigger type: {@link AutoModerationRuleTriggerType.KeywordPreset}
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies | Keyword matching strategies}
*
* Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.KeywordPreset}, {@link AutoModerationRuleTriggerType.MemberProfile}
*/
allow_list?: string[];
/**
@@ -105,7 +111,7 @@ export interface APIAutoModerationRuleTriggerMetadata {
*
* Only Rust flavored regex is currently supported (Maximum of 260 characters)
*
* Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword}
* Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile}
*/
regex_patterns?: string[];
/**
@@ -122,7 +128,7 @@ export interface APIAutoModerationRuleTriggerMetadata {
mention_raid_protection_enabled?: boolean;
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types}
*/
export declare enum AutoModerationRuleKeywordPresetType {
/**
@@ -139,16 +145,20 @@ export declare enum AutoModerationRuleKeywordPresetType {
Slurs = 3
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types}
*/
export declare enum AutoModerationRuleEventType {
/**
* When a member sends or edits a message in the guild
*/
MessageSend = 1
MessageSend = 1,
/**
* When a member edits their profile
*/
MemberUpdate = 2
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-auto-moderation-action-structure
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-auto-moderation-action-structure}
*/
export interface APIAutoModerationAction {
/**
@@ -163,7 +173,7 @@ export interface APIAutoModerationAction {
metadata?: APIAutoModerationActionMetadata;
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types}
*/
export declare enum AutoModerationActionType {
/**
@@ -178,10 +188,14 @@ export declare enum AutoModerationActionType {
/**
* Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission
*/
Timeout = 3
Timeout = 3,
/**
* Prevents a member from using text, voice, or other interactions
*/
BlockMemberInteraction = 4
}
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata}
*/
export interface APIAutoModerationActionMetadata {
/**

View File

@@ -1 +1 @@
{"version":3,"file":"autoMod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AAmC;IAC9C;;OAEG;IACH,SAAS,IAAI;IACb;;OAEG;IACH,aAAa,IAAA;IACb;;OAEG;IACH,KAAK,IAAA;CACL;AAED;;GAEG;AACH,oBAAY,2BAA2B;IACtC;;OAEG;IACH,WAAW,IAAI;CACf;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,IAAI,EAAE,wBAAwB,CAAC;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,+BAA+B,CAAC;CAC3C;AAED;;GAEG;AACH,oBAAY,wBAAwB;IACnC;;;OAGG;IACH,YAAY,IAAI;IAChB;;OAEG;IACH,gBAAgB,IAAA;IAChB;;OAEG;IACH,OAAO,IAAA;CACP;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB"}
{"version":3,"file":"autoModeration.d.ts","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,2BAA2B,CAAC;IACxC;;OAEG;IACH,YAAY,EAAE,6BAA6B,CAAC;IAC5C;;OAEG;IACH,gBAAgB,EAAE,oCAAoC,CAAC;IACvD;;OAEG;IACH,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;I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A+B;IAC/C;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB"}

View File

@@ -5,7 +5,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.AutoModerationActionType = exports.AutoModerationRuleEventType = exports.AutoModerationRuleKeywordPresetType = exports.AutoModerationRuleTriggerType = void 0;
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types}
*/
var AutoModerationRuleTriggerType;
(function (AutoModerationRuleTriggerType) {
@@ -25,9 +25,13 @@ var AutoModerationRuleTriggerType;
* Check if content contains more mentions than allowed (Maximum of 1 per guild)
*/
AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["MentionSpam"] = 5] = "MentionSpam";
/**
* Check if member profile contains words from a user defined list of keywords (Maximum of 1 per guild)
*/
AutoModerationRuleTriggerType[AutoModerationRuleTriggerType["MemberProfile"] = 6] = "MemberProfile";
})(AutoModerationRuleTriggerType || (exports.AutoModerationRuleTriggerType = AutoModerationRuleTriggerType = {}));
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types}
*/
var AutoModerationRuleKeywordPresetType;
(function (AutoModerationRuleKeywordPresetType) {
@@ -45,7 +49,7 @@ var AutoModerationRuleKeywordPresetType;
AutoModerationRuleKeywordPresetType[AutoModerationRuleKeywordPresetType["Slurs"] = 3] = "Slurs";
})(AutoModerationRuleKeywordPresetType || (exports.AutoModerationRuleKeywordPresetType = AutoModerationRuleKeywordPresetType = {}));
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types}
*/
var AutoModerationRuleEventType;
(function (AutoModerationRuleEventType) {
@@ -53,9 +57,13 @@ var AutoModerationRuleEventType;
* When a member sends or edits a message in the guild
*/
AutoModerationRuleEventType[AutoModerationRuleEventType["MessageSend"] = 1] = "MessageSend";
/**
* When a member edits their profile
*/
AutoModerationRuleEventType[AutoModerationRuleEventType["MemberUpdate"] = 2] = "MemberUpdate";
})(AutoModerationRuleEventType || (exports.AutoModerationRuleEventType = AutoModerationRuleEventType = {}));
/**
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types}
*/
var AutoModerationActionType;
(function (AutoModerationActionType) {
@@ -72,5 +80,9 @@ var AutoModerationActionType;
* Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission
*/
AutoModerationActionType[AutoModerationActionType["Timeout"] = 3] = "Timeout";
/**
* Prevents a member from using text, voice, or other interactions
*/
AutoModerationActionType[AutoModerationActionType["BlockMemberInteraction"] = 4] = "BlockMemberInteraction";
})(AutoModerationActionType || (exports.AutoModerationActionType = AutoModerationActionType = {}));
//# sourceMappingURL=autoModeration.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"autoModeration.js","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAsDH;;GAEG;AACH,IAAY,6BAiBX;AAjBD,WAAY,6BAA6B;IACxC;;OAEG;IACH,uFAAW,CAAA;IACX;;OAEG;IACH,iFAAQ,CAAA;IACR;;OAEG;IACH,mGAAa,CAAA;IACb;;OAEG;IACH,+FAAW,CAAA;AACZ,CAAC,EAjBW,6BAA6B,6CAA7B,6BAA6B,QAiBxC;AAoDD;;GAEG;AACH,IAAY,mCAaX;AAbD,WAAY,mCAAmC;IAC9C;;OAEG;IACH,uGAAa,CAAA;IACb;;OAEG;IACH,+GAAa,CAAA;IACb;;OAEG;IACH,+FAAK,CAAA;AACN,CAAC,EAbW,mCAAmC,mDAAnC,mCAAmC,QAa9C;AAED;;GAEG;AACH,IAAY,2BAKX;AALD,WAAY,2BAA2B;IACtC;;OAEG;IACH,2FAAe,CAAA;AAChB,CAAC,EALW,2BAA2B,2CAA3B,2BAA2B,QAKtC;AAkBD;;GAEG;AACH,IAAY,wBAcX;AAdD,WAAY,wBAAwB;IACnC;;;OAGG;IACH,uFAAgB,CAAA;IAChB;;OAEG;IACH,+FAAgB,CAAA;IAChB;;OAEG;IACH,6EAAO,CAAA;AACR,CAAC,EAdW,wBAAwB,wCAAxB,wBAAwB,QAcnC"}
{"version":3,"file":"autoModeration.js","sourceRoot":"","sources":["autoModeration.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAsDH;;GAEG;AACH,IAAY,6BAqBX;AArBD,WAAY,6BAA6B;IACxC;;OAEG;IACH,uFAAW,CAAA;IACX;;OAEG;IACH,iFAAQ,CAAA;IACR;;OAEG;IACH,mGAAa,CAAA;IACb;;OAEG;IACH,+FAAW,CAAA;IACX;;OAEG;IACH,mGAAa,CAAA;AACd,CAAC,EArBW,6BAA6B,6CAA7B,6BAA6B,QAqBxC;AAsDD;;GAEG;AACH,IAAY,mCAaX;AAbD,WAAY,mCAAmC;IAC9C;;OAEG;IACH,uGAAa,CAAA;IACb;;OAEG;IACH,+GAAa,CAAA;IACb;;OAEG;IACH,+FAAK,CAAA;AACN,CAAC,EAbW,mCAAmC,mDAAnC,mCAAmC,QAa9C;AAED;;GAEG;AACH,IAAY,2BASX;AATD,WAAY,2BAA2B;IACtC;;OAEG;IACH,2FAAe,CAAA;IACf;;OAEG;IACH,6FAAY,CAAA;AACb,CAAC,EATW,2BAA2B,2CAA3B,2BAA2B,QAStC;AAkBD;;GAEG;AACH,IAAY,wBAkBX;AAlBD,WAAY,wBAAwB;IACnC;;;OAGG;IACH,uFAAgB,CAAA;IAChB;;OAEG;IACH,+FAAgB,CAAA;IAChB;;OAEG;IACH,6EAAO,CAAA;IACP;;OAEG;IACH,2GAAsB,CAAA;AACvB,CAAC,EAlBW,wBAAwB,wCAAxB,wBAAwB,QAkBnC"}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -3,9 +3,9 @@
* Types extracted from https://discord.com/developers/docs/resources/channel
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChannelFlags = exports.SelectMenuDefaultValueType = exports.TextInputStyle = exports.ButtonStyle = exports.ComponentType = exports.AllowedMentionsTypes = exports.AttachmentFlags = exports.EmbedType = exports.ThreadMemberFlags = exports.ThreadAutoArchiveDuration = exports.OverwriteType = exports.MessageFlags = exports.MessageActivityType = exports.MessageType = exports.VideoQualityMode = exports.ChannelType = exports.ForumLayoutType = exports.SortOrderType = void 0;
exports.ChannelFlags = exports.ThreadMemberFlags = exports.ThreadAutoArchiveDuration = exports.OverwriteType = exports.VideoQualityMode = exports.ChannelType = exports.ForumLayoutType = exports.SortOrderType = void 0;
/**
* https://discord.com/developers/docs/resources/channel/#channel-object-sort-order-types
* @see {@link https://discord.com/developers/docs/resources/channel/#channel-object-sort-order-types}
*/
var SortOrderType;
(function (SortOrderType) {
@@ -19,7 +19,7 @@ var SortOrderType;
SortOrderType[SortOrderType["CreationDate"] = 1] = "CreationDate";
})(SortOrderType || (exports.SortOrderType = SortOrderType = {}));
/**
* https://discord.com/developers/docs/resources/channel/#channel-object-forum-layout-types
* @see {@link https://discord.com/developers/docs/resources/channel/#channel-object-forum-layout-types}
*/
var ForumLayoutType;
(function (ForumLayoutType) {
@@ -37,7 +37,7 @@ var ForumLayoutType;
ForumLayoutType[ForumLayoutType["GalleryView"] = 2] = "GalleryView";
})(ForumLayoutType || (exports.ForumLayoutType = ForumLayoutType = {}));
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types}
*/
var ChannelType;
(function (ChannelType) {
@@ -60,13 +60,13 @@ var ChannelType;
/**
* An organizational category that contains up to 50 channels
*
* See https://support.discord.com/hc/articles/115001580171
* @see {@link https://support.discord.com/hc/articles/115001580171}
*/
ChannelType[ChannelType["GuildCategory"] = 4] = "GuildCategory";
/**
* A channel that users can follow and crosspost into their own guild
*
* See https://support.discord.com/hc/articles/360032008192
* @see {@link https://support.discord.com/hc/articles/360032008192}
*/
ChannelType[ChannelType["GuildAnnouncement"] = 5] = "GuildAnnouncement";
/**
@@ -84,13 +84,13 @@ var ChannelType;
/**
* A voice channel for hosting events with an audience
*
* See https://support.discord.com/hc/articles/1500005513722
* @see {@link https://support.discord.com/hc/articles/1500005513722}
*/
ChannelType[ChannelType["GuildStageVoice"] = 13] = "GuildStageVoice";
/**
* The channel in a Student Hub containing the listed servers
*
* See https://support.discord.com/hc/articles/4406046651927
* @see {@link https://support.discord.com/hc/articles/4406046651927}
*/
ChannelType[ChannelType["GuildDirectory"] = 14] = "GuildDirectory";
/**
@@ -100,35 +100,34 @@ var ChannelType;
/**
* A channel like forum channels but contains media for server subscriptions
*
* See https://creator-support.discord.com/hc/articles/14346342766743
* @see {@link https://creator-support.discord.com/hc/articles/14346342766743}
*/
ChannelType[ChannelType["GuildMedia"] = 16] = "GuildMedia";
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
/**
* A channel that users can follow and crosspost into their own guild
*
* @deprecated This is the old name for {@apilink ChannelType#GuildAnnouncement}
*
* See https://support.discord.com/hc/articles/360032008192
* @deprecated This is the old name for {@link ChannelType.GuildAnnouncement}
* @see {@link https://support.discord.com/hc/articles/360032008192}
*/
ChannelType[ChannelType["GuildNews"] = 5] = "GuildNews";
/**
* A temporary sub-channel within a Guild Announcement channel
*
* @deprecated This is the old name for {@apilink ChannelType#AnnouncementThread}
* @deprecated This is the old name for {@link ChannelType.AnnouncementThread}
*/
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
ChannelType[ChannelType["GuildNewsThread"] = 10] = "GuildNewsThread";
/**
* A temporary sub-channel within a Guild Text channel
*
* @deprecated This is the old name for {@apilink ChannelType#PublicThread}
* @deprecated This is the old name for {@link ChannelType.PublicThread}
*/
ChannelType[ChannelType["GuildPublicThread"] = 11] = "GuildPublicThread";
/**
* A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission
*
* @deprecated This is the old name for {@apilink ChannelType#PrivateThread}
* @deprecated This is the old name for {@link ChannelType.PrivateThread}
*/
ChannelType[ChannelType["GuildPrivateThread"] = 12] = "GuildPrivateThread";
})(ChannelType || (exports.ChannelType = ChannelType = {}));
@@ -143,111 +142,6 @@ var VideoQualityMode;
*/
VideoQualityMode[VideoQualityMode["Full"] = 2] = "Full";
})(VideoQualityMode || (exports.VideoQualityMode = VideoQualityMode = {}));
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-types
*/
var MessageType;
(function (MessageType) {
MessageType[MessageType["Default"] = 0] = "Default";
MessageType[MessageType["RecipientAdd"] = 1] = "RecipientAdd";
MessageType[MessageType["RecipientRemove"] = 2] = "RecipientRemove";
MessageType[MessageType["Call"] = 3] = "Call";
MessageType[MessageType["ChannelNameChange"] = 4] = "ChannelNameChange";
MessageType[MessageType["ChannelIconChange"] = 5] = "ChannelIconChange";
MessageType[MessageType["ChannelPinnedMessage"] = 6] = "ChannelPinnedMessage";
MessageType[MessageType["UserJoin"] = 7] = "UserJoin";
MessageType[MessageType["GuildBoost"] = 8] = "GuildBoost";
MessageType[MessageType["GuildBoostTier1"] = 9] = "GuildBoostTier1";
MessageType[MessageType["GuildBoostTier2"] = 10] = "GuildBoostTier2";
MessageType[MessageType["GuildBoostTier3"] = 11] = "GuildBoostTier3";
MessageType[MessageType["ChannelFollowAdd"] = 12] = "ChannelFollowAdd";
MessageType[MessageType["GuildDiscoveryDisqualified"] = 14] = "GuildDiscoveryDisqualified";
MessageType[MessageType["GuildDiscoveryRequalified"] = 15] = "GuildDiscoveryRequalified";
MessageType[MessageType["GuildDiscoveryGracePeriodInitialWarning"] = 16] = "GuildDiscoveryGracePeriodInitialWarning";
MessageType[MessageType["GuildDiscoveryGracePeriodFinalWarning"] = 17] = "GuildDiscoveryGracePeriodFinalWarning";
MessageType[MessageType["ThreadCreated"] = 18] = "ThreadCreated";
MessageType[MessageType["Reply"] = 19] = "Reply";
MessageType[MessageType["ChatInputCommand"] = 20] = "ChatInputCommand";
MessageType[MessageType["ThreadStarterMessage"] = 21] = "ThreadStarterMessage";
MessageType[MessageType["GuildInviteReminder"] = 22] = "GuildInviteReminder";
MessageType[MessageType["ContextMenuCommand"] = 23] = "ContextMenuCommand";
MessageType[MessageType["AutoModerationAction"] = 24] = "AutoModerationAction";
MessageType[MessageType["RoleSubscriptionPurchase"] = 25] = "RoleSubscriptionPurchase";
MessageType[MessageType["InteractionPremiumUpsell"] = 26] = "InteractionPremiumUpsell";
MessageType[MessageType["StageStart"] = 27] = "StageStart";
MessageType[MessageType["StageEnd"] = 28] = "StageEnd";
MessageType[MessageType["StageSpeaker"] = 29] = "StageSpeaker";
/**
* @unstable https://github.com/discord/discord-api-docs/pull/5927#discussion_r1107678548
*/
MessageType[MessageType["StageRaiseHand"] = 30] = "StageRaiseHand";
MessageType[MessageType["StageTopic"] = 31] = "StageTopic";
MessageType[MessageType["GuildApplicationPremiumSubscription"] = 32] = "GuildApplicationPremiumSubscription";
})(MessageType || (exports.MessageType = MessageType = {}));
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
*/
var MessageActivityType;
(function (MessageActivityType) {
MessageActivityType[MessageActivityType["Join"] = 1] = "Join";
MessageActivityType[MessageActivityType["Spectate"] = 2] = "Spectate";
MessageActivityType[MessageActivityType["Listen"] = 3] = "Listen";
MessageActivityType[MessageActivityType["JoinRequest"] = 5] = "JoinRequest";
})(MessageActivityType || (exports.MessageActivityType = MessageActivityType = {}));
/**
* https://discord.com/developers/docs/resources/channel#message-object-message-flags
*/
var MessageFlags;
(function (MessageFlags) {
/**
* This message has been published to subscribed channels (via Channel Following)
*/
MessageFlags[MessageFlags["Crossposted"] = 1] = "Crossposted";
/**
* This message originated from a message in another channel (via Channel Following)
*/
MessageFlags[MessageFlags["IsCrosspost"] = 2] = "IsCrosspost";
/**
* Do not include any embeds when serializing this message
*/
MessageFlags[MessageFlags["SuppressEmbeds"] = 4] = "SuppressEmbeds";
/**
* The source message for this crosspost has been deleted (via Channel Following)
*/
MessageFlags[MessageFlags["SourceMessageDeleted"] = 8] = "SourceMessageDeleted";
/**
* This message came from the urgent message system
*/
MessageFlags[MessageFlags["Urgent"] = 16] = "Urgent";
/**
* This message has an associated thread, which shares its id
*/
MessageFlags[MessageFlags["HasThread"] = 32] = "HasThread";
/**
* This message is only visible to the user who invoked the Interaction
*/
MessageFlags[MessageFlags["Ephemeral"] = 64] = "Ephemeral";
/**
* This message is an Interaction Response and the bot is "thinking"
*/
MessageFlags[MessageFlags["Loading"] = 128] = "Loading";
/**
* This message failed to mention some roles and add their members to the thread
*/
MessageFlags[MessageFlags["FailedToMentionSomeRolesInThread"] = 256] = "FailedToMentionSomeRolesInThread";
/**
* @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
MessageFlags[MessageFlags["ShouldShowLinkNotDiscordWarning"] = 1024] = "ShouldShowLinkNotDiscordWarning";
/**
* This message will not trigger push and desktop notifications
*/
MessageFlags[MessageFlags["SuppressNotifications"] = 4096] = "SuppressNotifications";
/**
* This message is a voice message
*/
MessageFlags[MessageFlags["IsVoiceMessage"] = 8192] = "IsVoiceMessage";
})(MessageFlags || (exports.MessageFlags = MessageFlags = {}));
var OverwriteType;
(function (OverwriteType) {
OverwriteType[OverwriteType["Role"] = 0] = "Role";
@@ -280,146 +174,7 @@ var ThreadMemberFlags;
ThreadMemberFlags[ThreadMemberFlags["NoMessages"] = 8] = "NoMessages";
})(ThreadMemberFlags || (exports.ThreadMemberFlags = ThreadMemberFlags = {}));
/**
* 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*
*/
var EmbedType;
(function (EmbedType) {
/**
* Generic embed rendered from embed attributes
*/
EmbedType["Rich"] = "rich";
/**
* Image embed
*/
EmbedType["Image"] = "image";
/**
* Video embed
*/
EmbedType["Video"] = "video";
/**
* Animated gif image embed rendered as a video embed
*/
EmbedType["GIFV"] = "gifv";
/**
* Article embed
*/
EmbedType["Article"] = "article";
/**
* Link embed
*/
EmbedType["Link"] = "link";
/**
* Auto moderation alert embed
*
* @unstable This embed type is currently not documented by Discord, but it is returned in the auto moderation system messages.
*/
EmbedType["AutoModerationMessage"] = "auto_moderation_message";
})(EmbedType || (exports.EmbedType = EmbedType = {}));
/**
* https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure-attachment-flags
*/
var AttachmentFlags;
(function (AttachmentFlags) {
/**
* This attachment has been edited using the remix feature on mobile
*/
AttachmentFlags[AttachmentFlags["IsRemix"] = 4] = "IsRemix";
})(AttachmentFlags || (exports.AttachmentFlags = AttachmentFlags = {}));
/**
* https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types
*/
var AllowedMentionsTypes;
(function (AllowedMentionsTypes) {
/**
* Controls @everyone and @here mentions
*/
AllowedMentionsTypes["Everyone"] = "everyone";
/**
* Controls role mentions
*/
AllowedMentionsTypes["Role"] = "roles";
/**
* Controls user mentions
*/
AllowedMentionsTypes["User"] = "users";
})(AllowedMentionsTypes || (exports.AllowedMentionsTypes = AllowedMentionsTypes = {}));
/**
* https://discord.com/developers/docs/interactions/message-components#component-object-component-types
*/
var ComponentType;
(function (ComponentType) {
/**
* Action Row component
*/
ComponentType[ComponentType["ActionRow"] = 1] = "ActionRow";
/**
* Button component
*/
ComponentType[ComponentType["Button"] = 2] = "Button";
/**
* Select menu for picking from defined text options
*/
ComponentType[ComponentType["StringSelect"] = 3] = "StringSelect";
/**
* Text Input component
*/
ComponentType[ComponentType["TextInput"] = 4] = "TextInput";
/**
* Select menu for users
*/
ComponentType[ComponentType["UserSelect"] = 5] = "UserSelect";
/**
* Select menu for roles
*/
ComponentType[ComponentType["RoleSelect"] = 6] = "RoleSelect";
/**
* Select menu for users and roles
*/
ComponentType[ComponentType["MentionableSelect"] = 7] = "MentionableSelect";
/**
* Select menu for channels
*/
ComponentType[ComponentType["ChannelSelect"] = 8] = "ChannelSelect";
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
/**
* Select menu for picking from defined text options
*
* @deprecated This is the old name for {@apilink ComponentType#StringSelect}
*/
ComponentType[ComponentType["SelectMenu"] = 3] = "SelectMenu";
})(ComponentType || (exports.ComponentType = ComponentType = {}));
/**
* https://discord.com/developers/docs/interactions/message-components#button-object-button-styles
*/
var ButtonStyle;
(function (ButtonStyle) {
ButtonStyle[ButtonStyle["Primary"] = 1] = "Primary";
ButtonStyle[ButtonStyle["Secondary"] = 2] = "Secondary";
ButtonStyle[ButtonStyle["Success"] = 3] = "Success";
ButtonStyle[ButtonStyle["Danger"] = 4] = "Danger";
ButtonStyle[ButtonStyle["Link"] = 5] = "Link";
})(ButtonStyle || (exports.ButtonStyle = ButtonStyle = {}));
/**
* https://discord.com/developers/docs/interactions/message-components#text-inputs-text-input-styles
*/
var TextInputStyle;
(function (TextInputStyle) {
TextInputStyle[TextInputStyle["Short"] = 1] = "Short";
TextInputStyle[TextInputStyle["Paragraph"] = 2] = "Paragraph";
})(TextInputStyle || (exports.TextInputStyle = TextInputStyle = {}));
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
*/
var SelectMenuDefaultValueType;
(function (SelectMenuDefaultValueType) {
SelectMenuDefaultValueType["Channel"] = "channel";
SelectMenuDefaultValueType["Role"] = "role";
SelectMenuDefaultValueType["User"] = "user";
})(SelectMenuDefaultValueType || (exports.SelectMenuDefaultValueType = SelectMenuDefaultValueType = {}));
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-flags
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-flags}
*/
var ChannelFlags;
(function (ChannelFlags) {

View File

@@ -1 +1 @@
{"version":3,"file":"channel.js","sourceR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;IAC/B;;OAEG;IACH,2FAAkC,CAAA;AACnC,CAAC,EAtCW,YAAY,4BAAZ,YAAY,QAsCvB"}
{"version":3,"file":"channel.js","sourceRoot":"","sources":["channel.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAqUH;;GAEG;AACH,IAAY,aASX;AATD,WAAY,aAAa;IACxB;;OAEG;IACH,qEAAc,CAAA;IACd;;OAEG;IACH,iEAAY,CAAA;AACb,CAAC,EATW,aAAa,6BAAb,aAAa,QASxB;AAED;;GAEG;AACH,IAAY,eAaX;AAbD,WAAY,eAAe;IAC1B;;OAEG;IACH,yDAAM,CAAA;IACN;;OAEG;IACH,6DAAQ,CAAA;IACR;;OAEG;IACH,mEAAW,CAAA;AACZ,CAAC,EAbW,eAAe,+BAAf,eAAe,QAa1B;AA4ED;;GAEG;AACH,IAAY,WA4FX;AA5FD,WAAY,WAAW;IACtB;;OAEG;IACH,uDAAS,CAAA;IACT;;OAEG;IACH,yCAAE,CAAA;IACF;;OAEG;IACH,yDAAU,CAAA;IACV;;OAEG;IACH,mDAAO,CAAA;IACP;;;;OAIG;IACH,+DAAa,CAAA;IACb;;;;OAIG;IACH,uEAAiB,CAAA;IACjB;;OAEG;IACH,0EAAuB,CAAA;IACvB;;OAEG;IACH,8DAAY,CAAA;IACZ;;OAEG;IACH,gEAAa,CAAA;IACb;;;;OAIG;IACH,oEAAe,CAAA;IACf;;;;OAIG;IACH,kEAAc,CAAA;IACd;;OAEG;IACH,0DAAU,CAAA;IACV;;;;OAIG;IACH,0DAAU,CAAA;IAEV,6EAA6E;IAE7E;;;;;OAKG;IACH,uDAAa,CAAA;IACb;;;;OAIG;IACH,uEAAuE;IACvE,oEAAoB,CAAA;IACpB;;;;OAIG;IACH,wEAAsB,CAAA;IACtB;;;;OAIG;IACH,0EAAuB,CAAA;AACxB,CAAC,EA5FW,WAAW,2BAAX,WAAW,QA4FtB;AAED,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC3B;;OAEG;IACH,uDAAQ,CAAA;IACR;;OAEG;IACH,uDAAI,CAAA;AACL,CAAC,EATW,gBAAgB,gCAAhB,gBAAgB,QAS3B;AA4CD,IAAY,aAGX;AAHD,WAAY,aAAa;IACxB,iDAAI,CAAA;IACJ,qDAAM,CAAA;AACP,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAgCD,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACpC,gFAAY,CAAA;IACZ,gFAAc,CAAA;IACd,sFAAiB,CAAA;IACjB,mFAAgB,CAAA;AACjB,CAAC,EALW,yBAAyB,yCAAzB,yBAAyB,QAKpC;AAsCD,IAAY,iBAiBX;AAjBD,WAAY,iBAAiB;IAC5B;;OAEG;IACH,2EAAsB,CAAA;IACtB;;OAEG;IACH,uEAAoB,CAAA;IACpB;;OAEG;IACH,yEAAqB,CAAA;IACrB;;OAEG;IACH,qEAAmB,CAAA;AACpB,CAAC,EAjBW,iBAAiB,iCAAjB,iBAAiB,QAiB5B;AAaD;;GAEG;AACH,IAAY,YAsCX;AAtCD,WAAY,YAAY;IACvB;;OAEG;IACH,uEAAyB,CAAA;IACzB;;OAEG;IACH,mDAAe,CAAA;IACf;;OAEG;IACH,iFAA8B,CAAA;IAC9B;;;OAGG;IACH,4DAAmB,CAAA;IACnB;;OAEG;IACH,oDAAe,CAAA;IACf;;OAEG;IACH,qFAA+B,CAAA;IAC/B;;OAEG;IACH,uDAAgB,CAAA;IAChB;;OAEG;IACH,qFAA+B,CAAA;IAC/B;;OAEG;IACH,2FAAkC,CAAA;AACnC,CAAC,EAtCW,YAAY,4BAAZ,YAAY,QAsCvB"}

View File

@@ -2,6 +2,7 @@
* Types extracted from https://discord.com/developers/docs/resources/emoji
*/
import type { Snowflake } from '../../globals';
import type { _NonNullableFields } from '../../utils/internals';
import type { APIRole } from './permissions';
import type { APIUser } from './user';
/**
@@ -22,7 +23,7 @@ export interface APIPartialEmoji {
animated?: boolean;
}
/**
* https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure}
*/
export interface APIEmoji extends APIPartialEmoji {
/**
@@ -46,4 +47,33 @@ export interface APIEmoji extends APIPartialEmoji {
*/
available?: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-applicationowned-emoji}
*/
export type APIApplicationEmoji = _NonNullableFields<Required<Pick<APIEmoji, 'animated' | 'id' | 'name' | 'user'>>> & {
/**
* Roles allowed to use this emoji.
*
* @remarks Always empty.
*/
roles: [];
/**
* Whether this emoji must be wrapped in colons.
*
* @remarks Always `true`.
*/
require_colons: true;
/**
* Whether this emoji is managed.
*
* @remarks Always `false`.
*/
managed: false;
/**
* Whether this emoji is available.
*
* @remarks Always `true`.
*/
available: true;
};
//# sourceMappingURL=emoji.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"emoji.d.ts","sourceRoot":"","sources":["emoji.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,EAAE,EAAE,SAAS,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,eAAe;IAChD;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;O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 +4,11 @@
* - https://discord.com/developers/docs/topics/gateway-events
*/
import type { Snowflake } from '../../globals';
import type { APIChannel, APIThreadMember } from './channel';
import type { APIThreadChannel, APIThreadMember } from './channel';
import type { APIEmoji } from './emoji';
import type { APIUser } from './user';
/**
* https://discord.com/developers/docs/topics/gateway#get-gateway
* @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway}
*/
export interface APIGatewayInfo {
/**
@@ -17,24 +17,24 @@ export interface APIGatewayInfo {
url: string;
}
/**
* https://discord.com/developers/docs/topics/gateway#get-gateway-bot
* @see {@link 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
* @see {@link 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
* @see {@link 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
* @see {@link https://discord.com/developers/docs/topics/gateway#session-start-limit-object}
*/
export interface APIGatewaySessionStartLimit {
/**
@@ -55,22 +55,18 @@ export interface APIGatewaySessionStartLimit {
max_concurrency: number;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields
* @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence}
*/
export interface GatewayPresenceUpdate {
export interface GatewayGuildMembersChunkPresence {
/**
* 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
* @see {@link 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"
*/
@@ -78,18 +74,27 @@ export interface GatewayPresenceUpdate {
/**
* User's current activities
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object}
*/
activities?: GatewayActivity[];
/**
* User's platform-dependent status
*
* See https://discord.com/developers/docs/topics/gateway-events#client-status-object
* @see {@link https://discord.com/developers/docs/topics/gateway-events#client-status-object}
*/
client_status?: GatewayPresenceClientStatus;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types
* @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields}
*/
export interface GatewayPresenceUpdate extends GatewayGuildMembersChunkPresence {
/**
* ID of the guild
*/
guild_id: Snowflake;
}
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types}
*/
export declare enum PresenceUpdateStatus {
Online = "online",
@@ -103,7 +108,7 @@ export declare enum PresenceUpdateStatus {
}
export type PresenceUpdateReceiveStatus = Exclude<PresenceUpdateStatus, PresenceUpdateStatus.Invisible>;
/**
* https://discord.com/developers/docs/topics/gateway-events#client-status-object
* @see {@link https://discord.com/developers/docs/topics/gateway-events#client-status-object}
*/
export interface GatewayPresenceClientStatus {
/**
@@ -120,7 +125,7 @@ export interface GatewayPresenceClientStatus {
web?: PresenceUpdateReceiveStatus;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure}
*/
export interface GatewayActivity {
/**
@@ -136,7 +141,7 @@ export interface GatewayActivity {
/**
* Activity type
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types}
*/
type: ActivityType;
/**
@@ -167,18 +172,32 @@ export interface GatewayActivity {
* Application id for the game
*/
application_id?: Snowflake;
/**
* Controls which field is displayed in the user's status text in the member list
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
*/
status_display_type?: StatusDisplayType | null;
/**
* What the player is currently doing
*/
details?: string | null;
/**
* URL that is linked when clicking on the details text
*/
details_url?: string | null;
/**
* The user's current party status, or the text used for a custom status
*/
state?: string | null;
/**
* URL that is linked when clicking on the state text
*/
state_url?: string | null;
/**
* The emoji used for a custom status
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji}
*/
emoji?: GatewayActivityEmoji;
/**
@@ -188,19 +207,19 @@ export interface GatewayActivity {
/**
* Information for the current party of the player
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party}
*/
party?: GatewayActivityParty;
/**
* Images for the presence and their hover texts
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
*/
assets?: GatewayActivityAssets;
/**
* Secrets for Rich Presence joining and spectating
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
*/
secrets?: GatewayActivitySecrets;
/**
@@ -210,9 +229,8 @@ export interface GatewayActivity {
/**
* Activity flags `OR`d together, describes what the payload includes
*
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags
*
* See https://en.wikipedia.org/wiki/Bit_field
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
*/
flags?: ActivityFlags;
/**
@@ -235,36 +253,55 @@ export declare enum ActivityPlatform {
PS5 = "ps5"
}
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types}
*/
export declare enum ActivityType {
/**
* Playing {game}
* Playing \{game\}
*/
Playing = 0,
/**
* Streaming {details}
* Streaming \{details\}
*/
Streaming = 1,
/**
* Listening to {name}
* Listening to \{name\}
*/
Listening = 2,
/**
* Watching {details}
* Watching \{details\}
*/
Watching = 3,
/**
* {emoji} {state}
* \{emoji\} \{state\}
*/
Custom = 4,
/**
* Competing in {name}
* Competing in \{name\}
*/
Competing = 5
}
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps
* Controls which field is used in the user's status message
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
*/
export declare enum StatusDisplayType {
/**
* Playing \{name\}
*/
Name = 0,
/**
* Playing \{state\}
*/
State = 1,
/**
* Playing \{details\}
*/
Details = 2
}
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps}
*/
export interface GatewayActivityTimestamps {
/**
@@ -277,11 +314,11 @@ export interface GatewayActivityTimestamps {
end?: number;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji}
*/
export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'animated' | 'id'>> & Pick<APIEmoji, 'name'>;
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party}
*/
export interface GatewayActivityParty {
/**
@@ -294,15 +331,15 @@ export interface GatewayActivityParty {
size?: [current_size: number, max_size: number];
}
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
*/
export type GatewayActivityAssets = Partial<Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>>;
export type GatewayActivityAssets = Partial<Record<'large_image' | 'large_text' | 'large_url' | 'small_image' | 'small_text' | 'small_url', string>>;
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
*/
export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>;
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}
*/
export declare enum ActivityFlags {
Instance = 1,
@@ -326,7 +363,7 @@ export interface GatewayActivityButton {
url: string;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-list-sync-thread-list-sync-event-fields
* @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-list-sync-thread-list-sync-event-fields}
*/
export interface GatewayThreadListSync {
/**
@@ -340,14 +377,14 @@ export interface GatewayThreadListSync {
/**
* Array of the synced threads
*/
threads: APIChannel[];
threads: APIThreadChannel[];
/**
* The member objects for the client user in each joined thread that was synced
*/
members: APIThreadMember[];
}
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-members-update-thread-members-update-event-fields
* @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-members-update-thread-members-update-event-fields}
*/
export interface GatewayThreadMembersUpdate {
/**

View File

@@ -1 +1 @@
{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACxD;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,mBAAmB,EAAE,2BAA2B,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC3C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;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,EAAE,eAAe,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C;;OAEG;IACH,EAAE,EAAE,SAAS,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,eAAe,EAAE,CAAC;IAClC;;OAEG;IACH,kBAAkB,CAAC,EAAE,SAAS,EAAE,CAAC;CACjC"}

View File

@@ -5,9 +5,9 @@
* - https://discord.com/developers/docs/topics/gateway-events
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ActivityFlags = exports.ActivityType = exports.ActivityPlatform = exports.PresenceUpdateStatus = void 0;
exports.ActivityFlags = exports.StatusDisplayType = exports.ActivityType = exports.ActivityPlatform = exports.PresenceUpdateStatus = void 0;
/**
* https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types
* @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types}
*/
var PresenceUpdateStatus;
(function (PresenceUpdateStatus) {
@@ -36,37 +36,57 @@ var ActivityPlatform;
ActivityPlatform["PS5"] = "ps5";
})(ActivityPlatform || (exports.ActivityPlatform = ActivityPlatform = {}));
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types}
*/
var ActivityType;
(function (ActivityType) {
/**
* Playing {game}
* Playing \{game\}
*/
ActivityType[ActivityType["Playing"] = 0] = "Playing";
/**
* Streaming {details}
* Streaming \{details\}
*/
ActivityType[ActivityType["Streaming"] = 1] = "Streaming";
/**
* Listening to {name}
* Listening to \{name\}
*/
ActivityType[ActivityType["Listening"] = 2] = "Listening";
/**
* Watching {details}
* Watching \{details\}
*/
ActivityType[ActivityType["Watching"] = 3] = "Watching";
/**
* {emoji} {state}
* \{emoji\} \{state\}
*/
ActivityType[ActivityType["Custom"] = 4] = "Custom";
/**
* Competing in {name}
* Competing in \{name\}
*/
ActivityType[ActivityType["Competing"] = 5] = "Competing";
})(ActivityType || (exports.ActivityType = ActivityType = {}));
/**
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags
* Controls which field is used in the user's status message
*
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
*/
var StatusDisplayType;
(function (StatusDisplayType) {
/**
* Playing \{name\}
*/
StatusDisplayType[StatusDisplayType["Name"] = 0] = "Name";
/**
* Playing \{state\}
*/
StatusDisplayType[StatusDisplayType["State"] = 1] = "State";
/**
* Playing \{details\}
*/
StatusDisplayType[StatusDisplayType["Details"] = 2] = "Details";
})(StatusDisplayType || (exports.StatusDisplayType = StatusDisplayType = {}));
/**
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}
*/
var ActivityFlags;
(function (ActivityFlags) {

View File

@@ -1 +1 @@
{"version":3,"file":"gateway.js","sourceRoot":"","sources":["gateway.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA4FH;;GAEG;AACH,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC/B,yCAAiB,CAAA;IACjB,4CAAoB,CAAA;IACpB,qCAAa,CAAA;IACb;;OAEG;IACH,+CAAuB,CAAA;IACvB,2CAAmB,CAAA;AACpB,CAAC,EATW,oBAAoB,oCAApB,oBAAoB,QAS/B;AA4HD;;;GAGG;AACH,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC3B,uCAAmB,CAAA;IACnB,iCAAa,CAAA;IACb,uCAAmB,CAAA;IACnB,+BAAW,CAAA;IACX,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,+BAAW,CAAA;IACX,+BAAW,CAAA;AACZ,CAAC,EATW,gBAAgB,gCAAhB,gBAAgB,QAS3B;AAED;;GAEG;AACH,IAAY,YAyBX;AAzBD,WAAY,YAAY;IACvB;;OAEG;IACH,qDAAO,CAAA;IACP;;OAEG;IACH,yDAAS,CAAA;IACT;;OAEG;IACH,yDAAS,CAAA;IAC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;AAED;;;;GAIG;AACH,IAAY,iBAaX;AAbD,WAAY,iBAAiB;IAC5B;;OAEG;IACH,yDAAI,CAAA;IACJ;;OAEG;IACH,2DAAK,CAAA;IACL;;OAEG;IACH,+DAAO,CAAA;AACR,CAAC,EAbW,iBAAiB,iCAAjB,iBAAiB,QAa5B;AA+CD;;GAEG;AACH,IAAY,aAUX;AAVD,WAAY,aAAa;IACxB,yDAAiB,CAAA;IACjB,iDAAa,CAAA;IACb,yDAAiB,CAAA;IACjB,+DAAoB,CAAA;IACpB,kDAAa,CAAA;IACb,kDAAa,CAAA;IACb,gFAA4B,CAAA;IAC5B,2FAAiC,CAAA;IACjC,2DAAiB,CAAA;AAClB,CAAC,EAVW,aAAa,6BAAb,aAAa,QAUxB"}

View File

@@ -2,29 +2,32 @@
* Types extracted from https://discord.com/developers/docs/resources/guild
*/
import type { Permissions, Snowflake } from '../../globals';
import type { Locale } from '../../rest/common';
import type { APIEmoji, APIPartialEmoji } from './emoji';
import type { PresenceUpdateReceiveStatus } from './gateway';
import type { OAuth2Scopes } from './oauth2';
import type { APIRole } from './permissions';
import type { APISticker } from './sticker';
import type { APIUser } from './user';
/**
* https://discord.com/developers/docs/resources/guild#unavailable-guild-object
*/
export interface APIUnavailableGuild {
import type { APIAvatarDecorationData, APIUser } from './user';
export interface APIBaseGuild {
/**
* Guild id
*/
id: Snowflake;
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#unavailable-guild-object}
*/
export interface APIUnavailableGuild extends APIBaseGuild {
/**
* `true` if this guild is unavailable due to an outage
*/
unavailable: boolean;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure}
*/
export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'>, Pick<APIGuild, 'welcome_screen'> {
export interface APIPartialGuild extends APIBaseGuild {
/**
* Guild name (2-100 characters, excluding trailing and leading whitespace)
*/
@@ -32,19 +35,19 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
/**
* Icon hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
icon: string | null;
/**
* Splash hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
splash: string | null;
/**
* Banner hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
banner?: string | null;
/**
@@ -54,34 +57,44 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
/**
* Enabled guild features
*
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
* @see {@link 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
* @see {@link 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;
/**
* The welcome screen of a Community guild, shown to new members
*
* Returned in the invite object
*/
welcome_screen?: APIGuildWelcomeScreen;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
* Source guild of channel follower webhooks.
*/
export type APIWebhookSourceGuild = Pick<APIPartialGuild, 'icon' | 'id' | 'name'>;
/**
* @see {@link 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
* @see {@link 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
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
discovery_splash: string | null;
/**
@@ -99,14 +112,13 @@ export interface APIGuild extends APIPartialGuild {
*
* **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
* @see {@link 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
*
* @see {@link 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;
@@ -129,43 +141,43 @@ export interface APIGuild extends APIPartialGuild {
/**
* Verification level required for the guild
*
* See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
* @see {@link 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
* @see {@link 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
* @see {@link 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
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object}
*/
roles: APIRole[];
/**
* Custom guild emojis
*
* See https://discord.com/developers/docs/resources/emoji#emoji-object
* @see {@link 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
* @see {@link 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
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level}
*/
mfa_level: GuildMFALevel;
/**
@@ -179,7 +191,7 @@ export interface APIGuild extends APIPartialGuild {
/**
* System channel flags
*
* See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags}
*/
system_channel_flags: GuildSystemChannelFlags;
/**
@@ -205,13 +217,13 @@ export interface APIGuild extends APIPartialGuild {
/**
* Banner hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link 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
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier}
*/
premium_tier: GuildPremiumTier;
/**
@@ -219,11 +231,11 @@ export interface APIGuild extends APIPartialGuild {
*/
premium_subscription_count?: number;
/**
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
*
* @default "en-US"
* @defaultValue `"en-US"`
*/
preferred_locale: string;
preferred_locale: Locale;
/**
* The id of the channel where admins and moderators of Community guilds receive notices from Discord
*/
@@ -246,22 +258,16 @@ export interface APIGuild extends APIPartialGuild {
* returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `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
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level}
*/
nsfw_level: GuildNSFWLevel;
/**
* Custom guild stickers
*
* See https://discord.com/developers/docs/resources/sticker#sticker-object
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
*/
stickers: APISticker[];
/**
@@ -276,16 +282,32 @@ export interface APIGuild extends APIPartialGuild {
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
*/
safety_alerts_channel_id: Snowflake | null;
/**
* The incidents data for this guild
*/
incidents_data: APIIncidentsData | null;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure}
*/
export interface APIPartialInteractionGuild extends Pick<APIGuild, 'features' | 'id'> {
/**
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
*
* @unstable https://github.com/discord/discord-api-docs/issues/6938
* @defaultValue `"en-US"`
*/
locale: Locale;
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level}
*/
export declare enum GuildDefaultMessageNotifications {
AllMessages = 0,
OnlyMentions = 1
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level}
*/
export declare enum GuildExplicitContentFilter {
Disabled = 0,
@@ -293,14 +315,14 @@ export declare enum GuildExplicitContentFilter {
AllMembers = 2
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level}
*/
export declare enum GuildMFALevel {
None = 0,
Elevated = 1
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level}
*/
export declare enum GuildNSFWLevel {
Default = 0,
@@ -309,7 +331,7 @@ export declare enum GuildNSFWLevel {
AgeRestricted = 3
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-verification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level}
*/
export declare enum GuildVerificationLevel {
/**
@@ -334,7 +356,7 @@ export declare enum GuildVerificationLevel {
VeryHigh = 4
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier}
*/
export declare enum GuildPremiumTier {
None = 0,
@@ -348,7 +370,7 @@ export declare enum GuildHubType {
College = 2
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags}
*/
export declare enum GuildSystemChannelFlags {
/**
@@ -377,7 +399,7 @@ export declare enum GuildSystemChannelFlags {
SuppressRoleSubscriptionPurchaseNotificationReplies = 32
}
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-features
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
*/
export declare enum GuildFeature {
/**
@@ -391,7 +413,7 @@ export declare enum GuildFeature {
/**
* Guild is using the old permissions configuration behavior
*
* See https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes
* @see {@link https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes}
*/
ApplicationCommandPermissionsV2 = "APPLICATION_COMMAND_PERMISSIONS_V2",
/**
@@ -433,8 +455,7 @@ export declare enum GuildFeature {
/**
* Guild is a Student Hub
*
* See https://support.discord.com/hc/articles/4406046651927
*
* @see {@link https://support.discord.com/hc/articles/4406046651927}
* @unstable This feature is currently not documented by Discord, but has known value
*/
Hub = "HUB",
@@ -449,8 +470,7 @@ export declare enum GuildFeature {
/**
* Guild is in a Student Hub
*
* See https://support.discord.com/hc/articles/4406046651927
*
* @see {@link https://support.discord.com/hc/articles/4406046651927}
* @unstable This feature is currently not documented by Discord, but has known value
*/
LinkedToHub = "LINKED_TO_HUB",
@@ -458,6 +478,10 @@ export declare enum GuildFeature {
* Guild has enabled Membership Screening
*/
MemberVerificationGateEnabled = "MEMBER_VERIFICATION_GATE_ENABLED",
/**
* Guild has increased custom soundboard sound slots
*/
MoreSoundboard = "MORE_SOUNDBOARD",
/**
* Guild has enabled monetization
*
@@ -501,6 +525,10 @@ export declare enum GuildFeature {
* Guild has enabled role subscriptions
*/
RoleSubscriptionsEnabled = "ROLE_SUBSCRIPTIONS_ENABLED",
/**
* Guild has created soundboard sounds
*/
Soundboard = "SOUNDBOARD",
/**
* Guild has enabled ticketed events
*/
@@ -520,10 +548,28 @@ export declare enum GuildFeature {
/**
* Guild has enabled the welcome screen
*/
WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED"
WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED",
/**
* Guild has access to set guild tags
*/
GuildTags = "GUILD_TAGS",
/**
* Guild is able to set gradient colors to roles
*/
EnhancedRoleColors = "ENHANCED_ROLE_COLORS",
/**
* Guild has access to guest invites
*/
GuestsEnabled = "GUESTS_ENABLED",
/**
* Guild has migrated to the new pin messages permission
*
* @unstable This feature is currently not documented by Discord, but has known value
*/
PinPermissionMigrationComplete = "PIN_PERMISSION_MIGRATION_COMPLETE"
}
/**
* https://discord.com/developers/docs/resources/guild#guild-preview-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-preview-object}
*/
export interface APIGuildPreview {
/**
@@ -537,31 +583,31 @@ export interface APIGuildPreview {
/**
* Icon hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
icon: string | null;
/**
* Splash hash
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link 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
* @see {@link 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
* @see {@link 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
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
*/
features: GuildFeature[];
/**
@@ -582,7 +628,7 @@ export interface APIGuildPreview {
stickers: APISticker[];
}
/**
* https://discord.com/developers/docs/resources/guild#guild-widget-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object}
*/
export interface APIGuildWidgetSettings {
/**
@@ -595,53 +641,25 @@ export interface APIGuildWidgetSettings {
channel_id: Snowflake | null;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object
* @see {@link 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;
export interface APIBaseGuildMember {
/**
* 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
* @see {@link 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/articles/360028038352
* @see {@link https://support.discord.com/hc/articles/360028038352}
*/
premium_since?: string | null;
/**
* Whether the user is deafened in voice channels
*/
deaf: boolean;
/**
* Whether the user is muted in voice channels
*/
mute: boolean;
/**
* Guild member flags represented as a bit set, defaults to `0`
*/
flags: GuildMemberFlags;
/**
* Whether the user has not yet passed the guild's Membership Screening requirements
*
@@ -652,9 +670,79 @@ export interface APIGuildMember {
* Timestamp of when the time out will be removed; until then, they cannot interact with the guild
*/
communication_disabled_until?: string | null;
/**
* The data for the member's guild avatar decoration
*
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
*/
avatar_decoration_data?: APIAvatarDecorationData | null;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIFlaggedGuildMember {
/**
* Guild member flags represented as a bit set
*
* @defaultValue `0`
*/
flags: GuildMemberFlags;
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIGuildMemberJoined {
/**
* When the user joined the guild
*/
joined_at: string | null;
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIGuildMemberAvatar {
/**
* The member's guild avatar hash
*/
avatar?: string | null;
/**
* The member's guild banner hash
*/
banner?: string | null;
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIBaseVoiceGuildMember {
/**
* Whether the user is deafened in voice channels
*/
deaf: boolean;
/**
* Whether the user is muted in voice channels
*/
mute: boolean;
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIGuildMemberUser {
/**
* 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 {@link https://discord.com/developers/docs/resources/user#user-object}
*/
user: APIUser;
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
*/
export interface APIGuildMember extends APIBaseGuildMember, APIBaseVoiceGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined, APIGuildMemberUser {
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
*/
export declare enum GuildMemberFlags {
/**
@@ -666,7 +754,7 @@ export declare enum GuildMemberFlags {
*/
CompletedOnboarding = 2,
/**
* Member bypasses guild verification requirements
* Member is exempt from guild verification requirements
*/
BypassesVerification = 4,
/**
@@ -674,24 +762,37 @@ export declare enum GuildMemberFlags {
*/
StartedOnboarding = 8,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member is a guest and can only access the voice channel they were invited to
*/
IsGuest = 16,
/**
* Member has started Server Guide new member actions
*/
StartedHomeActions = 32,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member has completed Server Guide new member actions
*/
CompletedHomeActions = 64,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member's username, display name, or nickname is blocked by AutoMod
*/
AutomodQuarantinedUsernameOrGuildNickname = 128,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* @deprecated
* {@link https://github.com/discord/discord-api-docs/pull/7113 | discord-api-docs#7113}
*/
AutomodQuarantinedBio = 256
AutomodQuarantinedBio = 256,
/**
* Member has dismissed the DM settings upsell
*/
DmSettingsUpsellAcknowledged = 512,
/**
* Member's guild tag is blocked by AutoMod
*/
AutoModQuarantinedGuildTag = 1024
}
/**
* https://discord.com/developers/docs/resources/guild#integration-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object}
*/
export interface APIGuildIntegration {
/**
@@ -733,7 +834,7 @@ export interface APIGuildIntegration {
*
* **This field is not provided for `discord` bot integrations.**
*
* See https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors}
*/
expire_behavior?: IntegrationExpireBehavior;
/**
@@ -747,13 +848,13 @@ export interface APIGuildIntegration {
*
* **Some older integrations may not have an attached user.**
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link 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
* @see {@link https://discord.com/developers/docs/resources/guild#integration-account-object}
*/
account: APIIntegrationAccount;
/**
@@ -777,7 +878,7 @@ export interface APIGuildIntegration {
/**
* The bot/OAuth2 application for discord integrations
*
* See https://discord.com/developers/docs/resources/guild#integration-application-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-application-object}
*
* **This field is not provided for `discord` bot integrations.**
*/
@@ -789,14 +890,14 @@ export interface APIGuildIntegration {
}
export type APIGuildIntegrationType = 'discord' | 'guild_subscription' | 'twitch' | 'youtube';
/**
* https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors}
*/
export declare enum IntegrationExpireBehavior {
RemoveRole = 0,
Kick = 1
}
/**
* https://discord.com/developers/docs/resources/guild#integration-account-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-account-object}
*/
export interface APIIntegrationAccount {
/**
@@ -809,7 +910,7 @@ export interface APIIntegrationAccount {
name: string;
}
/**
* https://discord.com/developers/docs/resources/guild#integration-application-object
* @see {@link https://discord.com/developers/docs/resources/guild#integration-application-object}
*/
export interface APIGuildIntegrationApplication {
/**
@@ -823,7 +924,7 @@ export interface APIGuildIntegrationApplication {
/**
* The icon hash of the app
*
* See https://discord.com/developers/docs/reference#image-formatting
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
*/
icon: string | null;
/**
@@ -833,12 +934,12 @@ export interface APIGuildIntegrationApplication {
/**
* The bot associated with this application
*
* See https://discord.com/developers/docs/resources/user#user-object
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
*/
bot?: APIUser;
}
/**
* https://discord.com/developers/docs/resources/guild#ban-object
* @see {@link https://discord.com/developers/docs/resources/guild#ban-object}
*/
export interface APIBan {
/**
@@ -851,7 +952,7 @@ export interface APIBan {
user: APIUser;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-widget-object
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object}
*/
export interface APIGuildWidget {
id: Snowflake;
@@ -862,7 +963,7 @@ export interface APIGuildWidget {
presence_count: number;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget}
*/
export interface APIGuildWidgetChannel {
id: Snowflake;
@@ -870,7 +971,7 @@ export interface APIGuildWidgetChannel {
position: number;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget}
*/
export interface APIGuildWidgetMember {
id: string;
@@ -884,7 +985,7 @@ export interface APIGuildWidgetMember {
avatar_url: string;
}
/**
* https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options}
*/
export declare enum GuildWidgetStyle {
/**
@@ -937,6 +1038,9 @@ export interface APIGuildWelcomeScreenChannel {
*/
emoji_name: string | null;
}
/**
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
export interface APIGuildMembershipScreening {
/**
* When the fields were last updated
@@ -951,6 +1055,9 @@ export interface APIGuildMembershipScreening {
*/
description: string | null;
}
/**
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
export interface APIGuildMembershipScreeningField {
/**
* The type of field
@@ -969,6 +1076,9 @@ export interface APIGuildMembershipScreeningField {
*/
required: boolean;
}
/**
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
export declare enum MembershipScreeningFieldType {
/**
* Server Rules
@@ -976,7 +1086,7 @@ export declare enum MembershipScreeningFieldType {
Terms = "TERMS"
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure}
*/
export interface APIGuildOnboarding {
/**
@@ -1001,7 +1111,7 @@ export interface APIGuildOnboarding {
mode: GuildOnboardingMode;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure}
*/
export interface APIGuildOnboardingPrompt {
/**
@@ -1035,7 +1145,7 @@ export interface APIGuildOnboardingPrompt {
type: GuildOnboardingPromptType;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure}
*/
export interface APIGuildOnboardingPromptOption {
/**
@@ -1064,7 +1174,7 @@ export interface APIGuildOnboardingPromptOption {
description: string | null;
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode}
*/
export declare enum GuildOnboardingMode {
/**
@@ -1077,10 +1187,31 @@ export declare enum GuildOnboardingMode {
OnboardingAdvanced = 1
}
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types}
*/
export declare enum GuildOnboardingPromptType {
MultipleChoice = 0,
Dropdown = 1
}
/**
* @see {@link https://discord.com/developers/docs/resources/guild#incidents-data-object}
*/
export interface APIIncidentsData {
/**
* When invites get enabled again
*/
invites_disabled_until: string | null;
/**
* When direct messages get enabled again
*/
dms_disabled_until: string | null;
/**
* When the dm spam was detected
*/
dm_spam_detected_at?: string | null;
/**
* When the raid was detected
*/
raid_detected_at?: string | null;
}
//# sourceMappingURL=guild.d.ts.map

File diff suppressed because one or more lines are too long

View File

@@ -5,7 +5,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.GuildOnboardingPromptType = exports.GuildOnboardingMode = exports.MembershipScreeningFieldType = exports.GuildWidgetStyle = exports.IntegrationExpireBehavior = exports.GuildMemberFlags = exports.GuildFeature = exports.GuildSystemChannelFlags = exports.GuildHubType = exports.GuildPremiumTier = exports.GuildVerificationLevel = exports.GuildNSFWLevel = exports.GuildMFALevel = exports.GuildExplicitContentFilter = exports.GuildDefaultMessageNotifications = void 0;
/**
* https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level}
*/
var GuildDefaultMessageNotifications;
(function (GuildDefaultMessageNotifications) {
@@ -13,7 +13,7 @@ var GuildDefaultMessageNotifications;
GuildDefaultMessageNotifications[GuildDefaultMessageNotifications["OnlyMentions"] = 1] = "OnlyMentions";
})(GuildDefaultMessageNotifications || (exports.GuildDefaultMessageNotifications = GuildDefaultMessageNotifications = {}));
/**
* https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level}
*/
var GuildExplicitContentFilter;
(function (GuildExplicitContentFilter) {
@@ -22,7 +22,7 @@ var GuildExplicitContentFilter;
GuildExplicitContentFilter[GuildExplicitContentFilter["AllMembers"] = 2] = "AllMembers";
})(GuildExplicitContentFilter || (exports.GuildExplicitContentFilter = GuildExplicitContentFilter = {}));
/**
* https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level}
*/
var GuildMFALevel;
(function (GuildMFALevel) {
@@ -30,7 +30,7 @@ var GuildMFALevel;
GuildMFALevel[GuildMFALevel["Elevated"] = 1] = "Elevated";
})(GuildMFALevel || (exports.GuildMFALevel = GuildMFALevel = {}));
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level}
*/
var GuildNSFWLevel;
(function (GuildNSFWLevel) {
@@ -40,7 +40,7 @@ var GuildNSFWLevel;
GuildNSFWLevel[GuildNSFWLevel["AgeRestricted"] = 3] = "AgeRestricted";
})(GuildNSFWLevel || (exports.GuildNSFWLevel = GuildNSFWLevel = {}));
/**
* https://discord.com/developers/docs/resources/guild#guild-object-verification-level
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level}
*/
var GuildVerificationLevel;
(function (GuildVerificationLevel) {
@@ -66,7 +66,7 @@ var GuildVerificationLevel;
GuildVerificationLevel[GuildVerificationLevel["VeryHigh"] = 4] = "VeryHigh";
})(GuildVerificationLevel || (exports.GuildVerificationLevel = GuildVerificationLevel = {}));
/**
* https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier}
*/
var GuildPremiumTier;
(function (GuildPremiumTier) {
@@ -82,7 +82,7 @@ var GuildHubType;
GuildHubType[GuildHubType["College"] = 2] = "College";
})(GuildHubType || (exports.GuildHubType = GuildHubType = {}));
/**
* https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags}
*/
var GuildSystemChannelFlags;
(function (GuildSystemChannelFlags) {
@@ -112,7 +112,7 @@ var GuildSystemChannelFlags;
GuildSystemChannelFlags[GuildSystemChannelFlags["SuppressRoleSubscriptionPurchaseNotificationReplies"] = 32] = "SuppressRoleSubscriptionPurchaseNotificationReplies";
})(GuildSystemChannelFlags || (exports.GuildSystemChannelFlags = GuildSystemChannelFlags = {}));
/**
* https://discord.com/developers/docs/resources/guild#guild-object-guild-features
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
*/
var GuildFeature;
(function (GuildFeature) {
@@ -127,7 +127,7 @@ var GuildFeature;
/**
* Guild is using the old permissions configuration behavior
*
* See https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes
* @see {@link https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes}
*/
GuildFeature["ApplicationCommandPermissionsV2"] = "APPLICATION_COMMAND_PERMISSIONS_V2";
/**
@@ -169,8 +169,7 @@ var GuildFeature;
/**
* Guild is a Student Hub
*
* See https://support.discord.com/hc/articles/4406046651927
*
* @see {@link https://support.discord.com/hc/articles/4406046651927}
* @unstable This feature is currently not documented by Discord, but has known value
*/
GuildFeature["Hub"] = "HUB";
@@ -185,8 +184,7 @@ var GuildFeature;
/**
* Guild is in a Student Hub
*
* See https://support.discord.com/hc/articles/4406046651927
*
* @see {@link https://support.discord.com/hc/articles/4406046651927}
* @unstable This feature is currently not documented by Discord, but has known value
*/
GuildFeature["LinkedToHub"] = "LINKED_TO_HUB";
@@ -194,6 +192,10 @@ var GuildFeature;
* Guild has enabled Membership Screening
*/
GuildFeature["MemberVerificationGateEnabled"] = "MEMBER_VERIFICATION_GATE_ENABLED";
/**
* Guild has increased custom soundboard sound slots
*/
GuildFeature["MoreSoundboard"] = "MORE_SOUNDBOARD";
/**
* Guild has enabled monetization
*
@@ -237,6 +239,10 @@ var GuildFeature;
* Guild has enabled role subscriptions
*/
GuildFeature["RoleSubscriptionsEnabled"] = "ROLE_SUBSCRIPTIONS_ENABLED";
/**
* Guild has created soundboard sounds
*/
GuildFeature["Soundboard"] = "SOUNDBOARD";
/**
* Guild has enabled ticketed events
*/
@@ -257,9 +263,27 @@ var GuildFeature;
* Guild has enabled the welcome screen
*/
GuildFeature["WelcomeScreenEnabled"] = "WELCOME_SCREEN_ENABLED";
/**
* Guild has access to set guild tags
*/
GuildFeature["GuildTags"] = "GUILD_TAGS";
/**
* Guild is able to set gradient colors to roles
*/
GuildFeature["EnhancedRoleColors"] = "ENHANCED_ROLE_COLORS";
/**
* Guild has access to guest invites
*/
GuildFeature["GuestsEnabled"] = "GUESTS_ENABLED";
/**
* Guild has migrated to the new pin messages permission
*
* @unstable This feature is currently not documented by Discord, but has known value
*/
GuildFeature["PinPermissionMigrationComplete"] = "PIN_PERMISSION_MIGRATION_COMPLETE";
})(GuildFeature || (exports.GuildFeature = GuildFeature = {}));
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
*/
var GuildMemberFlags;
(function (GuildMemberFlags) {
@@ -272,7 +296,7 @@ var GuildMemberFlags;
*/
GuildMemberFlags[GuildMemberFlags["CompletedOnboarding"] = 2] = "CompletedOnboarding";
/**
* Member bypasses guild verification requirements
* Member is exempt from guild verification requirements
*/
GuildMemberFlags[GuildMemberFlags["BypassesVerification"] = 4] = "BypassesVerification";
/**
@@ -280,24 +304,37 @@ var GuildMemberFlags;
*/
GuildMemberFlags[GuildMemberFlags["StartedOnboarding"] = 8] = "StartedOnboarding";
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member is a guest and can only access the voice channel they were invited to
*/
GuildMemberFlags[GuildMemberFlags["IsGuest"] = 16] = "IsGuest";
/**
* Member has started Server Guide new member actions
*/
GuildMemberFlags[GuildMemberFlags["StartedHomeActions"] = 32] = "StartedHomeActions";
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member has completed Server Guide new member actions
*/
GuildMemberFlags[GuildMemberFlags["CompletedHomeActions"] = 64] = "CompletedHomeActions";
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* Member's username, display name, or nickname is blocked by AutoMod
*/
GuildMemberFlags[GuildMemberFlags["AutomodQuarantinedUsernameOrGuildNickname"] = 128] = "AutomodQuarantinedUsernameOrGuildNickname";
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
* @deprecated
* {@link https://github.com/discord/discord-api-docs/pull/7113 | discord-api-docs#7113}
*/
GuildMemberFlags[GuildMemberFlags["AutomodQuarantinedBio"] = 256] = "AutomodQuarantinedBio";
/**
* Member has dismissed the DM settings upsell
*/
GuildMemberFlags[GuildMemberFlags["DmSettingsUpsellAcknowledged"] = 512] = "DmSettingsUpsellAcknowledged";
/**
* Member's guild tag is blocked by AutoMod
*/
GuildMemberFlags[GuildMemberFlags["AutoModQuarantinedGuildTag"] = 1024] = "AutoModQuarantinedGuildTag";
})(GuildMemberFlags || (exports.GuildMemberFlags = GuildMemberFlags = {}));
/**
* https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors}
*/
var IntegrationExpireBehavior;
(function (IntegrationExpireBehavior) {
@@ -305,7 +342,7 @@ var IntegrationExpireBehavior;
IntegrationExpireBehavior[IntegrationExpireBehavior["Kick"] = 1] = "Kick";
})(IntegrationExpireBehavior || (exports.IntegrationExpireBehavior = IntegrationExpireBehavior = {}));
/**
* https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options}
*/
var GuildWidgetStyle;
(function (GuildWidgetStyle) {
@@ -331,6 +368,9 @@ var GuildWidgetStyle;
*/
GuildWidgetStyle["Banner4"] = "banner4";
})(GuildWidgetStyle || (exports.GuildWidgetStyle = GuildWidgetStyle = {}));
/**
* @unstable https://github.com/discord/discord-api-docs/pull/2547
*/
var MembershipScreeningFieldType;
(function (MembershipScreeningFieldType) {
/**
@@ -339,7 +379,7 @@ var MembershipScreeningFieldType;
MembershipScreeningFieldType["Terms"] = "TERMS";
})(MembershipScreeningFieldType || (exports.MembershipScreeningFieldType = MembershipScreeningFieldType = {}));
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode}
*/
var GuildOnboardingMode;
(function (GuildOnboardingMode) {
@@ -353,7 +393,7 @@ var GuildOnboardingMode;
GuildOnboardingMode[GuildOnboardingMode["OnboardingAdvanced"] = 1] = "OnboardingAdvanced";
})(GuildOnboardingMode || (exports.GuildOnboardingMode = GuildOnboardingMode = {}));
/**
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types}
*/
var GuildOnboardingPromptType;
(function (GuildOnboardingPromptType) {

Some files were not shown because too many files have changed in this diff Show More