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

@@ -1,7 +1,12 @@
DISCORD_TOKEN= DISCORD_TOKEN=your_bot_token
DISCORD_CLIENT_ID= DISCORD_CLIENT_ID=your_client_id
DISCORD_GUILD_ID= DISCORD_CLIENT_SECRET=your_client_secret
DISCORD_GUILD_IDS= DISCORD_GUILD_ID=single_guild_id_optional
DATABASE_URL= DISCORD_GUILD_IDS=comma,separated,guild,ids
DATABASE_URL=postgresql://user:pass@host:5432/dbname?schema=public
PORT=3000 PORT=3000
SESSION_SECRET=change_me SESSION_SECRET=change_me
DASHBOARD_BASE_URL=http://localhost:3000
SUPPORT_ROLE_ID=
WEB_BASE_PATH=/ucp
OWNER_IDS=comma,separated,owner,ids

1
.gitignore vendored
View File

@@ -1 +1,2 @@
.env
node_modules node_modules

15
TODO_OVERVIEW.md Normal file
View File

@@ -0,0 +1,15 @@
Papo TODO Übersicht (Module/Automod/Tickets)
============================================
- Module-System
- Ergänze weitere Modul-Keys (inkl. Musik, Forum-Sync) und lade Metadaten dynamisch (`src/services/moduleService.ts`, `src/config/context.ts`).
- Commands vor Ausführung an Modul-Status binden (`src/services/commandHandler.ts`, `src/commands/music/play.ts`).
- Musik-Status/Toggles im Dashboard und API ausspielen (`src/services/musicService.ts`, `src/web/routes/api.ts`, `src/web/routes/dashboard.ts`).
- Automod
- Pro-Guild Konfiguration (Schwellen, Filterlisten, Whitelists, Aktionen/Logs) persistieren und im Dashboard editierbar machen (`src/services/automodService.ts`, `src/config/state.ts`, `src/events/messageCreate.ts`, `src/commands/utility/configure.ts`, `src/web/routes/api.ts`, `src/web/routes/dashboard.ts`).
- Tickets/Dashboard
- Ticket-Modul sauber ans Modul-System hängen und Panel/Buttons aus Dashboard-Konfig speisen (`src/services/ticketService.ts`, `src/commands/tickets/panel.ts`).
- Dashboard-UI neu strukturieren (Filter, Suche, Live-Ansicht, Status-Sync) und API für Streams/Filter erweitern (`src/web/routes/dashboard.ts`, `src/web/routes/api.ts`).
- Transcript/Log/Storage vereinheitlichen und an Dashboard/Forum koppeln (`src/services/ticketService.ts`, `src/services/forumService.ts`).

17
node_modules/.bin/acorn generated vendored
View File

@@ -1 +1,16 @@
../acorn/bin/acorn #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@"
else
exec node "$basedir/../acorn/bin/acorn" "$@"
fi

17
node_modules/.bin/mime generated vendored
View File

@@ -1 +1,16 @@
../mime/cli.js #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../mime/cli.js" "$@"
else
exec node "$basedir/../mime/cli.js" "$@"
fi

17
node_modules/.bin/mkdirp generated vendored
View File

@@ -1 +1,16 @@
../mkdirp/bin/cmd.js #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
else
exec node "$basedir/../mkdirp/bin/cmd.js" "$@"
fi

17
node_modules/.bin/prisma generated vendored
View File

@@ -1 +1,16 @@
../prisma/build/index.js #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../prisma/build/index.js" "$@"
else
exec node "$basedir/../prisma/build/index.js" "$@"
fi

17
node_modules/.bin/resolve generated vendored
View File

@@ -1 +1,16 @@
../resolve/bin/resolve #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../resolve/bin/resolve" "$@"
else
exec node "$basedir/../resolve/bin/resolve" "$@"
fi

17
node_modules/.bin/rimraf generated vendored
View File

@@ -1 +1,16 @@
../rimraf/bin.js #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../rimraf/bin.js" "$@"
else
exec node "$basedir/../rimraf/bin.js" "$@"
fi

17
node_modules/.bin/tree-kill generated vendored
View File

@@ -1 +1,16 @@
../tree-kill/cli.js #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../tree-kill/cli.js" "$@"
else
exec node "$basedir/../tree-kill/cli.js" "$@"
fi

17
node_modules/.bin/ts-node generated vendored
View File

@@ -1 +1,16 @@
../ts-node/dist/bin.js #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../ts-node/dist/bin.js" "$@"
else
exec node "$basedir/../ts-node/dist/bin.js" "$@"
fi

17
node_modules/.bin/ts-node-cwd generated vendored
View File

@@ -1 +1,16 @@
../ts-node/dist/bin-cwd.js #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../ts-node/dist/bin-cwd.js" "$@"
else
exec node "$basedir/../ts-node/dist/bin-cwd.js" "$@"
fi

17
node_modules/.bin/ts-node-dev generated vendored
View File

@@ -1 +1,16 @@
../ts-node-dev/lib/bin.js #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../ts-node-dev/lib/bin.js" "$@"
else
exec node "$basedir/../ts-node-dev/lib/bin.js" "$@"
fi

17
node_modules/.bin/ts-node-esm generated vendored
View File

@@ -1 +1,16 @@
../ts-node/dist/bin-esm.js #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../ts-node/dist/bin-esm.js" "$@"
else
exec node "$basedir/../ts-node/dist/bin-esm.js" "$@"
fi

17
node_modules/.bin/ts-node-script generated vendored
View File

@@ -1 +1,16 @@
../ts-node/dist/bin-script.js #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../ts-node/dist/bin-script.js" "$@"
else
exec node "$basedir/../ts-node/dist/bin-script.js" "$@"
fi

View File

@@ -1 +1,16 @@
../ts-node/dist/bin-transpile.js #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../ts-node/dist/bin-transpile.js" "$@"
else
exec node "$basedir/../ts-node/dist/bin-transpile.js" "$@"
fi

17
node_modules/.bin/ts-script generated vendored
View File

@@ -1 +1,16 @@
../ts-node/dist/bin-script-deprecated.js #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../ts-node/dist/bin-script-deprecated.js" "$@"
else
exec node "$basedir/../ts-node/dist/bin-script-deprecated.js" "$@"
fi

17
node_modules/.bin/tsc generated vendored
View File

@@ -1 +1,16 @@
../typescript/bin/tsc #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
else
exec node "$basedir/../typescript/bin/tsc" "$@"
fi

17
node_modules/.bin/tsnd generated vendored
View File

@@ -1 +1,16 @@
../ts-node-dev/lib/bin.js #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../ts-node-dev/lib/bin.js" "$@"
else
exec node "$basedir/../ts-node-dev/lib/bin.js" "$@"
fi

17
node_modules/.bin/tsserver generated vendored
View File

@@ -1 +1,16 @@
../typescript/bin/tsserver #!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
else
exec node "$basedir/../typescript/bin/tsserver" "$@"
fi

772
node_modules/.package-lock.json generated vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,110 +1 @@
/* eslint-disable @typescript-eslint/no-unused-vars */ export * from "./index"
import * as runtime from '@prisma/client/runtime/library'
/**
* ## Prisma Client ʲˢ
*
* Type-safe database client for TypeScript & Node.js
* @example
* ```
* const prisma = new Prisma()
* // Fetch zero or more Users
* const users = await prisma.user.findMany()
* ```
*
*
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client).
*/
export declare const PrismaClient: any
/**
* ## Prisma Client ʲˢ
*
* Type-safe database client for TypeScript & Node.js
* @example
* ```
* const prisma = new Prisma()
* // Fetch zero or more Users
* const users = await prisma.user.findMany()
* ```
*
*
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client).
*/
export declare type PrismaClient = any
export declare class PrismaClientExtends<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> {
$extends: { extArgs: ExtArgs } & (<
R extends runtime.Types.Extensions.UserArgs['result'] = {},
M extends runtime.Types.Extensions.UserArgs['model'] = {},
Q extends runtime.Types.Extensions.UserArgs['query'] = {},
C extends runtime.Types.Extensions.UserArgs['client'] = {},
Args extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.InternalArgs<R, M, {}, C>,
>(
args:
| ((client: PrismaClientExtends<ExtArgs>) => { $extends: { extArgs: Args } })
| { name?: string }
| { result?: R & runtime.Types.Extensions.UserArgs['result'] }
| { model?: M & runtime.Types.Extensions.UserArgs['model'] }
| { query?: Q & runtime.Types.Extensions.UserArgs['query'] }
| { client?: C & runtime.Types.Extensions.UserArgs['client'] },
) => PrismaClientExtends<Args & ExtArgs> & Args['client'])
$transaction<R>(
fn: (prisma: Omit<this, runtime.ITXClientDenyList>) => Promise<R>,
options?: { maxWait?: number; timeout?: number; isolationLevel?: string },
): Promise<R>
$transaction<P extends Prisma.PrismaPromise<any>[]>(
arg: [...P],
options?: { isolationLevel?: string },
): Promise<runtime.Types.Utils.UnwrapTuple<P>>
}
export declare const dmmf: any
export declare type dmmf = any
/**
* Get the type of the value, that the Promise holds.
*/
export declare type PromiseType<T extends PromiseLike<any>> = T extends PromiseLike<infer U> ? U : T
/**
* Get the return type of a function which returns a Promise.
*/
export declare type PromiseReturnType<T extends (...args: any) => Promise<any>> = PromiseType<ReturnType<T>>
export namespace Prisma {
export type TransactionClient = any
export function defineExtension<
R extends runtime.Types.Extensions.UserArgs['result'] = {},
M extends runtime.Types.Extensions.UserArgs['model'] = {},
Q extends runtime.Types.Extensions.UserArgs['query'] = {},
C extends runtime.Types.Extensions.UserArgs['client'] = {},
Args extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.InternalArgs<R, M, {}, C>,
>(
args:
| ((client: PrismaClientExtends) => { $extends: { extArgs: Args } })
| { name?: string }
| { result?: R & runtime.Types.Extensions.UserArgs['result'] }
| { model?: M & runtime.Types.Extensions.UserArgs['model'] }
| { query?: Q & runtime.Types.Extensions.UserArgs['query'] }
| { client?: C & runtime.Types.Extensions.UserArgs['client'] },
): (client: any) => PrismaClientExtends<Args>
export type Extension = runtime.Types.Extensions.UserArgs
export import getExtensionContext = runtime.Extensions.getExtensionContext
export import Args = runtime.Types.Public.Args
export import Payload = runtime.Types.Public.Payload
export import Result = runtime.Types.Public.Result
export import Exact = runtime.Types.Public.Exact
export import PrismaPromise = runtime.Types.Public.PrismaPromise
export const prismaVersion: {
client: string
engine: string
}
}

View File

@@ -1,65 +1 @@
"use strict"; module.exports = { ...require('.') }
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/scripts/default-index.ts
var default_index_exports = {};
__export(default_index_exports, {
Prisma: () => Prisma,
PrismaClient: () => PrismaClient,
default: () => default_index_default
});
module.exports = __toCommonJS(default_index_exports);
// ../../node_modules/.pnpm/@prisma+engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2/node_modules/@prisma/engines-version/package.json
var prisma = {
enginesVersion: "605197351a3c8bdd595af2d2a9bc3025bca48ea2"
};
// package.json
var version = "5.22.0";
// src/runtime/utils/clientVersion.ts
var clientVersion = version;
// src/scripts/default-index.ts
var PrismaClient = class {
constructor() {
throw new Error('@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.');
}
};
function defineExtension(ext) {
if (typeof ext === "function") {
return ext;
}
return (client) => client.$extends(ext);
}
function getExtensionContext(that) {
return that;
}
var Prisma = {
defineExtension,
getExtensionContext,
prismaVersion: { client: clientVersion, engine: prisma.enginesVersion }
};
var default_index_default = { Prisma };
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Prisma,
PrismaClient
});

111
node_modules/.prisma/client/edge.d.ts generated vendored
View File

@@ -1,110 +1 @@
/* eslint-disable @typescript-eslint/no-unused-vars */ export * from "./default"
import * as runtime from '@prisma/client/runtime/library'
/**
* ## Prisma Client ʲˢ
*
* Type-safe database client for TypeScript & Node.js
* @example
* ```
* const prisma = new Prisma()
* // Fetch zero or more Users
* const users = await prisma.user.findMany()
* ```
*
*
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client).
*/
export declare const PrismaClient: any
/**
* ## Prisma Client ʲˢ
*
* Type-safe database client for TypeScript & Node.js
* @example
* ```
* const prisma = new Prisma()
* // Fetch zero or more Users
* const users = await prisma.user.findMany()
* ```
*
*
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client).
*/
export declare type PrismaClient = any
export declare class PrismaClientExtends<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> {
$extends: { extArgs: ExtArgs } & (<
R extends runtime.Types.Extensions.UserArgs['result'] = {},
M extends runtime.Types.Extensions.UserArgs['model'] = {},
Q extends runtime.Types.Extensions.UserArgs['query'] = {},
C extends runtime.Types.Extensions.UserArgs['client'] = {},
Args extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.InternalArgs<R, M, {}, C>,
>(
args:
| ((client: PrismaClientExtends<ExtArgs>) => { $extends: { extArgs: Args } })
| { name?: string }
| { result?: R & runtime.Types.Extensions.UserArgs['result'] }
| { model?: M & runtime.Types.Extensions.UserArgs['model'] }
| { query?: Q & runtime.Types.Extensions.UserArgs['query'] }
| { client?: C & runtime.Types.Extensions.UserArgs['client'] },
) => PrismaClientExtends<Args & ExtArgs> & Args['client'])
$transaction<R>(
fn: (prisma: Omit<this, runtime.ITXClientDenyList>) => Promise<R>,
options?: { maxWait?: number; timeout?: number; isolationLevel?: string },
): Promise<R>
$transaction<P extends Prisma.PrismaPromise<any>[]>(
arg: [...P],
options?: { isolationLevel?: string },
): Promise<runtime.Types.Utils.UnwrapTuple<P>>
}
export declare const dmmf: any
export declare type dmmf = any
/**
* Get the type of the value, that the Promise holds.
*/
export declare type PromiseType<T extends PromiseLike<any>> = T extends PromiseLike<infer U> ? U : T
/**
* Get the return type of a function which returns a Promise.
*/
export declare type PromiseReturnType<T extends (...args: any) => Promise<any>> = PromiseType<ReturnType<T>>
export namespace Prisma {
export type TransactionClient = any
export function defineExtension<
R extends runtime.Types.Extensions.UserArgs['result'] = {},
M extends runtime.Types.Extensions.UserArgs['model'] = {},
Q extends runtime.Types.Extensions.UserArgs['query'] = {},
C extends runtime.Types.Extensions.UserArgs['client'] = {},
Args extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.InternalArgs<R, M, {}, C>,
>(
args:
| ((client: PrismaClientExtends) => { $extends: { extArgs: Args } })
| { name?: string }
| { result?: R & runtime.Types.Extensions.UserArgs['result'] }
| { model?: M & runtime.Types.Extensions.UserArgs['model'] }
| { query?: Q & runtime.Types.Extensions.UserArgs['query'] }
| { client?: C & runtime.Types.Extensions.UserArgs['client'] },
): (client: any) => PrismaClientExtends<Args>
export type Extension = runtime.Types.Extensions.UserArgs
export import getExtensionContext = runtime.Extensions.getExtensionContext
export import Args = runtime.Types.Public.Args
export import Payload = runtime.Types.Public.Payload
export import Result = runtime.Types.Public.Result
export import Exact = runtime.Types.Public.Exact
export import PrismaPromise = runtime.Types.Public.PrismaPromise
export const prismaVersion: {
client: string
engine: string
}
}

361
node_modules/.prisma/client/edge.js generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,65 +1,302 @@
"use strict";
var __defProp = Object.defineProperty; Object.defineProperty(exports, "__esModule", { value: true });
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames; const {
var __hasOwnProp = Object.prototype.hasOwnProperty; Decimal,
var __export = (target, all) => { objectEnumValues,
for (var name in all) makeStrictEnum,
__defProp(target, name, { get: all[name], enumerable: true }); Public,
}; getRuntime,
var __copyProps = (to, from, except, desc) => { skip
if (from && typeof from === "object" || typeof from === "function") { } = require('@prisma/client/runtime/index-browser.js')
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); const Prisma = {}
exports.Prisma = Prisma
exports.$Enums = {}
/**
* Prisma Client JS version: 5.22.0
* Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2
*/
Prisma.prismaVersion = {
client: "5.22.0",
engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2"
} }
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/scripts/default-index.ts Prisma.PrismaClientKnownRequestError = () => {
var default_index_exports = {}; const runtimeName = getRuntime().prettyName;
__export(default_index_exports, { throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
Prisma: () => Prisma, In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
PrismaClient: () => PrismaClient, )};
default: () => default_index_default Prisma.PrismaClientUnknownRequestError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientRustPanicError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientInitializationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientValidationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.NotFoundError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.Decimal = Decimal
/**
* Re-export of sql-template-tag
*/
Prisma.sql = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.empty = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.join = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.raw = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.validator = Public.validator
/**
* Extensions
*/
Prisma.getExtensionContext = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.defineExtension = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
/**
* Shorthand utilities for JSON filtering
*/
Prisma.DbNull = objectEnumValues.instances.DbNull
Prisma.JsonNull = objectEnumValues.instances.JsonNull
Prisma.AnyNull = objectEnumValues.instances.AnyNull
Prisma.NullTypes = {
DbNull: objectEnumValues.classes.DbNull,
JsonNull: objectEnumValues.classes.JsonNull,
AnyNull: objectEnumValues.classes.AnyNull
}
/**
* Enums
*/
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
ReadUncommitted: 'ReadUncommitted',
ReadCommitted: 'ReadCommitted',
RepeatableRead: 'RepeatableRead',
Serializable: 'Serializable'
}); });
module.exports = __toCommonJS(default_index_exports);
// ../../node_modules/.pnpm/@prisma+engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2/node_modules/@prisma/engines-version/package.json exports.Prisma.GuildSettingsScalarFieldEnum = {
var prisma = { guildId: 'guildId',
enginesVersion: "605197351a3c8bdd595af2d2a9bc3025bca48ea2" welcomeChannelId: 'welcomeChannelId',
logChannelId: 'logChannelId',
automodEnabled: 'automodEnabled',
automodConfig: 'automodConfig',
levelingEnabled: 'levelingEnabled',
ticketsEnabled: 'ticketsEnabled',
musicEnabled: 'musicEnabled',
statuspageEnabled: 'statuspageEnabled',
statuspageConfig: 'statuspageConfig',
dynamicVoiceEnabled: 'dynamicVoiceEnabled',
dynamicVoiceConfig: 'dynamicVoiceConfig',
supportLoginConfig: 'supportLoginConfig',
birthdayEnabled: 'birthdayEnabled',
birthdayConfig: 'birthdayConfig',
reactionRolesEnabled: 'reactionRolesEnabled',
reactionRolesConfig: 'reactionRolesConfig',
eventsEnabled: 'eventsEnabled',
supportRoleId: 'supportRoleId',
updatedAt: 'updatedAt',
createdAt: 'createdAt'
}; };
// package.json exports.Prisma.TicketScalarFieldEnum = {
var version = "5.22.0"; id: 'id',
ticketNumber: 'ticketNumber',
userId: 'userId',
channelId: 'channelId',
guildId: 'guildId',
topic: 'topic',
priority: 'priority',
status: 'status',
claimedBy: 'claimedBy',
transcript: 'transcript',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
// src/runtime/utils/clientVersion.ts exports.Prisma.LevelScalarFieldEnum = {
var clientVersion = version; id: 'id',
userId: 'userId',
guildId: 'guildId',
xp: 'xp',
level: 'level',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
// src/scripts/default-index.ts exports.Prisma.TicketSupportSessionScalarFieldEnum = {
var PrismaClient = class { id: 'id',
guildId: 'guildId',
userId: 'userId',
roleId: 'roleId',
startedAt: 'startedAt',
endedAt: 'endedAt',
durationSeconds: 'durationSeconds'
};
exports.Prisma.BirthdayScalarFieldEnum = {
id: 'id',
userId: 'userId',
guildId: 'guildId',
birthDate: 'birthDate',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.ReactionRoleSetScalarFieldEnum = {
id: 'id',
guildId: 'guildId',
channelId: 'channelId',
messageId: 'messageId',
title: 'title',
description: 'description',
entries: 'entries',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.EventScalarFieldEnum = {
id: 'id',
guildId: 'guildId',
title: 'title',
description: 'description',
channelId: 'channelId',
startTime: 'startTime',
repeatType: 'repeatType',
repeatConfig: 'repeatConfig',
reminderOffsetMinutes: 'reminderOffsetMinutes',
roleId: 'roleId',
isActive: 'isActive',
lastReminderAt: 'lastReminderAt',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.EventSignupScalarFieldEnum = {
id: 'id',
eventId: 'eventId',
guildId: 'guildId',
userId: 'userId',
createdAt: 'createdAt',
canceledAt: 'canceledAt'
};
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
};
exports.Prisma.NullableJsonNullValueInput = {
DbNull: Prisma.DbNull,
JsonNull: Prisma.JsonNull
};
exports.Prisma.JsonNullValueInput = {
JsonNull: Prisma.JsonNull
};
exports.Prisma.QueryMode = {
default: 'default',
insensitive: 'insensitive'
};
exports.Prisma.JsonNullValueFilter = {
DbNull: Prisma.DbNull,
JsonNull: Prisma.JsonNull,
AnyNull: Prisma.AnyNull
};
exports.Prisma.NullsOrder = {
first: 'first',
last: 'last'
};
exports.Prisma.ModelName = {
GuildSettings: 'GuildSettings',
Ticket: 'Ticket',
Level: 'Level',
TicketSupportSession: 'TicketSupportSession',
Birthday: 'Birthday',
ReactionRoleSet: 'ReactionRoleSet',
Event: 'Event',
EventSignup: 'EventSignup'
};
/**
* This is a stub Prisma Client that will error at runtime if called.
*/
class PrismaClient {
constructor() { constructor() {
throw new Error('@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.'); return new Proxy(this, {
get(target, prop) {
let message
const runtime = getRuntime()
if (runtime.isEdge) {
message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
- Use Prisma Accelerate: https://pris.ly/d/accelerate
- Use Driver Adapters: https://pris.ly/d/driver-adapters
`;
} else {
message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
} }
};
function defineExtension(ext) { message += `
if (typeof ext === "function") { If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
return ext;
throw new Error(message)
} }
return (client) => client.$extends(ext); })
} }
function getExtensionContext(that) {
return that;
} }
var Prisma = {
defineExtension, exports.PrismaClient = PrismaClient
getExtensionContext,
prismaVersion: { client: clientVersion, engine: prisma.enginesVersion } Object.assign(exports, Prisma)
};
var default_index_default = { Prisma };
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Prisma,
PrismaClient
});

12186
node_modules/.prisma/client/index.d.ts generated vendored

File diff suppressed because it is too large Load Diff

382
node_modules/.prisma/client/index.js generated vendored

File diff suppressed because one or more lines are too long

111
node_modules/.prisma/client/wasm.d.ts generated vendored
View File

@@ -1,110 +1 @@
/* eslint-disable @typescript-eslint/no-unused-vars */ export * from "./index"
import * as runtime from '@prisma/client/runtime/library'
/**
* ## Prisma Client ʲˢ
*
* Type-safe database client for TypeScript & Node.js
* @example
* ```
* const prisma = new Prisma()
* // Fetch zero or more Users
* const users = await prisma.user.findMany()
* ```
*
*
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client).
*/
export declare const PrismaClient: any
/**
* ## Prisma Client ʲˢ
*
* Type-safe database client for TypeScript & Node.js
* @example
* ```
* const prisma = new Prisma()
* // Fetch zero or more Users
* const users = await prisma.user.findMany()
* ```
*
*
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client).
*/
export declare type PrismaClient = any
export declare class PrismaClientExtends<
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs,
> {
$extends: { extArgs: ExtArgs } & (<
R extends runtime.Types.Extensions.UserArgs['result'] = {},
M extends runtime.Types.Extensions.UserArgs['model'] = {},
Q extends runtime.Types.Extensions.UserArgs['query'] = {},
C extends runtime.Types.Extensions.UserArgs['client'] = {},
Args extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.InternalArgs<R, M, {}, C>,
>(
args:
| ((client: PrismaClientExtends<ExtArgs>) => { $extends: { extArgs: Args } })
| { name?: string }
| { result?: R & runtime.Types.Extensions.UserArgs['result'] }
| { model?: M & runtime.Types.Extensions.UserArgs['model'] }
| { query?: Q & runtime.Types.Extensions.UserArgs['query'] }
| { client?: C & runtime.Types.Extensions.UserArgs['client'] },
) => PrismaClientExtends<Args & ExtArgs> & Args['client'])
$transaction<R>(
fn: (prisma: Omit<this, runtime.ITXClientDenyList>) => Promise<R>,
options?: { maxWait?: number; timeout?: number; isolationLevel?: string },
): Promise<R>
$transaction<P extends Prisma.PrismaPromise<any>[]>(
arg: [...P],
options?: { isolationLevel?: string },
): Promise<runtime.Types.Utils.UnwrapTuple<P>>
}
export declare const dmmf: any
export declare type dmmf = any
/**
* Get the type of the value, that the Promise holds.
*/
export declare type PromiseType<T extends PromiseLike<any>> = T extends PromiseLike<infer U> ? U : T
/**
* Get the return type of a function which returns a Promise.
*/
export declare type PromiseReturnType<T extends (...args: any) => Promise<any>> = PromiseType<ReturnType<T>>
export namespace Prisma {
export type TransactionClient = any
export function defineExtension<
R extends runtime.Types.Extensions.UserArgs['result'] = {},
M extends runtime.Types.Extensions.UserArgs['model'] = {},
Q extends runtime.Types.Extensions.UserArgs['query'] = {},
C extends runtime.Types.Extensions.UserArgs['client'] = {},
Args extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.InternalArgs<R, M, {}, C>,
>(
args:
| ((client: PrismaClientExtends) => { $extends: { extArgs: Args } })
| { name?: string }
| { result?: R & runtime.Types.Extensions.UserArgs['result'] }
| { model?: M & runtime.Types.Extensions.UserArgs['model'] }
| { query?: Q & runtime.Types.Extensions.UserArgs['query'] }
| { client?: C & runtime.Types.Extensions.UserArgs['client'] },
): (client: any) => PrismaClientExtends<Args>
export type Extension = runtime.Types.Extensions.UserArgs
export import getExtensionContext = runtime.Extensions.getExtensionContext
export import Args = runtime.Types.Public.Args
export import Payload = runtime.Types.Public.Payload
export import Result = runtime.Types.Public.Result
export import Exact = runtime.Types.Public.Exact
export import PrismaPromise = runtime.Types.Public.PrismaPromise
export const prismaVersion: {
client: string
engine: string
}
}

341
node_modules/.prisma/client/wasm.js generated vendored
View File

@@ -1,65 +1,302 @@
"use strict";
var __defProp = Object.defineProperty; Object.defineProperty(exports, "__esModule", { value: true });
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames; const {
var __hasOwnProp = Object.prototype.hasOwnProperty; Decimal,
var __export = (target, all) => { objectEnumValues,
for (var name in all) makeStrictEnum,
__defProp(target, name, { get: all[name], enumerable: true }); Public,
}; getRuntime,
var __copyProps = (to, from, except, desc) => { skip
if (from && typeof from === "object" || typeof from === "function") { } = require('@prisma/client/runtime/index-browser.js')
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); const Prisma = {}
exports.Prisma = Prisma
exports.$Enums = {}
/**
* Prisma Client JS version: 5.22.0
* Query Engine version: 605197351a3c8bdd595af2d2a9bc3025bca48ea2
*/
Prisma.prismaVersion = {
client: "5.22.0",
engine: "605197351a3c8bdd595af2d2a9bc3025bca48ea2"
} }
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/scripts/default-index.ts Prisma.PrismaClientKnownRequestError = () => {
var default_index_exports = {}; const runtimeName = getRuntime().prettyName;
__export(default_index_exports, { throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
Prisma: () => Prisma, In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
PrismaClient: () => PrismaClient, )};
default: () => default_index_default Prisma.PrismaClientUnknownRequestError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientRustPanicError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientInitializationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.PrismaClientValidationError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.NotFoundError = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.Decimal = Decimal
/**
* Re-export of sql-template-tag
*/
Prisma.sql = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.empty = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.join = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.raw = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.validator = Public.validator
/**
* Extensions
*/
Prisma.getExtensionContext = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
Prisma.defineExtension = () => {
const runtimeName = getRuntime().prettyName;
throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}).
In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`,
)}
/**
* Shorthand utilities for JSON filtering
*/
Prisma.DbNull = objectEnumValues.instances.DbNull
Prisma.JsonNull = objectEnumValues.instances.JsonNull
Prisma.AnyNull = objectEnumValues.instances.AnyNull
Prisma.NullTypes = {
DbNull: objectEnumValues.classes.DbNull,
JsonNull: objectEnumValues.classes.JsonNull,
AnyNull: objectEnumValues.classes.AnyNull
}
/**
* Enums
*/
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
ReadUncommitted: 'ReadUncommitted',
ReadCommitted: 'ReadCommitted',
RepeatableRead: 'RepeatableRead',
Serializable: 'Serializable'
}); });
module.exports = __toCommonJS(default_index_exports);
// ../../node_modules/.pnpm/@prisma+engines-version@5.22.0-44.605197351a3c8bdd595af2d2a9bc3025bca48ea2/node_modules/@prisma/engines-version/package.json exports.Prisma.GuildSettingsScalarFieldEnum = {
var prisma = { guildId: 'guildId',
enginesVersion: "605197351a3c8bdd595af2d2a9bc3025bca48ea2" welcomeChannelId: 'welcomeChannelId',
logChannelId: 'logChannelId',
automodEnabled: 'automodEnabled',
automodConfig: 'automodConfig',
levelingEnabled: 'levelingEnabled',
ticketsEnabled: 'ticketsEnabled',
musicEnabled: 'musicEnabled',
statuspageEnabled: 'statuspageEnabled',
statuspageConfig: 'statuspageConfig',
dynamicVoiceEnabled: 'dynamicVoiceEnabled',
dynamicVoiceConfig: 'dynamicVoiceConfig',
supportLoginConfig: 'supportLoginConfig',
birthdayEnabled: 'birthdayEnabled',
birthdayConfig: 'birthdayConfig',
reactionRolesEnabled: 'reactionRolesEnabled',
reactionRolesConfig: 'reactionRolesConfig',
eventsEnabled: 'eventsEnabled',
supportRoleId: 'supportRoleId',
updatedAt: 'updatedAt',
createdAt: 'createdAt'
}; };
// package.json exports.Prisma.TicketScalarFieldEnum = {
var version = "5.22.0"; id: 'id',
ticketNumber: 'ticketNumber',
userId: 'userId',
channelId: 'channelId',
guildId: 'guildId',
topic: 'topic',
priority: 'priority',
status: 'status',
claimedBy: 'claimedBy',
transcript: 'transcript',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
// src/runtime/utils/clientVersion.ts exports.Prisma.LevelScalarFieldEnum = {
var clientVersion = version; id: 'id',
userId: 'userId',
guildId: 'guildId',
xp: 'xp',
level: 'level',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
// src/scripts/default-index.ts exports.Prisma.TicketSupportSessionScalarFieldEnum = {
var PrismaClient = class { id: 'id',
guildId: 'guildId',
userId: 'userId',
roleId: 'roleId',
startedAt: 'startedAt',
endedAt: 'endedAt',
durationSeconds: 'durationSeconds'
};
exports.Prisma.BirthdayScalarFieldEnum = {
id: 'id',
userId: 'userId',
guildId: 'guildId',
birthDate: 'birthDate',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.ReactionRoleSetScalarFieldEnum = {
id: 'id',
guildId: 'guildId',
channelId: 'channelId',
messageId: 'messageId',
title: 'title',
description: 'description',
entries: 'entries',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.EventScalarFieldEnum = {
id: 'id',
guildId: 'guildId',
title: 'title',
description: 'description',
channelId: 'channelId',
startTime: 'startTime',
repeatType: 'repeatType',
repeatConfig: 'repeatConfig',
reminderOffsetMinutes: 'reminderOffsetMinutes',
roleId: 'roleId',
isActive: 'isActive',
lastReminderAt: 'lastReminderAt',
createdAt: 'createdAt',
updatedAt: 'updatedAt'
};
exports.Prisma.EventSignupScalarFieldEnum = {
id: 'id',
eventId: 'eventId',
guildId: 'guildId',
userId: 'userId',
createdAt: 'createdAt',
canceledAt: 'canceledAt'
};
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
};
exports.Prisma.NullableJsonNullValueInput = {
DbNull: Prisma.DbNull,
JsonNull: Prisma.JsonNull
};
exports.Prisma.JsonNullValueInput = {
JsonNull: Prisma.JsonNull
};
exports.Prisma.QueryMode = {
default: 'default',
insensitive: 'insensitive'
};
exports.Prisma.JsonNullValueFilter = {
DbNull: Prisma.DbNull,
JsonNull: Prisma.JsonNull,
AnyNull: Prisma.AnyNull
};
exports.Prisma.NullsOrder = {
first: 'first',
last: 'last'
};
exports.Prisma.ModelName = {
GuildSettings: 'GuildSettings',
Ticket: 'Ticket',
Level: 'Level',
TicketSupportSession: 'TicketSupportSession',
Birthday: 'Birthday',
ReactionRoleSet: 'ReactionRoleSet',
Event: 'Event',
EventSignup: 'EventSignup'
};
/**
* This is a stub Prisma Client that will error at runtime if called.
*/
class PrismaClient {
constructor() { constructor() {
throw new Error('@prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.'); return new Proxy(this, {
get(target, prop) {
let message
const runtime = getRuntime()
if (runtime.isEdge) {
message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either:
- Use Prisma Accelerate: https://pris.ly/d/accelerate
- Use Driver Adapters: https://pris.ly/d/driver-adapters
`;
} else {
message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).'
} }
};
function defineExtension(ext) { message += `
if (typeof ext === "function") { If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report`
return ext;
throw new Error(message)
} }
return (client) => client.$extends(ext); })
} }
function getExtensionContext(that) {
return that;
} }
var Prisma = {
defineExtension, exports.PrismaClient = PrismaClient
getExtensionContext,
prismaVersion: { client: clientVersion, engine: prisma.enginesVersion } Object.assign(exports, Prisma)
};
var default_index_default = { Prisma };
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Prisma,
PrismaClient
});

View File

@@ -8,7 +8,8 @@
<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://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/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://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://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> <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>
<p> <p>
@@ -24,7 +25,7 @@
**Features:** **Features:**
- Send and receive\* audio in Discord voice-based channels - 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 - 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 - A robust audio processing system that can handle a wide range of audio sources
@@ -32,7 +33,7 @@
## Installation ## Installation
**Node.js 16.11.0 or newer is required.** **Node.js 22.12.0 or newer is required.**
```sh ```sh
npm install @discordjs/voice npm install @discordjs/voice
@@ -51,9 +52,13 @@ try installing another.
**Encryption Libraries (npm install):** **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-native`: ^3.3.0
- `sodium`: ^3.0.2 - `sodium`: ^3.0.2
- `tweetnacl`: ^1.0.3 - `@stablelib/xchacha20poly1305`: ^2.0.0
- `@noble/ciphers`: ^1.0.0
- `libsodium-wrappers`: ^0.7.9 - `libsodium-wrappers`: ^0.7.9
**Opus Libraries (npm install):** **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]) - [Guide][guide] ([source][guide-source])
Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library. 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.js Discord server][discord]
- [Discord API Discord server][discord-api] - [Discord Developers Discord server][discord-developers]
- [GitHub][source] - [GitHub][source]
- [npm][npm] - [npm][npm]
- [Related libraries][related-libs] - [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-source]: https://github.com/discordjs/guide
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html [guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
[discord]: https://discord.gg/djs [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 [source]: https://github.com/discordjs/discord.js/tree/main/packages/voice
[npm]: https://www.npmjs.com/package/@discordjs/voice [npm]: https://www.npmjs.com/package/@discordjs/voice
[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries [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 { EventEmitter } from 'node:events';
import { Readable, ReadableOptions } from 'node:stream'; import { Readable, ReadableOptions } from 'node:stream';
import prism from 'prism-media'; import prism from 'prism-media';
import { VoiceDavePrepareTransitionData, VoiceDavePrepareEpochData, VoiceOpcodes, VoiceSendPayload, VoiceReceivePayload } from 'discord-api-types/voice/v8';
import WebSocket, { MessageEvent } from 'ws'; import WebSocket, { MessageEvent } from 'ws';
import { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from 'discord-api-types/v10'; import { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from 'discord-api-types/v10';
@@ -442,11 +443,11 @@ declare class AudioPlayer extends EventEmitter {
private unsubscribe; private unsubscribe;
/** /**
* The state that the player is in. * The state that the player is in.
*
* @remarks
* The setter will perform clean-up operations where necessary.
*/ */
get state(): AudioPlayerState; get state(): AudioPlayerState;
/**
* Sets a new state for the player, performing clean-up operations where necessary.
*/
set state(newState: AudioPlayerState); set state(newState: AudioPlayerState);
/** /**
* Plays a new resource on the player. If the player is already playing a resource, the existing resource is destroyed * 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; 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 * Stores an IP address and port. Used to store socket details for the local client as well as
* for Discord. * for Discord.
@@ -634,6 +803,14 @@ declare class VoiceUDPSocket extends EventEmitter {
performIPDiscovery(ssrc: number): Promise<SocketConfig>; performIPDiscovery(ssrc: number): Promise<SocketConfig>;
} }
/**
* A binary WebSocket message.
*/
interface BinaryWebSocketMessage {
op: VoiceOpcodes;
payload: Buffer;
seq: number;
}
interface VoiceWebSocket extends EventEmitter { interface VoiceWebSocket extends EventEmitter {
on(event: 'error', listener: (error: Error) => void): this; on(event: 'error', listener: (error: Error) => void): this;
on(event: 'open', listener: (event: WebSocket.Event) => void): this; on(event: 'open', listener: (event: WebSocket.Event) => void): this;
@@ -650,6 +827,12 @@ interface VoiceWebSocket extends EventEmitter {
* @eventProperty * @eventProperty
*/ */
on(event: 'packet', listener: (packet: any) => void): this; 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 * 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. * The last recorded ping.
*/ */
ping?: number; 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. * The debug logger function, if debugging is enabled.
*/ */
@@ -698,7 +885,7 @@ declare class VoiceWebSocket extends EventEmitter {
destroy(): void; destroy(): void;
/** /**
* Handles message events on the WebSocket. Attempts to JSON parse the messages and emit them * 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 * @param event - The message event
*/ */
@@ -708,7 +895,14 @@ declare class VoiceWebSocket extends EventEmitter {
* *
* @param packet - The packet to send * @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. * Sends a heartbeat over the WebSocket.
*/ */
@@ -758,7 +952,7 @@ interface NetworkingIdentifyingState {
*/ */
interface NetworkingUdpHandshakingState { interface NetworkingUdpHandshakingState {
code: NetworkingStatusCode.UdpHandshaking; code: NetworkingStatusCode.UdpHandshaking;
connectionData: Pick<ConnectionData, 'ssrc'>; connectionData: Pick<ConnectionData, 'connectedClients' | 'ssrc'>;
connectionOptions: ConnectionOptions; connectionOptions: ConnectionOptions;
udp: VoiceUDPSocket; udp: VoiceUDPSocket;
ws: VoiceWebSocket; ws: VoiceWebSocket;
@@ -768,7 +962,7 @@ interface NetworkingUdpHandshakingState {
*/ */
interface NetworkingSelectingProtocolState { interface NetworkingSelectingProtocolState {
code: NetworkingStatusCode.SelectingProtocol; code: NetworkingStatusCode.SelectingProtocol;
connectionData: Pick<ConnectionData, 'ssrc'>; connectionData: Pick<ConnectionData, 'connectedClients' | 'ssrc'>;
connectionOptions: ConnectionOptions; connectionOptions: ConnectionOptions;
udp: VoiceUDPSocket; udp: VoiceUDPSocket;
ws: VoiceWebSocket; ws: VoiceWebSocket;
@@ -781,6 +975,7 @@ interface NetworkingReadyState {
code: NetworkingStatusCode.Ready; code: NetworkingStatusCode.Ready;
connectionData: ConnectionData; connectionData: ConnectionData;
connectionOptions: ConnectionOptions; connectionOptions: ConnectionOptions;
dave?: DAVESession | undefined;
preparedPacket?: Buffer | undefined; preparedPacket?: Buffer | undefined;
udp: VoiceUDPSocket; udp: VoiceUDPSocket;
ws: VoiceWebSocket; ws: VoiceWebSocket;
@@ -793,6 +988,7 @@ interface NetworkingResumingState {
code: NetworkingStatusCode.Resuming; code: NetworkingStatusCode.Resuming;
connectionData: ConnectionData; connectionData: ConnectionData;
connectionOptions: ConnectionOptions; connectionOptions: ConnectionOptions;
dave?: DAVESession | undefined;
preparedPacket?: Buffer | undefined; preparedPacket?: Buffer | undefined;
udp: VoiceUDPSocket; udp: VoiceUDPSocket;
ws: VoiceWebSocket; ws: VoiceWebSocket;
@@ -814,6 +1010,7 @@ type NetworkingState = NetworkingClosedState | NetworkingIdentifyingState | Netw
* and VOICE_STATE_UPDATE packets. * and VOICE_STATE_UPDATE packets.
*/ */
interface ConnectionOptions { interface ConnectionOptions {
channelId: string;
endpoint: string; endpoint: string;
serverId: string; serverId: string;
sessionId: string; sessionId: string;
@@ -825,6 +1022,7 @@ interface ConnectionOptions {
* the connection, timing information for playback of streams. * the connection, timing information for playback of streams.
*/ */
interface ConnectionData { interface ConnectionData {
connectedClients: Set<string>;
encryptionMode: string; encryptionMode: string;
nonce: number; nonce: number;
nonceBuffer: Buffer; nonceBuffer: Buffer;
@@ -835,6 +1033,14 @@ interface ConnectionData {
ssrc: number; ssrc: number;
timestamp: number; timestamp: number;
} }
/**
* Options for networking that dictate behavior.
*/
interface NetworkingOptions {
daveEncryption?: boolean | undefined;
debug?: boolean | undefined;
decryptionFailureTolerance?: number | undefined;
}
interface Networking extends EventEmitter { interface Networking extends EventEmitter {
/** /**
* Debug event for Networking. * Debug event for Networking.
@@ -845,6 +1051,7 @@ interface Networking extends EventEmitter {
on(event: 'error', listener: (error: Error) => void): this; on(event: 'error', listener: (error: Error) => void): this;
on(event: 'stateChange', listener: (oldState: NetworkingState, newState: NetworkingState) => void): this; on(event: 'stateChange', listener: (oldState: NetworkingState, newState: NetworkingState) => void): this;
on(event: 'close', listener: (code: number) => 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 * 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. * The debug logger function, if debugging is enabled.
*/ */
private readonly debug; private readonly debug;
/**
* The options used to create this Networking instance.
*/
private readonly options;
/** /**
* Creates a new Networking instance. * 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. * Destroys the Networking instance, transitioning it into the Closed state.
*/ */
destroy(): void; destroy(): void;
/** /**
* The current state of the networking instance. * The current state of the networking instance.
*
* @remarks
* The setter will perform clean-up operations where necessary.
*/ */
get state(): NetworkingState; get state(): NetworkingState;
/**
* Sets a new state for the networking instance, performing clean-up operations where necessary.
*/
set state(newState: NetworkingState); set state(newState: NetworkingState);
/** /**
* Creates a new WebSocket to a Discord Voice gateway. * Creates a new WebSocket to a Discord Voice gateway.
* *
* @param endpoint - The endpoint to connect to * @param endpoint - The endpoint to connect to
* @param lastSequence - The last sequence to set for this WebSocket
*/ */
private createWebSocket; 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 * @param error - The error that was emitted by a child
*/ */
@@ -906,6 +1124,24 @@ declare class Networking extends EventEmitter {
* @param packet - The received packet * @param packet - The received packet
*/ */
private onWsPacket; 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. * Propagates debug messages from the child WebSocket.
* *
@@ -918,6 +1154,12 @@ declare class Networking extends EventEmitter {
* @param message - The emitted debug message * @param message - The emitted debug message
*/ */
private onUdpDebug; 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. * 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() * 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 opusPacket - The Opus packet to prepare
* @param connectionData - The current connection data of the instance * @param connectionData - The current connection data of the instance
* @param daveSession - The DAVE session to use for encryption
*/ */
private createAudioPacket; private createAudioPacket;
/** /**
@@ -960,6 +1203,7 @@ declare class Networking extends EventEmitter {
* *
* @param opusPacket - The Opus packet to encrypt * @param opusPacket - The Opus packet to encrypt
* @param connectionData - The current connection data of the instance * @param connectionData - The current connection data of the instance
* @param daveSession - The DAVE session to use for encryption
*/ */
private encryptOpusPacket; private encryptOpusPacket;
} }
@@ -1001,7 +1245,7 @@ declare class AudioReceiveStream extends Readable {
*/ */
readonly end: EndBehavior; readonly end: EndBehavior;
private endTimeout?; private endTimeout?;
constructor({ end, ...options }: AudioReceiveStreamOptions); constructor(options: AudioReceiveStreamOptions);
push(buffer: Buffer | null): boolean; push(buffer: Buffer | null): boolean;
private renewEndTimeout; private renewEndTimeout;
_read(): void; _read(): void;
@@ -1128,7 +1372,7 @@ declare class VoiceReceiver {
* @param packet - The received packet * @param packet - The received packet
* @internal * @internal
*/ */
onWsPacket(packet: any): void; onWsPacket(packet: VoiceReceivePayload): void;
private decrypt; private decrypt;
/** /**
* Parses an audio packet, decrypting it to yield an Opus packet. * Parses an audio packet, decrypting it to yield an Opus packet.
@@ -1137,6 +1381,7 @@ declare class VoiceReceiver {
* @param mode - The encryption mode * @param mode - The encryption mode
* @param nonce - The nonce buffer used by the connection for encryption * @param nonce - The nonce buffer used by the connection for encryption
* @param secretKey - The secret key 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 * @returns The parsed Opus packet
*/ */
private parsePacket; private parsePacket;
@@ -1341,6 +1586,12 @@ interface VoiceConnection extends EventEmitter {
* @eventProperty * @eventProperty
*/ */
on(event: 'stateChange', listener: (oldState: VoiceConnectionState, newState: VoiceConnectionState) => void): this; 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 * 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. * The debug logger function, if debugging is enabled.
*/ */
private readonly debug; private readonly debug;
/**
* The options used to create this voice connection.
*/
private readonly options;
/** /**
* Creates a new voice connection. * Creates a new voice connection.
* *
@@ -1392,11 +1647,11 @@ declare class VoiceConnection extends EventEmitter {
constructor(joinConfig: JoinConfig, options: CreateVoiceConnectionOptions); constructor(joinConfig: JoinConfig, options: CreateVoiceConnectionOptions);
/** /**
* The current state of the voice connection. * The current state of the voice connection.
*
* @remarks
* The setter will perform clean-up operations where necessary.
*/ */
get state(): VoiceConnectionState; get state(): VoiceConnectionState;
/**
* Updates the state of the voice connection, performing clean-up operations where necessary.
*/
set state(newState: VoiceConnectionState); set state(newState: VoiceConnectionState);
/** /**
* Registers a `VOICE_SERVER_UPDATE` packet to the voice connection. This will cause it to reconnect using the * 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 * @param message - The debug message to propagate
*/ */
private onNetworkingDebug; private onNetworkingDebug;
/**
* Propagates transitions from the underlying network instance.
*
* @param transitionId - The transition id
*/
private onNetworkingTransitioned;
/** /**
* Prepares an audio packet for dispatch. * Prepares an audio packet for dispatch.
* *
@@ -1530,6 +1791,20 @@ declare class VoiceConnection extends EventEmitter {
ws: number | undefined; ws: number | undefined;
udp: 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. * 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 { interface CreateVoiceConnectionOptions {
adapterCreator: DiscordGatewayAdapterCreator; 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 * If true, debug messages will be enabled for the voice connection and its
* related components. Defaults to false. * related components. Defaults to false.
*/ */
debug?: boolean | undefined; 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. * 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; 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 { EventEmitter } from 'node:events';
import { Readable, ReadableOptions } from 'node:stream'; import { Readable, ReadableOptions } from 'node:stream';
import prism from 'prism-media'; import prism from 'prism-media';
import { VoiceDavePrepareTransitionData, VoiceDavePrepareEpochData, VoiceOpcodes, VoiceSendPayload, VoiceReceivePayload } from 'discord-api-types/voice/v8';
import WebSocket, { MessageEvent } from 'ws'; import WebSocket, { MessageEvent } from 'ws';
import { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from 'discord-api-types/v10'; import { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from 'discord-api-types/v10';
@@ -442,11 +443,11 @@ declare class AudioPlayer extends EventEmitter {
private unsubscribe; private unsubscribe;
/** /**
* The state that the player is in. * The state that the player is in.
*
* @remarks
* The setter will perform clean-up operations where necessary.
*/ */
get state(): AudioPlayerState; get state(): AudioPlayerState;
/**
* Sets a new state for the player, performing clean-up operations where necessary.
*/
set state(newState: AudioPlayerState); set state(newState: AudioPlayerState);
/** /**
* Plays a new resource on the player. If the player is already playing a resource, the existing resource is destroyed * 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; 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 * Stores an IP address and port. Used to store socket details for the local client as well as
* for Discord. * for Discord.
@@ -634,6 +803,14 @@ declare class VoiceUDPSocket extends EventEmitter {
performIPDiscovery(ssrc: number): Promise<SocketConfig>; performIPDiscovery(ssrc: number): Promise<SocketConfig>;
} }
/**
* A binary WebSocket message.
*/
interface BinaryWebSocketMessage {
op: VoiceOpcodes;
payload: Buffer;
seq: number;
}
interface VoiceWebSocket extends EventEmitter { interface VoiceWebSocket extends EventEmitter {
on(event: 'error', listener: (error: Error) => void): this; on(event: 'error', listener: (error: Error) => void): this;
on(event: 'open', listener: (event: WebSocket.Event) => void): this; on(event: 'open', listener: (event: WebSocket.Event) => void): this;
@@ -650,6 +827,12 @@ interface VoiceWebSocket extends EventEmitter {
* @eventProperty * @eventProperty
*/ */
on(event: 'packet', listener: (packet: any) => void): this; 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 * 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. * The last recorded ping.
*/ */
ping?: number; 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. * The debug logger function, if debugging is enabled.
*/ */
@@ -698,7 +885,7 @@ declare class VoiceWebSocket extends EventEmitter {
destroy(): void; destroy(): void;
/** /**
* Handles message events on the WebSocket. Attempts to JSON parse the messages and emit them * 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 * @param event - The message event
*/ */
@@ -708,7 +895,14 @@ declare class VoiceWebSocket extends EventEmitter {
* *
* @param packet - The packet to send * @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. * Sends a heartbeat over the WebSocket.
*/ */
@@ -758,7 +952,7 @@ interface NetworkingIdentifyingState {
*/ */
interface NetworkingUdpHandshakingState { interface NetworkingUdpHandshakingState {
code: NetworkingStatusCode.UdpHandshaking; code: NetworkingStatusCode.UdpHandshaking;
connectionData: Pick<ConnectionData, 'ssrc'>; connectionData: Pick<ConnectionData, 'connectedClients' | 'ssrc'>;
connectionOptions: ConnectionOptions; connectionOptions: ConnectionOptions;
udp: VoiceUDPSocket; udp: VoiceUDPSocket;
ws: VoiceWebSocket; ws: VoiceWebSocket;
@@ -768,7 +962,7 @@ interface NetworkingUdpHandshakingState {
*/ */
interface NetworkingSelectingProtocolState { interface NetworkingSelectingProtocolState {
code: NetworkingStatusCode.SelectingProtocol; code: NetworkingStatusCode.SelectingProtocol;
connectionData: Pick<ConnectionData, 'ssrc'>; connectionData: Pick<ConnectionData, 'connectedClients' | 'ssrc'>;
connectionOptions: ConnectionOptions; connectionOptions: ConnectionOptions;
udp: VoiceUDPSocket; udp: VoiceUDPSocket;
ws: VoiceWebSocket; ws: VoiceWebSocket;
@@ -781,6 +975,7 @@ interface NetworkingReadyState {
code: NetworkingStatusCode.Ready; code: NetworkingStatusCode.Ready;
connectionData: ConnectionData; connectionData: ConnectionData;
connectionOptions: ConnectionOptions; connectionOptions: ConnectionOptions;
dave?: DAVESession | undefined;
preparedPacket?: Buffer | undefined; preparedPacket?: Buffer | undefined;
udp: VoiceUDPSocket; udp: VoiceUDPSocket;
ws: VoiceWebSocket; ws: VoiceWebSocket;
@@ -793,6 +988,7 @@ interface NetworkingResumingState {
code: NetworkingStatusCode.Resuming; code: NetworkingStatusCode.Resuming;
connectionData: ConnectionData; connectionData: ConnectionData;
connectionOptions: ConnectionOptions; connectionOptions: ConnectionOptions;
dave?: DAVESession | undefined;
preparedPacket?: Buffer | undefined; preparedPacket?: Buffer | undefined;
udp: VoiceUDPSocket; udp: VoiceUDPSocket;
ws: VoiceWebSocket; ws: VoiceWebSocket;
@@ -814,6 +1010,7 @@ type NetworkingState = NetworkingClosedState | NetworkingIdentifyingState | Netw
* and VOICE_STATE_UPDATE packets. * and VOICE_STATE_UPDATE packets.
*/ */
interface ConnectionOptions { interface ConnectionOptions {
channelId: string;
endpoint: string; endpoint: string;
serverId: string; serverId: string;
sessionId: string; sessionId: string;
@@ -825,6 +1022,7 @@ interface ConnectionOptions {
* the connection, timing information for playback of streams. * the connection, timing information for playback of streams.
*/ */
interface ConnectionData { interface ConnectionData {
connectedClients: Set<string>;
encryptionMode: string; encryptionMode: string;
nonce: number; nonce: number;
nonceBuffer: Buffer; nonceBuffer: Buffer;
@@ -835,6 +1033,14 @@ interface ConnectionData {
ssrc: number; ssrc: number;
timestamp: number; timestamp: number;
} }
/**
* Options for networking that dictate behavior.
*/
interface NetworkingOptions {
daveEncryption?: boolean | undefined;
debug?: boolean | undefined;
decryptionFailureTolerance?: number | undefined;
}
interface Networking extends EventEmitter { interface Networking extends EventEmitter {
/** /**
* Debug event for Networking. * Debug event for Networking.
@@ -845,6 +1051,7 @@ interface Networking extends EventEmitter {
on(event: 'error', listener: (error: Error) => void): this; on(event: 'error', listener: (error: Error) => void): this;
on(event: 'stateChange', listener: (oldState: NetworkingState, newState: NetworkingState) => void): this; on(event: 'stateChange', listener: (oldState: NetworkingState, newState: NetworkingState) => void): this;
on(event: 'close', listener: (code: number) => 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 * 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. * The debug logger function, if debugging is enabled.
*/ */
private readonly debug; private readonly debug;
/**
* The options used to create this Networking instance.
*/
private readonly options;
/** /**
* Creates a new Networking instance. * 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. * Destroys the Networking instance, transitioning it into the Closed state.
*/ */
destroy(): void; destroy(): void;
/** /**
* The current state of the networking instance. * The current state of the networking instance.
*
* @remarks
* The setter will perform clean-up operations where necessary.
*/ */
get state(): NetworkingState; get state(): NetworkingState;
/**
* Sets a new state for the networking instance, performing clean-up operations where necessary.
*/
set state(newState: NetworkingState); set state(newState: NetworkingState);
/** /**
* Creates a new WebSocket to a Discord Voice gateway. * Creates a new WebSocket to a Discord Voice gateway.
* *
* @param endpoint - The endpoint to connect to * @param endpoint - The endpoint to connect to
* @param lastSequence - The last sequence to set for this WebSocket
*/ */
private createWebSocket; 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 * @param error - The error that was emitted by a child
*/ */
@@ -906,6 +1124,24 @@ declare class Networking extends EventEmitter {
* @param packet - The received packet * @param packet - The received packet
*/ */
private onWsPacket; 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. * Propagates debug messages from the child WebSocket.
* *
@@ -918,6 +1154,12 @@ declare class Networking extends EventEmitter {
* @param message - The emitted debug message * @param message - The emitted debug message
*/ */
private onUdpDebug; 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. * 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() * 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 opusPacket - The Opus packet to prepare
* @param connectionData - The current connection data of the instance * @param connectionData - The current connection data of the instance
* @param daveSession - The DAVE session to use for encryption
*/ */
private createAudioPacket; private createAudioPacket;
/** /**
@@ -960,6 +1203,7 @@ declare class Networking extends EventEmitter {
* *
* @param opusPacket - The Opus packet to encrypt * @param opusPacket - The Opus packet to encrypt
* @param connectionData - The current connection data of the instance * @param connectionData - The current connection data of the instance
* @param daveSession - The DAVE session to use for encryption
*/ */
private encryptOpusPacket; private encryptOpusPacket;
} }
@@ -1001,7 +1245,7 @@ declare class AudioReceiveStream extends Readable {
*/ */
readonly end: EndBehavior; readonly end: EndBehavior;
private endTimeout?; private endTimeout?;
constructor({ end, ...options }: AudioReceiveStreamOptions); constructor(options: AudioReceiveStreamOptions);
push(buffer: Buffer | null): boolean; push(buffer: Buffer | null): boolean;
private renewEndTimeout; private renewEndTimeout;
_read(): void; _read(): void;
@@ -1128,7 +1372,7 @@ declare class VoiceReceiver {
* @param packet - The received packet * @param packet - The received packet
* @internal * @internal
*/ */
onWsPacket(packet: any): void; onWsPacket(packet: VoiceReceivePayload): void;
private decrypt; private decrypt;
/** /**
* Parses an audio packet, decrypting it to yield an Opus packet. * Parses an audio packet, decrypting it to yield an Opus packet.
@@ -1137,6 +1381,7 @@ declare class VoiceReceiver {
* @param mode - The encryption mode * @param mode - The encryption mode
* @param nonce - The nonce buffer used by the connection for encryption * @param nonce - The nonce buffer used by the connection for encryption
* @param secretKey - The secret key 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 * @returns The parsed Opus packet
*/ */
private parsePacket; private parsePacket;
@@ -1341,6 +1586,12 @@ interface VoiceConnection extends EventEmitter {
* @eventProperty * @eventProperty
*/ */
on(event: 'stateChange', listener: (oldState: VoiceConnectionState, newState: VoiceConnectionState) => void): this; 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 * 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. * The debug logger function, if debugging is enabled.
*/ */
private readonly debug; private readonly debug;
/**
* The options used to create this voice connection.
*/
private readonly options;
/** /**
* Creates a new voice connection. * Creates a new voice connection.
* *
@@ -1392,11 +1647,11 @@ declare class VoiceConnection extends EventEmitter {
constructor(joinConfig: JoinConfig, options: CreateVoiceConnectionOptions); constructor(joinConfig: JoinConfig, options: CreateVoiceConnectionOptions);
/** /**
* The current state of the voice connection. * The current state of the voice connection.
*
* @remarks
* The setter will perform clean-up operations where necessary.
*/ */
get state(): VoiceConnectionState; get state(): VoiceConnectionState;
/**
* Updates the state of the voice connection, performing clean-up operations where necessary.
*/
set state(newState: VoiceConnectionState); set state(newState: VoiceConnectionState);
/** /**
* Registers a `VOICE_SERVER_UPDATE` packet to the voice connection. This will cause it to reconnect using the * 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 * @param message - The debug message to propagate
*/ */
private onNetworkingDebug; private onNetworkingDebug;
/**
* Propagates transitions from the underlying network instance.
*
* @param transitionId - The transition id
*/
private onNetworkingTransitioned;
/** /**
* Prepares an audio packet for dispatch. * Prepares an audio packet for dispatch.
* *
@@ -1530,6 +1791,20 @@ declare class VoiceConnection extends EventEmitter {
ws: number | undefined; ws: number | undefined;
udp: 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. * 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 { interface CreateVoiceConnectionOptions {
adapterCreator: DiscordGatewayAdapterCreator; 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 * If true, debug messages will be enabled for the voice connection and its
* related components. Defaults to false. * related components. Defaults to false.
*/ */
debug?: boolean | undefined; 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. * 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; 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

@@ -82,15 +82,12 @@ The exports of each API version is split into three main parts:
- 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 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 example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
- 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` - 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`
- If a type ends with `Result`, then it represents the expected result by calling its accompanying route. - 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. - 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). - Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).

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 { export interface GatewayURLQuery {
v: string; v: string;

View File

@@ -6,3 +6,4 @@ export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
export const GatewayIntentBits = mod.GatewayIntentBits; export const GatewayIntentBits = mod.GatewayIntentBits;
export const GatewayOpcodes = mod.GatewayOpcodes; export const GatewayOpcodes = mod.GatewayOpcodes;
export const GatewayVersion = mod.GatewayVersion; 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 * 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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0; exports.VoiceChannelEffectSendAnimationType = exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0;
__exportStar(require("./common"), exports);
exports.GatewayVersion = '10'; 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; var GatewayOpcodes;
(function (GatewayOpcodes) { (function (GatewayOpcodes) {
@@ -70,9 +55,13 @@ var GatewayOpcodes;
* Sent in response to receiving a heartbeat to acknowledge that it has been received * Sent in response to receiving a heartbeat to acknowledge that it has been received
*/ */
GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck"; GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck";
/**
* Request information about soundboard sounds in a set of guilds
*/
GatewayOpcodes[GatewayOpcodes["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds";
})(GatewayOpcodes || (exports.GatewayOpcodes = GatewayOpcodes = {})); })(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; var GatewayCloseCodes;
(function (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! * 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"; GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode";
/** /**
* You sent an invalid payload to us. Don't do that! * 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"; GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError";
/** /**
* You sent us a payload prior to identifying * 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"; GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
/** /**
* The account token sent with your identify payload is incorrect * 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"; 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 * 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"; GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq";
/** /**
@@ -125,13 +114,13 @@ var GatewayCloseCodes;
/** /**
* You sent us an invalid shard when identifying * 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"; GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard";
/** /**
* The session would have handled too many guilds - you are required to shard your connection in order to connect * 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"; 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 * 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"; 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 * 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 * enabled or are not whitelisted for
* *
* See https://discord.com/developers/docs/topics/gateway#gateway-intents * @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents}
* * @see {@link https://discord.com/developers/docs/topics/gateway#privileged-intents}
* See https://discord.com/developers/docs/topics/gateway#privileged-intents
*/ */
GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents"; GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents";
})(GatewayCloseCodes || (exports.GatewayCloseCodes = GatewayCloseCodes = {})); })(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; var GatewayIntentBits;
(function (GatewayIntentBits) { (function (GatewayIntentBits) {
@@ -163,9 +151,13 @@ var GatewayIntentBits;
GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers"; GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers";
GatewayIntentBits[GatewayIntentBits["GuildModeration"] = 4] = "GuildModeration"; 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["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["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers";
GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations"; GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations";
GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks"; GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks";
@@ -186,15 +178,23 @@ var GatewayIntentBits;
GatewayIntentBits[GatewayIntentBits["DirectMessagePolls"] = 33554432] = "DirectMessagePolls"; GatewayIntentBits[GatewayIntentBits["DirectMessagePolls"] = 33554432] = "DirectMessagePolls";
})(GatewayIntentBits || (exports.GatewayIntentBits = GatewayIntentBits = {})); })(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; var GatewayDispatchEvents;
(function (GatewayDispatchEvents) { (function (GatewayDispatchEvents) {
GatewayDispatchEvents["ApplicationCommandPermissionsUpdate"] = "APPLICATION_COMMAND_PERMISSIONS_UPDATE"; 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["ChannelCreate"] = "CHANNEL_CREATE";
GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE"; GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE";
GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE"; GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_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["GuildBanAdd"] = "GUILD_BAN_ADD";
GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE"; GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE";
GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE"; GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE";
@@ -208,6 +208,16 @@ var GatewayDispatchEvents;
GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE"; GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE"; GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE"; 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["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE";
GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE"; GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE";
GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE"; GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE";
@@ -219,17 +229,23 @@ var GatewayDispatchEvents;
GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE"; GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE";
GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE"; GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE";
GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK"; GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
GatewayDispatchEvents["MessagePollVoteAdd"] = "MESSAGE_POLL_VOTE_ADD";
GatewayDispatchEvents["MessagePollVoteRemove"] = "MESSAGE_POLL_VOTE_REMOVE";
GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD"; GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE"; GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL"; GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI"; GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE"; GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE";
GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE"; GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE";
GatewayDispatchEvents["RateLimited"] = "RATE_LIMITED";
GatewayDispatchEvents["Ready"] = "READY";
GatewayDispatchEvents["Resumed"] = "RESUMED";
GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE"; GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE";
GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE"; GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE";
GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE"; GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE";
GatewayDispatchEvents["Ready"] = "READY"; GatewayDispatchEvents["SubscriptionCreate"] = "SUBSCRIPTION_CREATE";
GatewayDispatchEvents["Resumed"] = "RESUMED"; GatewayDispatchEvents["SubscriptionDelete"] = "SUBSCRIPTION_DELETE";
GatewayDispatchEvents["SubscriptionUpdate"] = "SUBSCRIPTION_UPDATE";
GatewayDispatchEvents["ThreadCreate"] = "THREAD_CREATE"; GatewayDispatchEvents["ThreadCreate"] = "THREAD_CREATE";
GatewayDispatchEvents["ThreadDelete"] = "THREAD_DELETE"; GatewayDispatchEvents["ThreadDelete"] = "THREAD_DELETE";
GatewayDispatchEvents["ThreadListSync"] = "THREAD_LIST_SYNC"; GatewayDispatchEvents["ThreadListSync"] = "THREAD_LIST_SYNC";
@@ -238,24 +254,24 @@ var GatewayDispatchEvents;
GatewayDispatchEvents["ThreadUpdate"] = "THREAD_UPDATE"; GatewayDispatchEvents["ThreadUpdate"] = "THREAD_UPDATE";
GatewayDispatchEvents["TypingStart"] = "TYPING_START"; GatewayDispatchEvents["TypingStart"] = "TYPING_START";
GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE"; GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE";
GatewayDispatchEvents["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND";
GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE"; GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE"; GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_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 = {})); })(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 // #endregion Shared
//# sourceMappingURL=v10.js.map //# 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;IACpB;;;;OAIG;IACH,8E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C;AAogBD,oBAAoB"}

View File

@@ -6,3 +6,4 @@ export const GatewayDispatchEvents = mod.GatewayDispatchEvents;
export const GatewayIntentBits = mod.GatewayIntentBits; export const GatewayIntentBits = mod.GatewayIntentBits;
export const GatewayOpcodes = mod.GatewayOpcodes; export const GatewayOpcodes = mod.GatewayOpcodes;
export const GatewayVersion = mod.GatewayVersion; 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 * 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'; 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. * @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 * 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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.VoiceCloseCodes = exports.VoiceOPCodes = exports.GatewayCloseCodes = exports.GatewayOPCodes = exports.GatewayVersion = void 0; 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. * @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","sourceRoot":"","sources":["v6.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;AAkBH,2CAAyB;AAEzB;;GAEG;AACU,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;;;GAIG;AACH,IAAY,cAaX;AAbD,WAAY,cAAc;IACzB,2DAAQ,CAAA;IACR,6DAAS,CAAA;IACT,2DAAQ,CAAA;IACR,uEAAc,CAAA;IACd,2EAAgB,CAAA;IAEhB,uDAAU,CAAA;IACV,6DAAS,CAAA;IACT,iFAAmB,CAAA;IACnB,uEAAc,CAAA;IACd,sDAAK,CAAA;IACL,oEAAY,CAAA;AACb,CAAC,EAbW,cAAc,8BAAd,cAAc,QAazB;AAED;;;;GAIG;AACH,IAAY,iBAgBX;AAhBD,WAAY,iBAAiB;IAC5B,4EAAoB,CAAA;IACpB,8EAAa,CAAA;IACb,0EAAW,CAAA;IACX,oFAAgB,CAAA;IAChB,4FAAoB,CAAA;IACpB,4FAAoB,CAAA;IAEpB,wEAAkB,CAAA;IAClB,0EAAW,CAAA;IACX,kFAAe,CAAA;IACf,4EAAY,CAAA;IACZ,o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,iFAAwB,CAAA;IACxB,+EAAuB,CAAA;IACvB,kGAAiC,CAAA;IACjC,4FAA8B,CAAA;IAC9B,kFAAyB,CAAA;IACzB,oGAAkC,CAAA;IAClC,+FAA+B,CAAA;AAChC,CAAC,EAhBW,iBAAiB,iCAAjB,iBAAiB,QAgB5B;AAED;;;;GAIG;AACH,IAAY,qBAqCX;AArCD,WAAY,qBAAqB;IAChC,wCAAe,CAAA;IACf,4CAAmB,CAAA;IACnB,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,qDAA4B,CAAA;IAC5B,qDAA4B,CAAA;IAC5B,qDAA4B,CAAA;IAC5B,sDAA6B,CAAA;IAC7B,4DAAmC,CAAA;IACnC,kEAAyC,CAAA;IACzC,8EAAqD,CAAA;IACrD,4DAAmC,CAAA;IACnC,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 { 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 { 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'; import type { _Nullable } from '../utils/internals';
export * from './common'; export type * from './common';
/** /**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10. * @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. * @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 * 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 * 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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0; 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. * @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;;OAEG;IACH,iFAAmB,CAAA;IACnB;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,sDAAK,CAAA;IACL;;OAEG;IACH,oEAAY,CAAA;AACb,CAAC,EA9CW,cAAc,8BAAd,c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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 * 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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0; exports.VoiceChannelEffectSendAnimationType = exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0;
__exportStar(require("./common"), exports);
exports.GatewayVersion = '9'; 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; var GatewayOpcodes;
(function (GatewayOpcodes) { (function (GatewayOpcodes) {
@@ -70,9 +55,13 @@ var GatewayOpcodes;
* Sent in response to receiving a heartbeat to acknowledge that it has been received * Sent in response to receiving a heartbeat to acknowledge that it has been received
*/ */
GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck"; GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck";
/**
* Request information about soundboard sounds in a set of guilds
*/
GatewayOpcodes[GatewayOpcodes["RequestSoundboardSounds"] = 31] = "RequestSoundboardSounds";
})(GatewayOpcodes || (exports.GatewayOpcodes = GatewayOpcodes = {})); })(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; var GatewayCloseCodes;
(function (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! * 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"; GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode";
/** /**
* You sent an invalid payload to us. Don't do that! * 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"; GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError";
/** /**
* You sent us a payload prior to identifying * 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"; GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated";
/** /**
* The account token sent with your identify payload is incorrect * 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"; 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 * 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"; GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq";
/** /**
@@ -125,13 +114,13 @@ var GatewayCloseCodes;
/** /**
* You sent us an invalid shard when identifying * 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"; GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard";
/** /**
* The session would have handled too many guilds - you are required to shard your connection in order to connect * 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"; 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 * 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"; 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 * 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 * enabled or are not whitelisted for
* *
* See https://discord.com/developers/docs/topics/gateway#gateway-intents * @see {@link https://discord.com/developers/docs/topics/gateway#gateway-intents}
* * @see {@link https://discord.com/developers/docs/topics/gateway#privileged-intents}
* See https://discord.com/developers/docs/topics/gateway#privileged-intents
*/ */
GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents"; GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents";
})(GatewayCloseCodes || (exports.GatewayCloseCodes = GatewayCloseCodes = {})); })(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; var GatewayIntentBits;
(function (GatewayIntentBits) { (function (GatewayIntentBits) {
@@ -163,9 +151,13 @@ var GatewayIntentBits;
GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers"; GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers";
GatewayIntentBits[GatewayIntentBits["GuildModeration"] = 4] = "GuildModeration"; 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["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["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers";
GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations"; GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations";
GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks"; GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks";
@@ -185,15 +177,23 @@ var GatewayIntentBits;
GatewayIntentBits[GatewayIntentBits["DirectMessagePolls"] = 33554432] = "DirectMessagePolls"; GatewayIntentBits[GatewayIntentBits["DirectMessagePolls"] = 33554432] = "DirectMessagePolls";
})(GatewayIntentBits || (exports.GatewayIntentBits = GatewayIntentBits = {})); })(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; var GatewayDispatchEvents;
(function (GatewayDispatchEvents) { (function (GatewayDispatchEvents) {
GatewayDispatchEvents["ApplicationCommandPermissionsUpdate"] = "APPLICATION_COMMAND_PERMISSIONS_UPDATE"; 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["ChannelCreate"] = "CHANNEL_CREATE";
GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE"; GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE";
GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE"; GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE";
GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_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["GuildBanAdd"] = "GUILD_BAN_ADD";
GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE"; GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE";
GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE"; GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE";
@@ -207,6 +207,16 @@ var GatewayDispatchEvents;
GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE"; GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE";
GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE"; GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE";
GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE"; 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["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE";
GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE"; GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE";
GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE"; GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE";
@@ -218,17 +228,23 @@ var GatewayDispatchEvents;
GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE"; GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE";
GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE"; GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE";
GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK"; GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK";
GatewayDispatchEvents["MessagePollVoteAdd"] = "MESSAGE_POLL_VOTE_ADD";
GatewayDispatchEvents["MessagePollVoteRemove"] = "MESSAGE_POLL_VOTE_REMOVE";
GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD"; GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD";
GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE"; GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE";
GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL"; GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL";
GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI"; GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI";
GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE"; GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE";
GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE"; GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE";
GatewayDispatchEvents["RateLimited"] = "RATE_LIMITED";
GatewayDispatchEvents["Ready"] = "READY";
GatewayDispatchEvents["Resumed"] = "RESUMED";
GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE"; GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE";
GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE"; GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE";
GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE"; GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE";
GatewayDispatchEvents["Ready"] = "READY"; GatewayDispatchEvents["SubscriptionCreate"] = "SUBSCRIPTION_CREATE";
GatewayDispatchEvents["Resumed"] = "RESUMED"; GatewayDispatchEvents["SubscriptionDelete"] = "SUBSCRIPTION_DELETE";
GatewayDispatchEvents["SubscriptionUpdate"] = "SUBSCRIPTION_UPDATE";
GatewayDispatchEvents["ThreadCreate"] = "THREAD_CREATE"; GatewayDispatchEvents["ThreadCreate"] = "THREAD_CREATE";
GatewayDispatchEvents["ThreadDelete"] = "THREAD_DELETE"; GatewayDispatchEvents["ThreadDelete"] = "THREAD_DELETE";
GatewayDispatchEvents["ThreadListSync"] = "THREAD_LIST_SYNC"; GatewayDispatchEvents["ThreadListSync"] = "THREAD_LIST_SYNC";
@@ -237,24 +253,24 @@ var GatewayDispatchEvents;
GatewayDispatchEvents["ThreadUpdate"] = "THREAD_UPDATE"; GatewayDispatchEvents["ThreadUpdate"] = "THREAD_UPDATE";
GatewayDispatchEvents["TypingStart"] = "TYPING_START"; GatewayDispatchEvents["TypingStart"] = "TYPING_START";
GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE"; GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE";
GatewayDispatchEvents["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND";
GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE"; GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE"; GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_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 = {})); })(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 // #endregion Shared
//# sourceMappingURL=v9.js.map //# sourceMappingURL=v9.js.map

View File

@@ -1 +1 @@
{"version":3,"file":"v9.js","sourceRoot":"","sources":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f,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 GatewayIntentBits = mod.GatewayIntentBits;
export const GatewayOpcodes = mod.GatewayOpcodes; export const GatewayOpcodes = mod.GatewayOpcodes;
export const GatewayVersion = mod.GatewayVersion; 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; export type Snowflake = string;
/** /**
* https://discord.com/developers/docs/topics/permissions * @see {@link https://discord.com/developers/docs/topics/permissions}
*
* @internal
*/ */
export type Permissions = string; 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: { 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 * The `timestamp` and `style` group properties are present on the `exec` result of this expression
*/ */
readonly StyledTimestamp: RegExp; 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 //# 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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.FormattingPatterns = void 0; 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 = { 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 * The `fullName` (possibly including `name`, `subcommandOrGroup` and `subcommand`) and `id` group properties are present on the `exec` result of this expression
*/ */
SlashCommand: 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,
// 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,
/** /**
* Regular expression for matching a custom emoji, either static or animated * 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 * The `timestamp` and `style` group properties are present on the `exec` result of this expression
*/ */
// eslint-disable-next-line prefer-named-capture-group // eslint-disable-next-line prefer-named-capture-group, unicorn/better-regex
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRTdft]))?>/, Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRSTdfst]))?>/,
/** /**
* Regular expression for matching strictly default styled timestamps * 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 * 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 * 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,8 +1,11 @@
{ {
"name": "discord-api-types", "name": "discord-api-types",
"version": "0.37.83", "version": "0.38.36",
"description": "Discord API typings that are kept up to date for use in bot library creation.", "description": "Discord API typings that are kept up to date for use in bot library creation.",
"homepage": "https://discord-api-types.dev", "homepage": "https://discord-api-types.dev",
"workspaces": [
"scripts/actions/documentation"
],
"exports": { "exports": {
"./globals": { "./globals": {
"types": "./globals.d.ts", "types": "./globals.d.ts",
@@ -93,12 +96,13 @@
"scripts": { "scripts": {
"build:ci": "tsc --noEmit --incremental false", "build:ci": "tsc --noEmit --incremental false",
"build:deno": "node ./scripts/deno.mjs", "build:deno": "node ./scripts/deno.mjs",
"build:node": "tsc && run-p esm:*", "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", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"ci:pr": "run-s changelog lint build:deno && node ./scripts/bump-website-version.mjs", "ci:pr": "run-s changelog lint build:deno && node ./scripts/bump-website-version.mjs",
"clean:deno": "rimraf deno/", "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: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:*", "clean": "run-p 'clean:*'",
"esm:gateway": "gen-esm-wrapper ./gateway/index.js ./gateway/index.mjs", "esm:gateway": "gen-esm-wrapper ./gateway/index.js ./gateway/index.mjs",
"esm:globals": "gen-esm-wrapper ./globals.js ./globals.mjs", "esm:globals": "gen-esm-wrapper ./globals.js ./globals.mjs",
"esm:payloads": "gen-esm-wrapper ./payloads/index.js ./payloads/index.mjs", "esm:payloads": "gen-esm-wrapper ./payloads/index.js ./payloads/index.mjs",
@@ -107,14 +111,12 @@
"esm:utils": "gen-esm-wrapper ./utils/index.js ./utils/index.mjs", "esm:utils": "gen-esm-wrapper ./utils/index.js ./utils/index.mjs",
"esm:versions": "node ./scripts/versions.mjs", "esm:versions": "node ./scripts/versions.mjs",
"esm:voice": "gen-esm-wrapper ./voice/index.js ./voice/index.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\"", "lint": "prettier --write . && eslint --format=pretty --fix --ext mjs,ts \"{gateway,payloads,rest,rpc,voice,utils}/**/*.ts\" \"{globals,v*}.ts\" \"scripts/**/*.mjs\"",
"postpublish": "run-s clean:node build:deno", "postinstallDev": "is-ci || husky",
"prepare": "tsc -p ./.eslint-plugin-local && (is-ci || husky)", "prepack": "run-s clean test:lint build:node",
"prepublishOnly": "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 --ext mjs,ts \"{gateway,payloads,rest,rpc,voice,utils}/**/*.ts\" \"{globals,v*}.ts\" \"scripts/**/*.mjs\"", "test:lint": "prettier --check . && eslint --format=pretty --ext mjs,ts \"{gateway,payloads,rest,rpc,voice,utils}/**/*.ts\" \"{globals,v*}.ts\" \"scripts/**/*.mjs\"",
"pretest:types": "tsc", "test:types": "tsc -p tests"
"test:types": "tsd -t ./v10.d.ts",
"posttest:types": "npm run clean:node"
}, },
"keywords": [ "keywords": [
"discord", "discord",
@@ -122,42 +124,49 @@
"types", "types",
"discordjs" "discordjs"
], ],
"author": "Vlad Frangu <kingdgrizzle@gmail.com>", "author": "Vlad Frangu <me@vladfrangu.dev>",
"license": "MIT", "license": "MIT",
"files": [ "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}", "{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}" "{globals,v*}.{js,js.map,d.ts,d.ts.map,mjs}"
], ],
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^19.0.3", "@commitlint/cli": "^20.0.0",
"@commitlint/config-angular": "^19.0.3", "@commitlint/config-angular": "^20.0.0",
"@favware/npm-deprecate": "^1.0.7", "@favware/npm-deprecate": "^2.0.0",
"@octokit/action": "^6.0.7", "@octokit/action": "^8.0.2",
"@octokit/webhooks-types": "^7.3.2", "@octokit/webhooks-types": "^7.6.1",
"@sapphire/prettier-config": "^2.0.0", "@sapphire/prettier-config": "^2.0.0",
"@types/conventional-recommended-bump": "^9.0.3", "@types/lodash.merge": "^4",
"@types/node": "^20.11.24", "@types/node": "^24.0.0",
"@typescript-eslint/utils": "^7.1.1", "@typescript-eslint/utils": "^8.33.0",
"conventional-changelog-cli": "^4.1.0", "conventional-changelog": "^7.0.2",
"conventional-recommended-bump": "^9.0.0", "conventional-changelog-angular": "^8.0.0",
"eslint": "^8.57.0", "conventional-recommended-bump": "^11.1.0",
"eslint-config-neon": "^0.1.59", "eslint": "^9.28.0",
"eslint-import-resolver-typescript": "^3.6.1", "eslint-config-neon": "^0.2.7",
"eslint-plugin-local": "^4.2.1", "eslint-formatter-pretty": "^7.0.0",
"eslint-import-resolver-typescript": "^4.4.2",
"gen-esm-wrapper": "^1.1.3", "gen-esm-wrapper": "^1.1.3",
"husky": "^9.0.11", "husky": "^9.1.7",
"is-ci": "^3.0.1", "is-ci": "^4.1.0",
"lint-staged": "^15.2.2", "lint-staged": "^16.1.0",
"npm-run-all2": "^6.0.0", "lodash.merge": "^4.6.2",
"prettier": "^3.2.5", "npm-run-all2": "^8.0.4",
"pretty-quick": "^4.0.0", "prettier": "^3.5.3",
"rimraf": "^5.0.5", "pretty-quick": "^4.1.1",
"tsd": "^0.31.0", "rimraf": "^6.0.1",
"ts-morph": "^27.0.0",
"tsutils": "^3.21.0", "tsutils": "^3.21.0",
"typescript": "^5.3.3" "tsx": "^4.20.3",
"typescript": "^5.8.3",
"typescript-eslint": "^8.33.0"
}, },
"publishConfig": { "publishConfig": {
"provenance": true "provenance": true,
"access": "public",
"registry": "https://registry.npmjs.org"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@@ -198,7 +207,9 @@
] ]
} }
}, },
"tsd": { "packageManager": "yarn@4.12.0",
"directory": "tests" "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()` * 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 * 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 * 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; readonly ManageEmojisAndStickers: bigint;
/** /**
@@ -232,7 +232,7 @@ export declare const PermissionFlagsBits: {
*/ */
readonly SendMessagesInThreads: bigint; 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 * Applies to channel types: Voice
*/ */
@@ -280,10 +280,28 @@ export declare const PermissionFlagsBits: {
* Applies to channel types: Text, Voice, Stage * Applies to channel types: Text, Voice, Stage
*/ */
readonly SendPolls: bigint; readonly SendPolls: bigint;
};
export type LocalizationMap = Partial<Record<LocaleString, string | null>>;
/** /**
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#json * 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<Locale, string | null>>;
/**
* @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#json}
*/ */
export interface RESTError { export interface RESTError {
code: number; code: number;
@@ -301,7 +319,7 @@ export type RESTErrorData = RESTErrorFieldInformation | RESTErrorGroupWrapper |
[k: string]: RESTErrorData; [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 { 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;;;;OAIG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OA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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 }); Object.defineProperty(exports, "__esModule", { value: true });
exports.PermissionFlagsBits = void 0; 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()` * 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 * may cause issues, try to use BigInts as much as possible or modules that can
@@ -18,7 +18,6 @@ exports.PermissionFlagsBits = {
/** /**
* Allows kicking members * Allows kicking members
*/ */
// eslint-disable-next-line sonarjs/no-identical-expressions
KickMembers: 1n << 1n, KickMembers: 1n << 1n,
/** /**
* Allows banning members * Allows banning members
@@ -179,7 +178,7 @@ exports.PermissionFlagsBits = {
/** /**
* Allows management and editing of emojis, stickers, and soundboard sounds * 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, ManageEmojisAndStickers: 1n << 30n,
/** /**
@@ -235,7 +234,7 @@ exports.PermissionFlagsBits = {
*/ */
SendMessagesInThreads: 1n << 38n, 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 * Applies to channel types: Voice
*/ */
@@ -283,6 +282,24 @@ exports.PermissionFlagsBits = {
* Applies to channel types: Text, Voice, Stage * Applies to channel types: Text, Voice, Stage
*/ */
SendPolls: 1n << 49n, 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 * 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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,CAAC"}

View File

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

View File

@@ -3,7 +3,7 @@ import type { ChannelType } from '../../../channel';
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base'; import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
import type { ApplicationCommandOptionType } from './shared'; import type { ApplicationCommandOptionType } from './shared';
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> { 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>; export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<ApplicationCommandOptionType.Channel, Snowflake>;
//# sourceMappingURL=channel.d.ts.map //# 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 { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; 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. * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
*/ */
@@ -11,8 +12,7 @@ interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOp
max_value?: number; max_value?: number;
} }
export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandIntegerOptionBase, APIApplicationCommandOptionChoice<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; focused?: boolean;
} }
export {};
//# sourceMappingURL=integer.d.ts.map //# 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 { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; 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. * If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
*/ */
@@ -11,8 +12,7 @@ interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOpt
max_value?: number; max_value?: number;
} }
export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper<APIApplicationCommandNumberOptionBase, APIApplicationCommandOptionChoice<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; focused?: boolean;
} }
export {};
//# sourceMappingURL=number.d.ts.map //# 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'; 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 { export declare enum ApplicationCommandOptionType {
Subcommand = 1, Subcommand = 1,
@@ -16,7 +16,7 @@ export declare enum ApplicationCommandOptionType {
Attachment = 11 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> { export interface APIApplicationCommandOptionChoice<ValueType = number | string> {
name: string; name: string;

View File

@@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.ApplicationCommandOptionType = void 0; 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; var ApplicationCommandOptionType;
(function (ApplicationCommandOptionType) { (function (ApplicationCommandOptionType) {

View File

@@ -1,6 +1,6 @@
import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base'; import type { APIApplicationCommandOptionBase, APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper, APIInteractionDataOptionBase } from './base';
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared'; 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`). * 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> { export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
focused?: boolean; focused?: boolean;
} }
export {};
//# sourceMappingURL=string.d.ts.map //# 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 { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput';
import type { APIApplicationCommandOptionBase } from './base'; import type { APIApplicationCommandOptionBase } from './base';
import type { ApplicationCommandOptionType } from './shared'; import type { ApplicationCommandOptionType } from './shared';
export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> { export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
options?: APIApplicationCommandBasicOption[]; options?: APIApplicationCommandBasicOption[];
} }
export interface APIApplicationCommandInteractionDataSubcommandOption { export interface APIApplicationCommandInteractionDataSubcommandOption<Type extends InteractionType = InteractionType> {
name: string; name: string;
type: ApplicationCommandOptionType.Subcommand; type: ApplicationCommandOptionType.Subcommand;
options?: APIApplicationCommandInteractionDataBasicOption[]; options?: APIApplicationCommandInteractionDataBasicOption<Type>[];
} }
//# sourceMappingURL=subcommand.d.ts.map //# 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 { APIApplicationCommandOptionBase } from './base';
import type { ApplicationCommandOptionType } from './shared'; import type { ApplicationCommandOptionType } from './shared';
import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicationCommandSubcommandOption } from './subcommand'; import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicationCommandSubcommandOption } from './subcommand';
export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> { export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
options?: APIApplicationCommandSubcommandOption[]; options?: APIApplicationCommandSubcommandOption[];
} }
export interface APIApplicationCommandInteractionDataSubcommandGroupOption { export interface APIApplicationCommandInteractionDataSubcommandGroupOption<Type extends InteractionType = InteractionType> {
name: string; name: string;
type: ApplicationCommandOptionType.SubcommandGroup; type: ApplicationCommandOptionType.SubcommandGroup;
options: APIApplicationCommandInteractionDataSubcommandOption[]; options: APIApplicationCommandInteractionDataSubcommandOption<Type>[];
} }
//# sourceMappingURL=subcommandGroup.d.ts.map //# 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 { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base'; import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base';
import type { APIApplicationCommandAttachmentOption, APIApplicationCommandInteractionDataAttachmentOption } from './_chatInput/attachment'; import type { APIApplicationCommandAttachmentOption, APIApplicationCommandInteractionDataAttachmentOption } from './_chatInput/attachment';
@@ -13,49 +13,56 @@ import type { APIApplicationCommandInteractionDataSubcommandOption, APIApplicati
import type { APIApplicationCommandInteractionDataSubcommandGroupOption, APIApplicationCommandSubcommandGroupOption } from './_chatInput/subcommandGroup'; import type { APIApplicationCommandInteractionDataSubcommandGroupOption, APIApplicationCommandSubcommandGroupOption } from './_chatInput/subcommandGroup';
import type { APIApplicationCommandInteractionDataUserOption, APIApplicationCommandUserOption } from './_chatInput/user'; import type { APIApplicationCommandInteractionDataUserOption, APIApplicationCommandUserOption } from './_chatInput/user';
import type { APIBaseApplicationCommandInteractionData } from './internals'; import type { APIBaseApplicationCommandInteractionData } from './internals';
export * from './_chatInput/attachment'; export type * from './_chatInput/attachment';
export * from './_chatInput/base'; export type * from './_chatInput/base';
export * from './_chatInput/boolean'; export type * from './_chatInput/boolean';
export * from './_chatInput/channel'; export type * from './_chatInput/channel';
export * from './_chatInput/integer'; export type * from './_chatInput/integer';
export * from './_chatInput/mentionable'; export type * from './_chatInput/mentionable';
export * from './_chatInput/number'; export type * from './_chatInput/number';
export * from './_chatInput/role'; export type * from './_chatInput/role';
export * from './_chatInput/shared'; export * from './_chatInput/shared';
export * from './_chatInput/string'; export type * from './_chatInput/string';
export * from './_chatInput/subcommand'; export type * from './_chatInput/subcommand';
export * from './_chatInput/subcommandGroup'; export type * from './_chatInput/subcommandGroup';
export * from './_chatInput/user'; 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; 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; 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 APIApplicationCommandInteractionDataOption<Type extends InteractionType = InteractionType> = APIApplicationCommandInteractionDataBasicOption<Type> | APIApplicationCommandInteractionDataSubcommandGroupOption<Type> | APIApplicationCommandInteractionDataSubcommandOption<Type>;
export type APIApplicationCommandInteractionDataBasicOption = APIApplicationCommandInteractionDataAttachmentOption | APIApplicationCommandInteractionDataBooleanOption | APIApplicationCommandInteractionDataChannelOption | APIApplicationCommandInteractionDataIntegerOption | APIApplicationCommandInteractionDataMentionableOption | APIApplicationCommandInteractionDataNumberOption | APIApplicationCommandInteractionDataRoleOption | APIApplicationCommandInteractionDataStringOption | APIApplicationCommandInteractionDataUserOption; 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> { export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
options?: APIApplicationCommandInteractionDataOption[]; options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[];
resolved?: APIInteractionDataResolved; 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>; 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>; 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>; export type APIChatInputApplicationCommandGuildInteraction = APIGuildInteractionWrapper<APIChatInputApplicationCommandInteraction>;
//# sourceMappingURL=chatInput.d.ts.map //# sourceMappingURL=chatInput.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"chatInput.d.ts","sourceRoot":"","sources":["chatInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAAE,uCAAuC,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC9G,OAAO,KAAK,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,KAAK,EACX,qCAAqC,EACrC,oDAAoD,EACpD,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACX,kCAAkC,EAClC,iDAAiD,EACjD,MAAM,sBAAsB,CAAC;AAC9B,OA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eAAe,GAAG,eAAe,IAClG,+CAA+C,CAAC,IAAI,CAAC,GACrD,yDAAyD,CAAC,IAAI,CAAC,GAC/D,oDAAoD,CAAC,IAAI,CAAC,CAAC;AAE9D,MAAM,MAAM,+CAA+C,CAAC,IAAI,SAAS,eAAe,GAAG,eAAe,IACvG,oDAAoD,GACpD,iDAAiD,GACjD,iDAAiD,GACjD,iDAAiD,CAAC,IAAI,CAAC,GACvD,qDAAqD,GACrD,gDAAgD,CAAC,IAAI,CAAC,GACtD,8CAA8C,GAC9C,gDAAgD,GAChD,8CAA8C,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,6CAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,SAAS,CAAC;IAClF,OAAO,CAAC,EAAE,0CAA0C,CAAC,eAAe,CAAC,kBAAkB,CAAC,EAAE,CAAC;IAC3F,QAAQ,CAAC,EAAE,0BAA0B,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,gDAChB,SAAQ,wCAAwC,CAAC,sBAAsB,CAAC,SAAS,CAAC;IAClF,OAAO,CAAC,EAAE,0CAA0C,CAAC,eAAe,CAAC,8BAA8B,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); for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
}; };
Object.defineProperty(exports, "__esModule", { value: true }); 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/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 //# 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 { Snowflake } from '../../../../globals';
import type { APIMessage } from '../../channel'; import type { APIMessage } from '../../message';
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands'; import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIUserInteractionDataResolved } from '../base'; import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIUserInteractionDataResolved } from '../base';
import type { APIBaseApplicationCommandInteractionData } from './internals'; 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> { export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
target_id: Snowflake; target_id: Snowflake;
resolved: APIUserInteractionDataResolved; 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> { export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
target_id: Snowflake; target_id: Snowflake;
resolved: APIMessageApplicationCommandInteractionDataResolved; 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 { export interface APIMessageApplicationCommandInteractionDataResolved {
messages: Record<Snowflake, APIMessage>; 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; 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>; 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>; 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>; 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>; 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>; 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>; 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; 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; 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; export type APIContextMenuGuildInteraction = APIMessageApplicationCommandGuildInteraction | APIUserApplicationCommandGuildInteraction;
//# sourceMappingURL=contextMenu.d.ts.map //# sourceMappingURL=contextMenu.d.ts.map

View File

@@ -1,6 +1,6 @@
import type { Snowflake } from '../../../../globals'; 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 { export interface APIGuildApplicationCommandPermissions {
/** /**
@@ -21,7 +21,7 @@ export interface APIGuildApplicationCommandPermissions {
permissions: APIApplicationCommandPermission[]; 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 { export interface APIApplicationCommandPermission {
/** /**
@@ -38,7 +38,7 @@ export interface APIApplicationCommandPermission {
permission: boolean; 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 { export declare enum ApplicationCommandPermissionType {
Role = 1, Role = 1,
@@ -46,7 +46,7 @@ export declare enum ApplicationCommandPermissionType {
Channel = 3 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: { export declare const APIApplicationCommandPermissionsConstant: {
Everyone: (guildId: bigint | string) => Snowflake; Everyone: (guildId: bigint | string) => Snowflake;

View File

@@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.APIApplicationCommandPermissionsConstant = exports.ApplicationCommandPermissionType = void 0; 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; var ApplicationCommandPermissionType;
(function (ApplicationCommandPermissionType) { (function (ApplicationCommandPermissionType) {
@@ -11,7 +11,7 @@ var ApplicationCommandPermissionType;
ApplicationCommandPermissionType[ApplicationCommandPermissionType["Channel"] = 3] = "Channel"; ApplicationCommandPermissionType[ApplicationCommandPermissionType["Channel"] = 3] = "Channel";
})(ApplicationCommandPermissionType || (exports.ApplicationCommandPermissionType = ApplicationCommandPermissionType = {})); })(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 = { exports.APIApplicationCommandPermissionsConstant = {
// eslint-disable-next-line unicorn/prefer-native-coercion-functions // 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 { LocalizationMap } from '../../../v10';
import type { APIApplicationCommandOption, APIChatInputApplicationCommandDMInteraction, APIChatInputApplicationCommandGuildInteraction, APIChatInputApplicationCommandInteraction, APIChatInputApplicationCommandInteractionData } from './_applicationCommands/chatInput'; import type { APIApplicationCommandOption, APIChatInputApplicationCommandDMInteraction, APIChatInputApplicationCommandGuildInteraction, APIChatInputApplicationCommandInteraction, APIChatInputApplicationCommandInteractionData } from './_applicationCommands/chatInput';
import type { APIContextMenuDMInteraction, APIContextMenuGuildInteraction, APIContextMenuInteraction, APIContextMenuInteractionData } from './_applicationCommands/contextMenu'; 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 { APIBaseInteraction } from './base';
import type { InteractionType } from './responses'; import type { InteractionType } from './responses';
export * from './_applicationCommands/chatInput'; export * from './_applicationCommands/chatInput';
export * from './_applicationCommands/contextMenu'; export type * from './_applicationCommands/contextMenu';
export * from './_applicationCommands/permissions'; 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 { export interface APIApplicationCommand {
/** /**
@@ -61,6 +64,8 @@ export interface APIApplicationCommand {
default_member_permissions: Permissions | null; 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 * 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; dm_permission?: boolean;
/** /**
@@ -68,44 +73,122 @@ export interface APIApplicationCommand {
* *
* If missing, this property should be assumed as `true` * 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; default_permission?: boolean;
/** /**
* Indicates whether the command is age-restricted, defaults to `false` * Indicates whether the command is age-restricted
*
* @defaultValue `false`
*/ */
nsfw?: boolean; 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 * Autoincrementing version identifier updated during substantial record changes
*/ */
version: Snowflake; 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 { export declare enum ApplicationCommandType {
/**
* Slash commands; a text-based command that shows up when a user types `/`
*/
ChatInput = 1, ChatInput = 1,
/**
* A UI-based command that shows up when you right click or tap on a user
*/
User = 2, 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 {
/** /**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object * App is installable to servers
*/
GuildInstall = 0,
/**
* App is installable to users
*/
UserInstall = 1
}
/**
* @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'>>; 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 //# 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,EAC3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ED;;GAEG;AACH,oBAAY,sBAAsB;IACjC;;OAEG;IACH,SAAS,IAAI;IACb;;OAEG;IACH,IAAI,IAAA;IACJ;;OAEG;IACH,OAAO,IAAA;IACP;;OAEG;IACH,iBAAiB,IAAA;CACjB;AAED;;GAEG;AACH,oBAAY,0BAA0B;IACrC;;OAEG;IACH,YAAY,IAAA;IACZ;;OAEG;IACH,WAAW,IAAA;CACX;AAED;;GAEG;AACH,oBAAY,sBAAsB;IACjC;;OAEG;IACH,KAAK,IAAA;IACL;;OAEG;IACH,KAAK,IAAA;IACL;;OAEG;IACH,cAAc,IAAA;CACd;AAED;;GAEG;AACH,oBAAY,4BAA4B;IACvC;;OAEG;IACH,UAAU,IAAI;IACd;;;OAGG;IACH,qBAAqB,IAAA;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAC7C,6CAA6C,GAC7C,6BAA6B,GAC7B,0CAA0C,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,uCAAuC,CAAC,IAAI,SAAS,oCAAoC,IACpG,kBAAkB,CAAC,eAAe,CAAC,kBAAkB,EAAE,IAAI,CAAC,GAC3D,QAAQ,CACP,IAAI,CACH,kBAAkB,CAAC,eAAe,CAAC,kBAAkB,EAAE,IAAI,CAAC,EAC5D,iBAAiB,GAAG,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); for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
}; };
Object.defineProperty(exports, "__esModule", { value: true }); 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/chatInput"), exports);
__exportStar(require("./_applicationCommands/contextMenu"), exports);
__exportStar(require("./_applicationCommands/permissions"), 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; var ApplicationCommandType;
(function (ApplicationCommandType) { (function (ApplicationCommandType) {
/**
* Slash commands; a text-based command that shows up when a user types `/`
*/
ApplicationCommandType[ApplicationCommandType["ChatInput"] = 1] = "ChatInput"; 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"; 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"; 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 = {})); })(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 //# 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'; import type { APIBaseInteraction, APIAutocompleteApplicationCommandInteractionData, APIDMInteractionWrapper, APIGuildInteractionWrapper, InteractionType } from '../index';
export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData> & Required<Pick<APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>>, 'data'>>; 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>; 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>; export type APIApplicationCommandAutocompleteGuildInteraction = APIGuildInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
//# sourceMappingURL=autocomplete.d.ts.map //# 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 { Permissions, Snowflake } from '../../../globals';
import type { APIRole, LocaleString } from '../../../v10'; import type { APIRole, ApplicationIntegrationType, InteractionContextType, Locale } from '../../../v10';
import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadChannel, ChannelType, ThreadChannelType } from '../channel'; import type { APIChannel, APIPartialChannel, APIThreadChannel, ChannelType, ThreadChannelType } from '../channel';
import type { APIGuildMember } from '../guild'; import type { APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined, APIPartialInteractionGuild } from '../guild';
import type { APIAttachment, APIMessage } from '../message';
import type { APIEntitlement } from '../monetization'; import type { APIEntitlement } from '../monetization';
import type { APIUser } from '../user'; import type { APIUser } from '../user';
import type { InteractionType } from './responses'; 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'>; 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 { export interface APIMessageInteraction {
/** /**
@@ -32,14 +91,14 @@ export interface APIMessageInteraction {
member?: PartialAPIMessageInteractionGuildMember; 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 { export interface APIInteractionGuildMember extends APIGuildMember {
permissions: Permissions; permissions: Permissions;
user: APIUser; 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> { export interface APIBaseInteraction<Type extends InteractionType, Data> {
/** /**
@@ -59,7 +118,11 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
*/ */
data?: 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; guild_id?: Snowflake;
/** /**
@@ -69,7 +132,7 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
/** /**
* The id of the channel it was sent from * The id of the channel it was sent from
* *
* @deprecated Use {@apilink APIBaseInteraction#channel} instead * @deprecated Use {@link APIBaseInteraction.channel} instead
*/ */
channel_id?: Snowflake; 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 * 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 * The selected language of the invoking user
*/ */
locale: LocaleString; locale: Locale;
/** /**
* The guild's preferred locale, if invoked in a guild * 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 * For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
*/ */
entitlements: APIEntitlement[]; 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 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 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> { export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> extends Required<APIPartialChannel> {
@@ -118,17 +196,17 @@ export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> ex
permissions: Permissions; 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'>); 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; 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 { export interface APIInteractionDataResolved {
users?: Record<Snowflake, APIUser>; 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,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MA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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 { Snowflake } from '../../../globals';
import type { ComponentType } from '../channel';
import type { APIBaseInteraction, InteractionType } from '../interactions'; import type { APIBaseInteraction, InteractionType } from '../interactions';
import type { ComponentType } from '../message';
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIInteractionDataResolved, APIUserInteractionDataResolved } from './base'; 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 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'>>; 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,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EACX,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,8BAA8B,EAC9B,MAAM,QAAQ,CAAC;AAEhB,MAAM,MAAM,8BAA8B,GAAG,kBAAkB,CAC9D,eAAe,CAAC,gBAAgB,EAChC,kCAAkC,CAClC,GACA,QAAQ,CACP,IAAI,CACH,kBAAkB,CAAC,eAAe,CAAC,gBAAgB,EAAE,kCAAkC,CAAC,EACxF,iBAAiB,GAAG,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CACjE,CACD,CAAC;AAEH,MAAM,MAAM,oCAAoC,GAAG,kBAAkB,CACpE,eAAe,CAAC,gBAAgB,EAChC,+BAA+B,CAC/B,GACA,QAAQ,CACP,IAAI,CACH,kBAAkB,CAAC,eAAe,CAAC,gBAAgB,EAAE,+BAA+B,CAAC,EACrF,iBAAiB,GAAG,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CACjE,CACD,CAAC;AAEH,MAAM,MAAM,wCAAwC,GAAG,kBAAkB,CACxE,eAAe,CAAC,gBAAgB,EAChC,mCAAmC,CACnC,GACA,QAAQ,CACP,IAAI,CACH,kBAAkB,CAAC,eAAe,CAAC,gBAAgB,EAAE,m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AC,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, APIInteractionDataResolved, ComponentType, InteractionType } from '../index';
import type { APIBaseInteraction, APIDMInteractionWrapper, APIGuildInteractionWrapper, ComponentType, InteractionType } from '../index'; import type { APIBaseComponent } from '../message';
export interface ModalSubmitComponent { export interface APIBaseModalSubmitComponent<T extends ComponentType> extends APIBaseComponent<T> {
type: ComponentType;
custom_id: string; custom_id: string;
}
export interface APIModalSubmitTextInputComponent extends APIBaseModalSubmitComponent<ComponentType.TextInput> {
value: string; value: string;
} }
export interface ModalSubmitActionRowComponent extends Omit<APIActionRowComponent<APIModalActionRowComponent>, 'components'> { export interface APIModalSubmitStringSelectComponent extends APIBaseModalSubmitComponent<ComponentType.StringSelect> {
components: ModalSubmitComponent[]; 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 { 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 * A developer-defined identifier for the component, max 100 characters
*/ */
@@ -19,18 +51,18 @@ export interface APIModalSubmission {
/** /**
* A list of child components * 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'>>; 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>; 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>; export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>;
//# sourceMappingURL=modalSubmit.d.ts.map //# sourceMappingURL=modalSubmit.d.ts.map

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