mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-21 10:50:08 +00:00
Compare commits
398 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e50ccf576 | ||
|
|
66c6b4f555 | ||
|
|
5cd0686f1a | ||
|
|
391d0d4454 | ||
|
|
2d3fc09ade | ||
|
|
3637535d28 | ||
|
|
14bca2694d | ||
|
|
1e8075e41d | ||
|
|
bb1f5dfe5e | ||
|
|
b9df5c2d02 | ||
|
|
812fbbe688 | ||
|
|
edf9a9651b | ||
|
|
9c2f1746b1 | ||
|
|
f8f039867e | ||
|
|
8a4a6d1e43 | ||
|
|
2e5e31b4c4 | ||
|
|
0bd00dd111 | ||
|
|
d5dc47a36c | ||
|
|
09c71fe9d1 | ||
|
|
3691d77da3 | ||
|
|
bece6b84ee | ||
|
|
e9e7f5c24f | ||
|
|
e1b27cd5a9 | ||
|
|
5acf5c5989 | ||
|
|
d165766302 | ||
|
|
702e541bf0 | ||
|
|
27ef064f92 | ||
|
|
c21ae24f7a | ||
|
|
b2a8b740e5 | ||
|
|
19d04c00c9 | ||
|
|
2802117c0b | ||
|
|
487c3b7980 | ||
|
|
3a296fa929 | ||
|
|
1506ff0d2b | ||
|
|
d4248babd2 | ||
|
|
07d7b05cde | ||
|
|
69bbc57575 | ||
|
|
6a29982d09 | ||
|
|
ae75ee7863 | ||
|
|
763bfc810c | ||
|
|
c76a1bc372 | ||
|
|
afe009d84e | ||
|
|
d4fc31de65 | ||
|
|
0a514f68d9 | ||
|
|
308308dfab | ||
|
|
ca423b001a | ||
|
|
3bc73f8b4f | ||
|
|
96a34ba74b | ||
|
|
b63fafdfd4 | ||
|
|
1c722899a1 | ||
|
|
c5aa81d971 | ||
|
|
ae938673f9 | ||
|
|
93e4c79e2e | ||
|
|
a99c8c0f53 | ||
|
|
c080b2a838 | ||
|
|
ed0c19aef7 | ||
|
|
662cb0cb0a | ||
|
|
e65e02f05f | ||
|
|
b4eaf0b607 | ||
|
|
ebdb44eb79 | ||
|
|
d7192dc74e | ||
|
|
b985362252 | ||
|
|
25778aeee9 | ||
|
|
899544f379 | ||
|
|
76ee81b8e1 | ||
|
|
93f3d45596 | ||
|
|
811314a825 | ||
|
|
ba01bacfc0 | ||
|
|
a4aa724eb8 | ||
|
|
dea22dc487 | ||
|
|
cf6476dc8a | ||
|
|
f76c2fa249 | ||
|
|
0000e9afe3 | ||
|
|
c3b331d80a | ||
|
|
f1a3cb7bb7 | ||
|
|
38b9467178 | ||
|
|
32b544e05e | ||
|
|
e1ff008cd6 | ||
|
|
46b8cbd46f | ||
|
|
c8ef2fefde | ||
|
|
bf12195401 | ||
|
|
a73d1d0ce2 | ||
|
|
17eade718c | ||
|
|
c242454e9f | ||
|
|
6dc3caa692 | ||
|
|
6b47a0c960 | ||
|
|
e9169b8acb | ||
|
|
d7a38425c0 | ||
|
|
8190a1a475 | ||
|
|
818b899f9d | ||
|
|
61788ced57 | ||
|
|
f6ae280ab5 | ||
|
|
6708005f0c | ||
|
|
9b00e9d441 | ||
|
|
cbec753710 | ||
|
|
5ea94a6629 | ||
|
|
cef79b442e | ||
|
|
1353b5915c | ||
|
|
beb982dd82 | ||
|
|
da016bd49d | ||
|
|
0ee3cf31bb | ||
|
|
8b22f9511f | ||
|
|
32975aecea | ||
|
|
c93fdc0996 | ||
|
|
164f79e6c4 | ||
|
|
e60a3f8aac | ||
|
|
36e76904ef | ||
|
|
177e9d199b | ||
|
|
7e0de6eaa1 | ||
|
|
c2872acc40 | ||
|
|
47b0d075b0 | ||
|
|
c726e8be53 | ||
|
|
6b6b256d5f | ||
|
|
26580371d2 | ||
|
|
a57db79645 | ||
|
|
2a9dfd41db | ||
|
|
8fd402464a | ||
|
|
a8e30a616c | ||
|
|
b549a5fe8d | ||
|
|
f9496a795f | ||
|
|
2a42f0d0b5 | ||
|
|
6f6b780851 | ||
|
|
6df197ac47 | ||
|
|
b6b4027cb5 | ||
|
|
807f86cb87 | ||
|
|
592503aa18 | ||
|
|
511ee8edd3 | ||
|
|
dd79152139 | ||
|
|
94d41859b7 | ||
|
|
a3aec11efd | ||
|
|
0bd1de5a97 | ||
|
|
18fa946bdf | ||
|
|
df9c860cca | ||
|
|
deea7340d3 | ||
|
|
5abb566fcb | ||
|
|
b29dd22b52 | ||
|
|
5adaf81117 | ||
|
|
6ed498e4a1 | ||
|
|
d6ce5e8259 | ||
|
|
ef46b927b6 | ||
|
|
0192dab947 | ||
|
|
3c846fc0dc | ||
|
|
e51f9c6cfc | ||
|
|
ffec279615 | ||
|
|
2389ed4f27 | ||
|
|
d8b6653b69 | ||
|
|
36500e61ae | ||
|
|
d363c6b9b3 | ||
|
|
acdf14ca54 | ||
|
|
8aa9e9e849 | ||
|
|
b67f4bd157 | ||
|
|
aec9bc07e5 | ||
|
|
237d00ca3d | ||
|
|
4ba461e93f | ||
|
|
dd55679e75 | ||
|
|
60cdc321ef | ||
|
|
c533c76df9 | ||
|
|
5b82aa564c | ||
|
|
5a4c4aff19 | ||
|
|
38e98c8063 | ||
|
|
8f0474b83c | ||
|
|
e8893bc7f4 | ||
|
|
fd16e2799b | ||
|
|
b6f328aa0f | ||
|
|
6579f2c9c5 | ||
|
|
176e2f59b6 | ||
|
|
0d35199598 | ||
|
|
7d1b2a2ae0 | ||
|
|
12760a8959 | ||
|
|
a8c28ab728 | ||
|
|
cdec113cbf | ||
|
|
de72feaa35 | ||
|
|
aa6e72d34f | ||
|
|
2117f4926b | ||
|
|
f883770df6 | ||
|
|
117b63dcd0 | ||
|
|
5f25c39bc5 | ||
|
|
200f650539 | ||
|
|
2736687283 | ||
|
|
388faf3d33 | ||
|
|
20b7057c50 | ||
|
|
5c73edb70a | ||
|
|
2b5a2bc1e9 | ||
|
|
b89290fc95 | ||
|
|
bf4291bed8 | ||
|
|
4237b1a115 | ||
|
|
d47172c0c9 | ||
|
|
075ec3daf2 | ||
|
|
4e69666fe6 | ||
|
|
73760723b4 | ||
|
|
6fdf2c8a72 | ||
|
|
fb8972f52c | ||
|
|
fb0109e8e0 | ||
|
|
e37f802e39 | ||
|
|
ea2b922d12 | ||
|
|
be8b372663 | ||
|
|
c5c0312867 | ||
|
|
7d6a934f66 | ||
|
|
9347651bbe | ||
|
|
6e5563e2b7 | ||
|
|
8064df3722 | ||
|
|
eeb99a9ea0 | ||
|
|
63c9e4f72e | ||
|
|
4d73b0e509 | ||
|
|
a56c3c892e | ||
|
|
97b0580189 | ||
|
|
62e5b4a95c | ||
|
|
c96926b6a2 | ||
|
|
790b4deb0f | ||
|
|
51b2d4e1c9 | ||
|
|
687f474d4e | ||
|
|
ff892fa66e | ||
|
|
84f312db2a | ||
|
|
9665e02367 | ||
|
|
71a0b8d211 | ||
|
|
00c46946a0 | ||
|
|
f65b30a3bf | ||
|
|
6295858de5 | ||
|
|
0c6d4249b6 | ||
|
|
95b186deb7 | ||
|
|
18cf4a514e | ||
|
|
7a07478721 | ||
|
|
97cc33d528 | ||
|
|
f6e0da697b | ||
|
|
6f286522b4 | ||
|
|
d74c6f1923 | ||
|
|
7937338193 | ||
|
|
d0ed48c189 | ||
|
|
607dd01f09 | ||
|
|
34485bc840 | ||
|
|
eb252bd049 | ||
|
|
34bd7d0aba | ||
|
|
de7ac23d41 | ||
|
|
e52ac85e9d | ||
|
|
aca4683388 | ||
|
|
e316373609 | ||
|
|
cf57fc92dd | ||
|
|
14963d61d4 | ||
|
|
041583d8da | ||
|
|
35a4084647 | ||
|
|
35867c19e6 | ||
|
|
8eb66a1512 | ||
|
|
5a07684ef9 | ||
|
|
464a9c8cbf | ||
|
|
4d3d83d09e | ||
|
|
af3907b106 | ||
|
|
fa05a7503f | ||
|
|
36567c75e8 | ||
|
|
51106df44d | ||
|
|
7df81ce484 | ||
|
|
28dfa78080 | ||
|
|
9f7933dd03 | ||
|
|
ae09e2b9e4 | ||
|
|
d3dc8c13d7 | ||
|
|
e665ddc003 | ||
|
|
a4063bd034 | ||
|
|
3659c59ce7 | ||
|
|
e849c17e84 | ||
|
|
8947930088 | ||
|
|
ad46fc3d38 | ||
|
|
4d1f9d96bc | ||
|
|
72445f8ae2 | ||
|
|
1a37ae3eea | ||
|
|
b05df17466 | ||
|
|
51705cba50 | ||
|
|
77ffcfecb9 | ||
|
|
3cb4bb409b | ||
|
|
8db0929ba1 | ||
|
|
5e096f7e61 | ||
|
|
4a6bfd2a56 | ||
|
|
f35fc69267 | ||
|
|
2a7c1d271f | ||
|
|
b7e8a9f527 | ||
|
|
e428c7590f | ||
|
|
5f9c1e1b1c | ||
|
|
87b52b7890 | ||
|
|
256911b9ad | ||
|
|
26a6dd5c77 | ||
|
|
a45f0161e7 | ||
|
|
53f47105dc | ||
|
|
36b23c126b | ||
|
|
53ac69e1a7 | ||
|
|
fe08e2d1e2 | ||
|
|
4afd0c13fd | ||
|
|
03f02a5a9e | ||
|
|
b4285c1d7e | ||
|
|
295276a581 | ||
|
|
46bb280690 | ||
|
|
cda030d74e | ||
|
|
79534f2e9d | ||
|
|
e6c12634e9 | ||
|
|
a41e646d3d | ||
|
|
a72e4545a3 | ||
|
|
0785436e2f | ||
|
|
5cd2511798 | ||
|
|
b760be279a | ||
|
|
c47e14570d | ||
|
|
30f95bc938 | ||
|
|
fe220db046 | ||
|
|
2f3b892feb | ||
|
|
574e5c12bd | ||
|
|
3eb77eb89e | ||
|
|
cbee43cdcd | ||
|
|
ecb4c336c0 | ||
|
|
9b68f04fb7 | ||
|
|
82f8ec4366 | ||
|
|
92b6632981 | ||
|
|
a8faa02857 | ||
|
|
1fee6339bf | ||
|
|
3245f7de92 | ||
|
|
b238cc5b67 | ||
|
|
e2ce6a3d2d | ||
|
|
f1d456de8c | ||
|
|
71c6d2609f | ||
|
|
7fbb3e3310 | ||
|
|
ef1f32acd0 | ||
|
|
6b05db5a2f | ||
|
|
ab926eb038 | ||
|
|
3e394aa44b | ||
|
|
077623299d | ||
|
|
fa5ab47b5e | ||
|
|
77cb32746f | ||
|
|
60e2b679f8 | ||
|
|
818d4ee6e7 | ||
|
|
31f07f9e5b | ||
|
|
91d851628d | ||
|
|
b2da18c634 | ||
|
|
9ae89dd9d8 | ||
|
|
c60f8d2e29 | ||
|
|
bb713c0aec | ||
|
|
28bb65f85a | ||
|
|
c76dd317b4 | ||
|
|
6df612809b | ||
|
|
7a18245abf | ||
|
|
ba70b0573c | ||
|
|
d71276cb5f | ||
|
|
121fb47f4c | ||
|
|
83d34ef00c | ||
|
|
c670a2551a | ||
|
|
ebf313c49c | ||
|
|
1d8f79e6b2 | ||
|
|
7d92c012c7 | ||
|
|
5d72696e20 | ||
|
|
10bf20b000 | ||
|
|
b16b065d04 | ||
|
|
61cda0c1fb | ||
|
|
7020afbe84 | ||
|
|
a2f3a7e79b | ||
|
|
a51261d2f2 | ||
|
|
de98a67b41 | ||
|
|
a822bc3f77 | ||
|
|
923aae517f | ||
|
|
8c61ed12dc | ||
|
|
e37ebed680 | ||
|
|
3cfa7f8ea7 | ||
|
|
f4b750062d | ||
|
|
0909412254 | ||
|
|
58fa897069 | ||
|
|
b7857315c4 | ||
|
|
64855f3451 | ||
|
|
da23f132f4 | ||
|
|
9daac44f1d | ||
|
|
72b8c830ee | ||
|
|
b360b2e6a7 | ||
|
|
544bd94be5 | ||
|
|
f25ea9dd1f | ||
|
|
c531fe2ff1 | ||
|
|
8d56c85160 | ||
|
|
653bba0bad | ||
|
|
90711463b6 | ||
|
|
17e1173e3d | ||
|
|
b0eed606a0 | ||
|
|
631be006d7 | ||
|
|
565918591b | ||
|
|
38fe58bc1a | ||
|
|
210ed49724 | ||
|
|
fda19fd863 | ||
|
|
4b84659fff | ||
|
|
b1244f1117 | ||
|
|
6a103d6b8a | ||
|
|
3af2ae2b85 | ||
|
|
a5d949e650 | ||
|
|
42acecced8 | ||
|
|
21420c3028 | ||
|
|
ca206593ef | ||
|
|
c64362a711 | ||
|
|
f5eb4b9e35 | ||
|
|
06ca2741f0 | ||
|
|
0479cafa1b | ||
|
|
bfaf36e42e | ||
|
|
5049f81b39 | ||
|
|
6437928821 | ||
|
|
07c9d4aab2 | ||
|
|
4b0a3af12b | ||
|
|
7196d8772d | ||
|
|
7d1d55fdc7 | ||
|
|
04ee6ac7f1 | ||
|
|
f5f850eb10 |
@@ -1,187 +0,0 @@
|
||||
import { AST_NODE_TYPES, ESLintUtils, TSESTree } from '@typescript-eslint/utils';
|
||||
import * as typescript from 'typescript';
|
||||
import * as tsutils from 'tsutils';
|
||||
|
||||
type Options = [
|
||||
{
|
||||
interfaceEndings: string[];
|
||||
},
|
||||
];
|
||||
|
||||
function shouldRun(eslNode: TSESTree.TSPropertySignature, interfaceEndings: string[]): boolean {
|
||||
// The first parent is the TSInterfaceBody, the second is the TSInterfaceDeclaration
|
||||
const interfaceNode = eslNode.parent?.parent;
|
||||
if (!(interfaceNode && 'id' in interfaceNode && interfaceNode.id?.type === AST_NODE_TYPES.Identifier)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const { name } = interfaceNode.id;
|
||||
if (typeof name !== 'string') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return interfaceEndings.some((ending) => name.endsWith(ending));
|
||||
}
|
||||
|
||||
const schema = [
|
||||
{
|
||||
type: 'object',
|
||||
properties: {
|
||||
interfaceEndings: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
] as const;
|
||||
|
||||
const REST_TYPE_NAME_REGEX =
|
||||
/^REST(?:Get|Patch|Post|Put|Delete)[a-zA-Z0-9]+(?:JSONBody|FormDataBody|URLEncodedData|Result|Query)$/;
|
||||
|
||||
export = {
|
||||
rules: {
|
||||
'explicitly-optional-undefined-properties': ESLintUtils.RuleCreator.withoutDocs<Options, 'missingOptional'>({
|
||||
create: (context) => {
|
||||
const { interfaceEndings } = context.options[0];
|
||||
return {
|
||||
TSPropertySignature: (eslNode) => {
|
||||
if (!shouldRun(eslNode, interfaceEndings)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (eslNode.optional) {
|
||||
return;
|
||||
}
|
||||
|
||||
const parserServices = ESLintUtils.getParserServices(context);
|
||||
const checker = parserServices.program.getTypeChecker();
|
||||
const tsNode = parserServices.esTreeNodeToTSNodeMap.get(eslNode);
|
||||
const type = checker.getApparentType(checker.getTypeAtLocation(tsNode));
|
||||
const unionParts = tsutils.unionTypeParts(type);
|
||||
|
||||
// If our prop is not optional, but has undefined in its union, we should report
|
||||
if (!unionParts.some((ty) => tsutils.isTypeFlagSet(ty, typescript.TypeFlags.Undefined))) {
|
||||
return;
|
||||
}
|
||||
|
||||
context.report({
|
||||
node: eslNode,
|
||||
messageId: 'missingOptional',
|
||||
fix: (fixer) => fixer.insertTextAfter(eslNode.key, '?'),
|
||||
});
|
||||
},
|
||||
};
|
||||
},
|
||||
meta: {
|
||||
fixable: 'code',
|
||||
messages: {
|
||||
missingOptional: 'When a property has `| undefined`, it should be marked as optional.',
|
||||
},
|
||||
type: 'problem',
|
||||
schema: schema,
|
||||
},
|
||||
defaultOptions: [{ interfaceEndings: [] }],
|
||||
}),
|
||||
'explicit-undefined-on-optional-properties': ESLintUtils.RuleCreator.withoutDocs<Options, 'missingUndefined'>({
|
||||
create: (context) => {
|
||||
const { interfaceEndings } = context.options[0];
|
||||
return {
|
||||
// This is done naively because type-checking the node will always include `| undefined`
|
||||
// due to it being optional. ideally, we'd have a way to get the type of the node disregarding
|
||||
// the optional flag, which would make this check a lot more trivial
|
||||
TSPropertySignature: (eslNode) => {
|
||||
if (!shouldRun(eslNode, interfaceEndings)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If our prop is't optional or if it doesn't have a type annotation, we don't need to do anything
|
||||
if (!eslNode.optional || !eslNode.typeAnnotation) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { typeAnnotation } = eslNode.typeAnnotation;
|
||||
switch (typeAnnotation.type) {
|
||||
case AST_NODE_TYPES.TSUnionType: {
|
||||
if (typeAnnotation.types.some((t) => t.type === AST_NODE_TYPES.TSUndefinedKeyword)) {
|
||||
return;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case AST_NODE_TYPES.TSUndefinedKeyword: {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
context.report({
|
||||
node: eslNode,
|
||||
messageId: 'missingUndefined',
|
||||
fix: (fixer) => fixer.insertTextAfter(eslNode.typeAnnotation!, ' | undefined'),
|
||||
});
|
||||
},
|
||||
};
|
||||
},
|
||||
meta: {
|
||||
fixable: 'code',
|
||||
messages: {
|
||||
missingUndefined: 'When a property is optional, explicitly include `undefined` in the union.',
|
||||
},
|
||||
type: 'suggestion',
|
||||
schema: schema,
|
||||
},
|
||||
defaultOptions: [{ interfaceEndings: [] }],
|
||||
}),
|
||||
'rest-type-naming-convention': ESLintUtils.RuleCreator.withoutDocs<[{ whitelist: string[] }], 'invalidName'>({
|
||||
create: (context) => {
|
||||
const { whitelist } = context.options[0];
|
||||
const whitelistSet = new Set(whitelist);
|
||||
|
||||
return {
|
||||
'TSTypeAliasDeclaration, TSInterfaceDeclaration': (
|
||||
node: TSESTree.TSTypeAliasDeclaration | TSESTree.TSInterfaceDeclaration,
|
||||
) => {
|
||||
if (node.id.type !== AST_NODE_TYPES.Identifier) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { name } = node.id;
|
||||
if (whitelistSet.has(name)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!REST_TYPE_NAME_REGEX.test(name)) {
|
||||
context.report({
|
||||
node: node.id,
|
||||
messageId: 'invalidName',
|
||||
data: { name },
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
meta: {
|
||||
messages: {
|
||||
invalidName: `{{ name }} does not match REST type naming convention. Must match ${REST_TYPE_NAME_REGEX.source}.`,
|
||||
},
|
||||
type: 'problem',
|
||||
schema: [
|
||||
{
|
||||
type: 'object',
|
||||
properties: {
|
||||
whitelist: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
] as const,
|
||||
},
|
||||
defaultOptions: [{ whitelist: [] }],
|
||||
}),
|
||||
},
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"declaration": false,
|
||||
"declarationMap": false,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": ["./index.ts"]
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
deno/
|
||||
|
||||
gateway/v6/*
|
||||
payloads/v6/*
|
||||
rest/v6/*
|
||||
v6.ts
|
||||
|
||||
gateway/v8/*
|
||||
payloads/v8/*
|
||||
rest/v8/*
|
||||
utils/v8.ts
|
||||
v8.ts
|
||||
@@ -1,73 +0,0 @@
|
||||
{
|
||||
"extends": ["neon/common", "neon/node", "neon/typescript", "neon/prettier"],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"project": "./tsconfig.eslint.json"
|
||||
},
|
||||
"plugins": ["local"],
|
||||
"rules": {
|
||||
"local/explicit-undefined-on-optional-properties": ["error", { "interfaceEndings": ["JSONBody"] }],
|
||||
"local/explicitly-optional-undefined-properties": ["error", { "interfaceEndings": ["JSONBody"] }],
|
||||
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
||||
"@typescript-eslint/prefer-literal-enum-member": "off",
|
||||
"@typescript-eslint/sort-type-union-intersection-members": "off",
|
||||
"import/extensions": "off",
|
||||
"tsdoc/syntax": "off",
|
||||
"typescript-sort-keys/interface": "off",
|
||||
"typescript-sort-keys/string-enum": "off",
|
||||
"unicorn/prefer-math-trunc": "off",
|
||||
"jsdoc/no-undefined-types": "off"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["rest/v10/*.ts", "rest/v9/*.ts"],
|
||||
"excludedFiles": ["rest/v10/index.ts", "rest/v9/index.ts"],
|
||||
"rules": {
|
||||
"local/rest-type-naming-convention": [
|
||||
"error",
|
||||
{
|
||||
"whitelist": [
|
||||
"RESTAPIAttachment",
|
||||
"RESTAPIChannelPatchOverwrite",
|
||||
"RESTAPIGuildChannelResolvable",
|
||||
"RESTAPIGuildCreateOverwrite",
|
||||
"RESTAPIGuildCreatePartialChannel",
|
||||
"RESTAPIGuildCreateRole",
|
||||
"RESTAPIGuildOnboardingPrompt",
|
||||
"RESTAPIGuildOnboardingPromptOption",
|
||||
"RESTAPIInteractionCallbackActivityInstanceResource",
|
||||
"RESTAPIInteractionCallbackObject",
|
||||
"RESTAPIInteractionCallbackResourceObject",
|
||||
"RESTAPIMessageReference",
|
||||
"RESTAPIPartialCurrentUserGuild",
|
||||
"RESTAPIPoll",
|
||||
|
||||
"RESTOAuth2AdvancedBotAuthorizationQuery",
|
||||
"RESTOAuth2AdvancedBotAuthorizationQueryResult",
|
||||
"RESTOAuth2AuthorizationQuery",
|
||||
"RESTOAuth2BotAuthorizationQuery",
|
||||
"RESTOAuth2ImplicitAuthorizationQuery",
|
||||
"RESTOAuth2ImplicitAuthorizationURLFragmentResult",
|
||||
|
||||
// Deprecated types
|
||||
"APIChannelPatchOverwrite",
|
||||
"APIGuildChannelResolvable",
|
||||
"APIGuildCreateOverwrite",
|
||||
"APIGuildCreatePartialChannel",
|
||||
"APIGuildCreateRole",
|
||||
"APIMessageReferenceSend",
|
||||
"GetAPIVoiceRegionsResult",
|
||||
"RESTAPIModifyGuildOnboardingPromptData",
|
||||
"RESTAPIModifyGuildOnboardingPromptOptionData",
|
||||
"RESTAPIPollCreate",
|
||||
"RESTDeleteAPIChannelMessageOwnReaction",
|
||||
"RESTGetAPIStickerPack",
|
||||
"RESTOAuth2AuthorizationQueryResult",
|
||||
"RESTPostAPIEntitlementBody"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
17
.github/CODEOWNERS
vendored
17
.github/CODEOWNERS
vendored
@@ -1,10 +1,11 @@
|
||||
* @vladfrangu
|
||||
|
||||
/*.ts @discordjs/discord-api-types @discordjs/core
|
||||
gateway/ @discordjs/discord-api-types @discordjs/core
|
||||
payloads/ @discordjs/discord-api-types @discordjs/core
|
||||
rest/ @discordjs/discord-api-types @discordjs/core
|
||||
rpc/ @discordjs/discord-api-types @discordjs/core
|
||||
tests/ @discordjs/discord-api-types @discordjs/core
|
||||
utils/ @discordjs/discord-api-types @discordjs/core
|
||||
voice/ @discordjs/discord-api-types @discordjs/core
|
||||
/*.ts @discordjs/discord-api-types
|
||||
deno/ @discordjs/discord-api-types
|
||||
gateway/ @discordjs/discord-api-types
|
||||
payloads/ @discordjs/discord-api-types
|
||||
rest/ @discordjs/discord-api-types
|
||||
rpc/ @discordjs/discord-api-types
|
||||
tests/ @discordjs/discord-api-types
|
||||
utils/ @discordjs/discord-api-types
|
||||
voice/ @discordjs/discord-api-types
|
||||
|
||||
12
.github/CONTRIBUTING.md
vendored
12
.github/CONTRIBUTING.md
vendored
@@ -1,23 +1,17 @@
|
||||
# discord-api-types Contributing Guide
|
||||
|
||||
**The issue tracker is only for bug reports and enhancement suggestions. If you have a question, please ask it in the [Discord server](https://discord.gg/djs) instead of opening an issue, or on [GitHub Discussions](https://github.com/discordjs/discord-api-types/discussions) – you will get redirected there anyway.**
|
||||
|
||||
- [Code of Conduct](https://github.com/discordjs/discord-api-types/blob/main/.github/CODE_OF_CONDUCT.md)
|
||||
- [Pull Request Guidelines](#pull-request-guidelines)
|
||||
- [Development Setup](#development-setup)
|
||||
- [Project Structure](#project-structure)
|
||||
- [Contributing Tests](#contributing-tests)
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
- Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch.
|
||||
|
||||
- If adding a new feature:
|
||||
|
||||
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
|
||||
|
||||
- If fixing a bug:
|
||||
|
||||
- If you are resolving a special issue, add `fix/close #xxxx[,#xxxx]` (#xxxx is the issue id) in your PR body for a better release log, e.g.
|
||||
|
||||
```
|
||||
@@ -32,18 +26,18 @@
|
||||
|
||||
- Make sure tests pass!
|
||||
|
||||
- Commit messages must follow the [commit message convention](./COMMIT_CONVENTION.md) so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [husky](https://github.com/typicode/husky)).
|
||||
- Commit messages must follow the [commit message convention](https://github.com/discordjs/discord-api-types/blob/main/.github/COMMIT_CONVENTION.md) so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [husky](https://github.com/typicode/husky)).
|
||||
|
||||
- No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [husky](https://github.com/typicode/husky)).
|
||||
|
||||
## Development Setup
|
||||
|
||||
You will need [Node.js](http://nodejs.org) **version 12+**, and [npm](https://www.npmjs.com/).
|
||||
You will need an LTS version of [Node.js](http://nodejs.org) and [Yarn](https://yarnpkg.com).
|
||||
|
||||
After cloning the repo, run:
|
||||
|
||||
```bash
|
||||
$ npm i # install the dependencies of the project
|
||||
$ yarn install # Install the dependencies of the project
|
||||
```
|
||||
|
||||
A high level overview of tools used:
|
||||
|
||||
32
.github/workflows/check-deno.yml
vendored
32
.github/workflows/check-deno.yml
vendored
@@ -1,32 +0,0 @@
|
||||
name: Deno
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
|
||||
jobs:
|
||||
check_deno:
|
||||
name: Ensure Deno types are in sync with the code
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js v20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run Check Script
|
||||
run: node ./scripts/actions/report-deno-not-ran.mjs
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
21
.github/workflows/cicd.yml
vendored
21
.github/workflows/cicd.yml
vendored
@@ -12,26 +12,25 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Add problem matcher
|
||||
run: echo "::add-matcher::.github/problemMatchers/eslint.json" && echo "::add-matcher::.github/problemMatchers/tsc.json"
|
||||
|
||||
- name: Use Node.js v20
|
||||
uses: actions/setup-node@v4
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
registry-url: https://registry.npmjs.org/
|
||||
cache: 'yarn'
|
||||
node-version-file: package.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Install Dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Check lint on discord-api-types
|
||||
run: npm run test:lint
|
||||
run: yarn test:lint
|
||||
|
||||
- name: Run TSC
|
||||
run: npm run build:ci
|
||||
run: yarn build:ci
|
||||
|
||||
- name: Run Type Tests
|
||||
run: npm run test:types
|
||||
run: yarn test:types
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
name: Create PR for new releases and publish new version
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
# Run every Monday and Thursday at 12:00
|
||||
- cron: '0 12 * * 1,4'
|
||||
|
||||
jobs:
|
||||
create_pr:
|
||||
name: Create PR for new version
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'discordjs' && github.event_name != 'push'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Node v20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
registry-url: https://registry.npmjs.org/
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Install website dependencies
|
||||
run: pushd website && npm ci --ignore-scripts && popd
|
||||
|
||||
- name: Set Git User and Email
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Bump version
|
||||
run: node ./scripts/bump-version.mjs
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create branch for changes, add all changes and push
|
||||
run: |
|
||||
git checkout -b "chore/release/$(jq --raw-output '.version' package.json)"
|
||||
|
||||
# Run changelog generation, deno script, website version bump
|
||||
npm run ci:pr
|
||||
|
||||
# Add all changes, commit and push
|
||||
git add --all .
|
||||
git commit -m "chore(release): $(jq --raw-output '.version' package.json) 🎉" -m "Build ran for ${GITHUB_SHA}"
|
||||
git push -u origin "chore/release/$(jq --raw-output '.version' package.json)"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create Pull Request
|
||||
run: node ./scripts/actions/create-pr.mjs
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
create_release:
|
||||
name: Create release and publish
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
if: github.repository_owner == 'discordjs' && github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(release)') && !contains(github.event.head_commit.message, '[skip ci]')
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Node v20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
registry-url: https://registry.npmjs.org/
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Publish release to npm
|
||||
run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||
|
||||
- name: Create GitHub release
|
||||
run: node ./scripts/actions/create-release.mjs
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
241
.github/workflows/documentation.yml
vendored
Normal file
241
.github/workflows/documentation.yml
vendored
Normal file
@@ -0,0 +1,241 @@
|
||||
name: Documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths:
|
||||
- '**'
|
||||
- '!website/**'
|
||||
tags:
|
||||
- '**'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ref:
|
||||
description: 'The branch, tag or SHA to checkout'
|
||||
required: true
|
||||
ref_type:
|
||||
type: choice
|
||||
description: 'Branch or tag'
|
||||
options:
|
||||
- branch
|
||||
- tag
|
||||
required: true
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
ACTION_PACKAGE: discord-api-types
|
||||
|
||||
jobs:
|
||||
build-docs:
|
||||
name: Build & upload documentation
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
REF_TYPE: ${{ inputs.ref_type || github.ref_type }}
|
||||
if: github.repository_owner == 'discordjs'
|
||||
|
||||
steps:
|
||||
- name: Checkout discord-api-types
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ inputs.ref || '' }}
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
cache: 'yarn'
|
||||
node-version-file: package.json
|
||||
|
||||
- name: Install Dependencies for discord-api-types
|
||||
run: yarn
|
||||
|
||||
#region DJS start (mostly from discord.js/packages/actions/src/pnpmCache)
|
||||
# pnpm --filter="*api-*" --filter="scripts" --filter="actions" run build
|
||||
|
||||
- name: Checkout discord.js
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: discordjs/discord.js
|
||||
path: djs
|
||||
|
||||
- name: Set up swap space
|
||||
if: runner.os == 'Linux'
|
||||
uses: pierotofy/set-swap-space@v1.0
|
||||
with:
|
||||
swap-size-gb: 10
|
||||
|
||||
- uses: pnpm/action-setup@v5.0.0
|
||||
name: Install pnpm
|
||||
with:
|
||||
run_install: false
|
||||
package_json_file: djs/package.json
|
||||
|
||||
- name: Expose pnpm config(s) through "$GITHUB_OUTPUT"
|
||||
id: pnpm-config
|
||||
shell: bash
|
||||
run: |
|
||||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache rotation keys
|
||||
id: cache-rotation
|
||||
shell: bash
|
||||
run: |
|
||||
echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache@v5
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
|
||||
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-
|
||||
|
||||
- name: Install djs dependencies
|
||||
working-directory: djs
|
||||
shell: bash
|
||||
run: |
|
||||
pnpm install --filter="*api-*" --filter="scripts" --filter="actions" --frozen-lockfile --prefer-offline --loglevel error
|
||||
env:
|
||||
HUSKY: '0'
|
||||
|
||||
- name: Build djs
|
||||
working-directory: djs
|
||||
shell: bash
|
||||
run: |
|
||||
pnpm --filter="*api-*" --filter="scripts" --filter="actions" run build
|
||||
|
||||
#endregion
|
||||
|
||||
- name: Extract package and semver from tag
|
||||
if: ${{ env.REF_TYPE == 'tag' }}
|
||||
id: extract-tag
|
||||
uses: ./djs/packages/actions/src/formatTag
|
||||
with:
|
||||
tag: ${{ inputs.ref || github.ref_name }}
|
||||
|
||||
- name: Apply tag to api-extractor config
|
||||
if: ${{ env.REF_TYPE == 'tag' && !inputs.ref }}
|
||||
run: sed -i 's!https://github.com/discordjs/discord-api-types/tree/main!https://github.com/discordjs/discord-api-types/tree/${{ github.ref_name }}!' "api-extractor.json"
|
||||
|
||||
- name: Build docs
|
||||
shell: bash
|
||||
run: |
|
||||
yarn prepack
|
||||
./djs/packages/api-extractor/bin/api-extractor run --local --minify
|
||||
./djs/packages/scripts/bin/generateSplitDocumentation.js
|
||||
yarn postpack
|
||||
|
||||
- name: Upload documentation to database
|
||||
if: ${{ env.REF_TYPE == 'tag' && (!inputs.ref || inputs.ref == 'main') }}
|
||||
env:
|
||||
CF_D1_DOCS_API_KEY: ${{ secrets.CF_D1_DOCS_API_KEY }}
|
||||
CF_D1_DOCS_ID: ${{ secrets.CF_D1_DOCS_ID }}
|
||||
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
|
||||
CF_R2_DOCS_URL: ${{ secrets.CF_R2_DOCS_URL }}
|
||||
CF_R2_DOCS_ACCESS_KEY_ID: ${{ secrets.CF_R2_DOCS_ACCESS_KEY_ID }}
|
||||
CF_R2_DOCS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_DOCS_SECRET_ACCESS_KEY }}
|
||||
CF_R2_DOCS_BUCKET: ${{ secrets.CF_R2_DOCS_BUCKET }}
|
||||
CF_R2_DOCS_BUCKET_URL: ${{ secrets.CF_R2_DOCS_BUCKET_URL }}
|
||||
ACTION_PACKAGE: ${{ env.ACTION_PACKAGE }}
|
||||
ACTION_VERSION: ${{ steps.extract-tag.outputs.semver }}
|
||||
run: |
|
||||
yarn tsx ./scripts/actions/documentation/uploadDocumentation.ts
|
||||
|
||||
- name: Upload documentation to database
|
||||
if: ${{ env.REF_TYPE == 'tag' && inputs.ref && inputs.ref != 'main' }}
|
||||
env:
|
||||
CF_D1_DOCS_API_KEY: ${{ secrets.CF_D1_DOCS_API_KEY }}
|
||||
CF_D1_DOCS_ID: ${{ secrets.CF_D1_DOCS_ID }}
|
||||
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
|
||||
CF_R2_DOCS_URL: ${{ secrets.CF_R2_DOCS_URL }}
|
||||
CF_R2_DOCS_ACCESS_KEY_ID: ${{ secrets.CF_R2_DOCS_ACCESS_KEY_ID }}
|
||||
CF_R2_DOCS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_DOCS_SECRET_ACCESS_KEY }}
|
||||
CF_R2_DOCS_BUCKET: ${{ secrets.CF_R2_DOCS_BUCKET }}
|
||||
CF_R2_DOCS_BUCKET_URL: ${{ secrets.CF_R2_DOCS_BUCKET_URL }}
|
||||
ACTION_PACKAGE: ${{ env.ACTION_PACKAGE }}
|
||||
ACTION_VERSION: ${{ steps.extract-tag.outputs.semver }}
|
||||
run: |
|
||||
yarn tsx ./scripts/actions/documentation/uploadDocumentation.ts
|
||||
|
||||
- name: Upload split documentation to blob storage
|
||||
if: ${{ env.REF_TYPE == 'tag' && (!inputs.ref || inputs.ref == 'main') }}
|
||||
env:
|
||||
CF_R2_DOCS_URL: ${{ secrets.CF_R2_DOCS_URL }}
|
||||
CF_R2_DOCS_ACCESS_KEY_ID: ${{ secrets.CF_R2_DOCS_ACCESS_KEY_ID }}
|
||||
CF_R2_DOCS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_DOCS_SECRET_ACCESS_KEY }}
|
||||
CF_R2_DOCS_BUCKET: ${{ secrets.CF_R2_DOCS_BUCKET }}
|
||||
ACTION_PACKAGE: ${{ env.ACTION_PACKAGE }}
|
||||
ACTION_VERSION: ${{ steps.extract-tag.outputs.semver }}
|
||||
run: |
|
||||
yarn tsx ./scripts/actions/documentation/uploadSplitDocumentation.ts
|
||||
|
||||
- name: Upload split documentation to blob storage
|
||||
if: ${{ env.REF_TYPE == 'tag' && inputs.ref && inputs.ref != 'main' }}
|
||||
env:
|
||||
CF_R2_DOCS_URL: ${{ secrets.CF_R2_DOCS_URL }}
|
||||
CF_R2_DOCS_ACCESS_KEY_ID: ${{ secrets.CF_R2_DOCS_ACCESS_KEY_ID }}
|
||||
CF_R2_DOCS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_DOCS_SECRET_ACCESS_KEY }}
|
||||
CF_R2_DOCS_BUCKET: ${{ secrets.CF_R2_DOCS_BUCKET }}
|
||||
ACTION_PACKAGE: ${{ env.ACTION_PACKAGE }}
|
||||
ACTION_VERSION: ${{ steps.extract-tag.outputs.semver }}
|
||||
run: |
|
||||
yarn tsx ./scripts/actions/documentation/uploadSplitDocumentation.ts
|
||||
|
||||
- name: Upload documentation to database
|
||||
if: ${{ env.REF_TYPE == 'branch' && (!inputs.ref || inputs.ref == 'main') }}
|
||||
env:
|
||||
CF_D1_DOCS_API_KEY: ${{ secrets.CF_D1_DOCS_API_KEY }}
|
||||
CF_D1_DOCS_ID: ${{ secrets.CF_D1_DOCS_ID }}
|
||||
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
|
||||
CF_R2_DOCS_URL: ${{ secrets.CF_R2_DOCS_URL }}
|
||||
CF_R2_DOCS_ACCESS_KEY_ID: ${{ secrets.CF_R2_DOCS_ACCESS_KEY_ID }}
|
||||
CF_R2_DOCS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_DOCS_SECRET_ACCESS_KEY }}
|
||||
CF_R2_DOCS_BUCKET: ${{ secrets.CF_R2_DOCS_BUCKET }}
|
||||
CF_R2_DOCS_BUCKET_URL: ${{ secrets.CF_R2_DOCS_BUCKET_URL }}
|
||||
ACTION_PACKAGE: ${{ env.ACTION_PACKAGE }}
|
||||
ACTION_VERSION: ${{ steps.extract-tag.outputs.semver }}
|
||||
run: |
|
||||
yarn tsx ./scripts/actions/documentation/uploadDocumentation.ts
|
||||
|
||||
- name: Upload documentation to database
|
||||
if: ${{ env.REF_TYPE == 'branch' && inputs.ref && inputs.ref != 'main' }}
|
||||
env:
|
||||
CF_D1_DOCS_API_KEY: ${{ secrets.CF_D1_DOCS_API_KEY }}
|
||||
CF_D1_DOCS_ID: ${{ secrets.CF_D1_DOCS_ID }}
|
||||
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
|
||||
CF_R2_DOCS_URL: ${{ secrets.CF_R2_DOCS_URL }}
|
||||
CF_R2_DOCS_ACCESS_KEY_ID: ${{ secrets.CF_R2_DOCS_ACCESS_KEY_ID }}
|
||||
CF_R2_DOCS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_DOCS_SECRET_ACCESS_KEY }}
|
||||
CF_R2_DOCS_BUCKET: ${{ secrets.CF_R2_DOCS_BUCKET }}
|
||||
CF_R2_DOCS_BUCKET_URL: ${{ secrets.CF_R2_DOCS_BUCKET_URL }}
|
||||
ACTION_PACKAGE: ${{ env.ACTION_PACKAGE }}
|
||||
ACTION_VERSION: ${{ steps.extract-tag.outputs.semver }}
|
||||
run: |
|
||||
yarn tsx ./scripts/actions/documentation/uploadDocumentation.ts
|
||||
|
||||
- name: Upload split documentation to blob storage
|
||||
if: ${{ env.REF_TYPE == 'branch' && (!inputs.ref || inputs.ref == 'main') }}
|
||||
env:
|
||||
CF_R2_DOCS_URL: ${{ secrets.CF_R2_DOCS_URL }}
|
||||
CF_R2_DOCS_ACCESS_KEY_ID: ${{ secrets.CF_R2_DOCS_ACCESS_KEY_ID }}
|
||||
CF_R2_DOCS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_DOCS_SECRET_ACCESS_KEY }}
|
||||
CF_R2_DOCS_BUCKET: ${{ secrets.CF_R2_DOCS_BUCKET }}
|
||||
ACTION_PACKAGE: ${{ env.ACTION_PACKAGE }}
|
||||
ACTION_VERSION: ${{ steps.extract-tag.outputs.semver }}
|
||||
run: |
|
||||
yarn tsx ./scripts/actions/documentation/uploadSplitDocumentation.ts
|
||||
|
||||
- name: Upload split documentation to blob storage
|
||||
if: ${{ env.REF_TYPE == 'branch' && inputs.ref && inputs.ref != 'main' }}
|
||||
env:
|
||||
CF_R2_DOCS_URL: ${{ secrets.CF_R2_DOCS_URL }}
|
||||
CF_R2_DOCS_ACCESS_KEY_ID: ${{ secrets.CF_R2_DOCS_ACCESS_KEY_ID }}
|
||||
CF_R2_DOCS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_DOCS_SECRET_ACCESS_KEY }}
|
||||
CF_R2_DOCS_BUCKET: ${{ secrets.CF_R2_DOCS_BUCKET }}
|
||||
ACTION_PACKAGE: ${{ env.ACTION_PACKAGE }}
|
||||
ACTION_VERSION: ${{ steps.extract-tag.outputs.semver }}
|
||||
run: |
|
||||
yarn tsx ./scripts/actions/documentation/uploadSplitDocumentation.ts
|
||||
4
.github/workflows/labelsync.yml
vendored
4
.github/workflows/labelsync.yml
vendored
@@ -14,9 +14,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Label sync
|
||||
uses: crazy-max/ghaction-github-labeler@v5
|
||||
uses: crazy-max/ghaction-github-labeler@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
2
.github/workflows/pr-automation.yml
vendored
2
.github/workflows/pr-automation.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Automatically label PR
|
||||
uses: actions/labeler@v5
|
||||
uses: actions/labeler@v6
|
||||
with:
|
||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
sync-labels: true
|
||||
|
||||
53
.github/workflows/publish-next.yml
vendored
53
.github/workflows/publish-next.yml
vendored
@@ -1,53 +0,0 @@
|
||||
name: Publish next
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
concurrency:
|
||||
group: publish-next
|
||||
cancel-in-progress: true
|
||||
|
||||
name: Publish @next release to npm
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write
|
||||
if: github.repository_owner == 'discordjs' && !(github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(release)'))
|
||||
steps:
|
||||
# - name: Cancel previous publish attempts
|
||||
# uses: styfle/cancel-workflow-action@0.12.1
|
||||
# with:
|
||||
# access_token: ${{ github.token }}
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Node v20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
registry-url: https://registry.npmjs.org/
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Bump version
|
||||
run: node ./scripts/bump-version.mjs
|
||||
|
||||
- name: Deprecate old @next versions
|
||||
run: npx npm-deprecate --name "*next*" --package discord-api-types --message "No longer supported. Install the latest @next release" || true
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||
|
||||
- name: Publish new @next version
|
||||
run: |
|
||||
npm version $(jq --raw-output '.version' package.json)-next.$(git rev-parse --short HEAD).$(date +%s)
|
||||
npm publish --tag next
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||
155
.github/workflows/release-flows.yml
vendored
Normal file
155
.github/workflows/release-flows.yml
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
name: Release flows
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
# Run every Monday and Thursday at 12:00
|
||||
- cron: '0 12 * * 1,4'
|
||||
|
||||
jobs:
|
||||
publish_next:
|
||||
concurrency:
|
||||
group: publish_next
|
||||
cancel-in-progress: true
|
||||
|
||||
name: Publish @next release to npm
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
|
||||
if: github.repository_owner == 'discordjs' && github.event_name == 'push' && !startsWith(github.event.head_commit.message, 'chore(release)')
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
cache: 'yarn'
|
||||
node-version-file: package.json
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Bump version
|
||||
run: node ./scripts/bump-version.mjs
|
||||
|
||||
# TODO: we need a scoped token for this -.-, can't OIDC tmk
|
||||
# - name: Deprecate old @next versions
|
||||
# run: yarn npm-deprecate --name "*next*" --package discord-api-types --message "No longer supported. Install the latest @next release" || true
|
||||
# env:
|
||||
# NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||
|
||||
- name: Publish new @next version
|
||||
run: |
|
||||
yarn version $(jq --raw-output '.version' package.json)-next.$(git rev-parse --short HEAD).$(date +%s)
|
||||
yarn npm publish --tag next
|
||||
|
||||
create_pr:
|
||||
name: Create PR for new version
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'discordjs' && github.event_name != 'push'
|
||||
|
||||
steps:
|
||||
- uses: actions/create-github-app-token@v3
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.DISCORDJS_APP_ID }}
|
||||
private-key: ${{ secrets.DISCORDJS_APP_KEY_RELEASE }}
|
||||
permission-contents: write
|
||||
permission-pull-requests: write
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
cache: 'yarn'
|
||||
node-version-file: package.json
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Install website dependencies
|
||||
run: pushd website && npm ci --ignore-scripts && popd
|
||||
|
||||
- name: Set Git User and Email
|
||||
run: |
|
||||
git config user.name "discord-js[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Bump version
|
||||
run: node ./scripts/bump-version.mjs
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
- name: Create branch for changes, add all changes and push
|
||||
run: |
|
||||
git checkout -b "chore/release/$(jq --raw-output '.version' package.json)"
|
||||
|
||||
# Run changelog generation, deno script, website version bump
|
||||
yarn ci:pr
|
||||
|
||||
# Add all changes, commit and push
|
||||
git add --all .
|
||||
git commit -m "chore(release): $(jq --raw-output '.version' package.json) 🎉" -m "Build ran for ${GITHUB_SHA}"
|
||||
git push -u origin "chore/release/$(jq --raw-output '.version' package.json)"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create Pull Request
|
||||
run: node ./scripts/actions/create-pr.mjs
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
create_release:
|
||||
name: Create release and publish
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
|
||||
if: github.repository_owner == 'discordjs' && github.event_name == 'push' && startsWith(github.event.head_commit.message, 'chore(release)') && !contains(github.event.head_commit.message, '[skip ci]')
|
||||
|
||||
steps:
|
||||
- uses: actions/create-github-app-token@v3
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.DISCORDJS_APP_ID }}
|
||||
private-key: ${{ secrets.DISCORDJS_APP_KEY_RELEASE }}
|
||||
permission-contents: write
|
||||
permission-pull-requests: write
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
cache: 'yarn'
|
||||
node-version-file: package.json
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Publish release to npm
|
||||
run: |
|
||||
yarn npm publish
|
||||
|
||||
- name: Create GitHub release
|
||||
run: node ./scripts/actions/create-release.mjs
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
41
.github/workflows/validate-pull-request.yml
vendored
Normal file
41
.github/workflows/validate-pull-request.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Validate Pull Request
|
||||
on:
|
||||
pull_request:
|
||||
jobs:
|
||||
deno:
|
||||
name: Ensure Deno types are synchronized
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
cache: 'yarn'
|
||||
node-version-file: package.json
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Run Check Script
|
||||
run: node ./scripts/actions/report-deno-not-ran.mjs
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
validate-supported-versions:
|
||||
runs-on: ubuntu-latest
|
||||
name: Disallow unsupported API versions
|
||||
steps:
|
||||
- name: Check for unsupported API changes
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
PATTERNS="gateway/v6.ts|gateway/v8.ts|payloads/v6/|payloads/v8/|rest/v6/|rest/v8/|rpc/v8.ts|utils/v8.ts|voice/v4.ts|^v6.ts$|^v8.ts$"
|
||||
|
||||
if gh pr view ${{ github.event.pull_request.number }} --repo ${{github.repository}} --json files --jq ".files[].path | select(test(\"$PATTERNS\"))" | grep -q .; then
|
||||
echo "::error::Unsupported API versions modified. Please make changes to current API versions only."
|
||||
exit 1
|
||||
fi
|
||||
10
.gitignore
vendored
10
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
node_modules/
|
||||
.yarn/install-state.gz
|
||||
|
||||
# Custom ESLint rules
|
||||
.eslint-plugin-local/*
|
||||
@@ -56,5 +57,14 @@ voice/**/*.map
|
||||
voice/**/*.d.ts
|
||||
voice/**/*.mjs
|
||||
|
||||
# Don't commit generated docs
|
||||
tsdoc-metadata.json
|
||||
docs/*
|
||||
|
||||
# macOS files
|
||||
.DS_Store
|
||||
|
||||
# djs repo clone
|
||||
djs
|
||||
|
||||
_generated_
|
||||
|
||||
@@ -1 +1 @@
|
||||
npx --no-install commitlint --edit $1
|
||||
yarn commitlint --edit $1
|
||||
|
||||
@@ -1 +1 @@
|
||||
npx --no-install pretty-quick --staged && npx --no-install lint-staged && npm run build:deno && git add deno
|
||||
yarn pretty-quick --staged && yarn lint-staged && yarn clean:node && yarn build:deno && git add deno
|
||||
|
||||
@@ -13,12 +13,12 @@ website/build
|
||||
|
||||
# Don't format build outputs
|
||||
*.js
|
||||
!eslint.config.js
|
||||
*.d.ts
|
||||
*.mjs
|
||||
|
||||
# Miscellaneous
|
||||
CODEOWNERS
|
||||
renovate.json
|
||||
CHANGELOG.md
|
||||
|
||||
# Format all of scripts
|
||||
@@ -36,3 +36,7 @@ payloads/v8/*
|
||||
rest/v8/*
|
||||
utils/v8.ts
|
||||
v8.ts
|
||||
|
||||
.yarn/*
|
||||
djs/*
|
||||
_generated_
|
||||
|
||||
67
.yarn/plugins/postinstallDev.cjs
vendored
Normal file
67
.yarn/plugins/postinstallDev.cjs
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* Altered from https://github.com/sachinraja/yarn-plugin-postinstall-dev/blob/main/sources/index.ts
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021-2022 Sachin Raja
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
const scriptName = 'postinstallDev';
|
||||
|
||||
module.exports = {
|
||||
name: 'postinstall-dev-script',
|
||||
factory: (require) => ({
|
||||
hooks: {
|
||||
/**
|
||||
* @param {import('@yarnpkg/core').Project} project
|
||||
* @param {Parameters<import('@yarnpkg/core').Hooks['afterAllInstalled']>[1]} options
|
||||
*/
|
||||
async afterAllInstalled(project, options) {
|
||||
/**
|
||||
* @type {import('@yarnpkg/core')}
|
||||
*/
|
||||
const { scriptUtils, InstallMode } = require('@yarnpkg/core');
|
||||
|
||||
if (options.mode === InstallMode.UpdateLockfile) {
|
||||
return;
|
||||
}
|
||||
|
||||
const locator = project.topLevelWorkspace.anchoredLocator;
|
||||
|
||||
if (await scriptUtils.hasPackageScript(locator, scriptName, { project })) {
|
||||
const exitCode = await scriptUtils.executePackageScript(locator, scriptName, [], {
|
||||
project,
|
||||
stdin: process.stdin,
|
||||
stdout: process.stdout,
|
||||
stderr: process.stderr,
|
||||
});
|
||||
|
||||
if (exitCode !== 0) {
|
||||
const error = new Error(`${scriptName} script failed with exit code ${exitCode}`);
|
||||
error.stack = undefined;
|
||||
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}),
|
||||
};
|
||||
940
.yarn/releases/yarn-4.14.1.cjs
vendored
Executable file
940
.yarn/releases/yarn-4.14.1.cjs
vendored
Executable file
File diff suppressed because one or more lines are too long
8
.yarnrc.yml
Normal file
8
.yarnrc.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
enableGlobalCache: true
|
||||
|
||||
nodeLinker: node-modules
|
||||
|
||||
yarnPath: .yarn/releases/yarn-4.14.1.cjs
|
||||
|
||||
plugins:
|
||||
- path: ./.yarn/plugins/postinstallDev.cjs
|
||||
465
CHANGELOG.md
465
CHANGELOG.md
@@ -1,3 +1,468 @@
|
||||
## [0.38.47](https://github.com/discordjs/discord-api-types/compare/0.38.46...0.38.47) (2026-04-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **RESTJSONErrorCodes:** add `CannotForwardMessageWithUnreadableContent` ([#1628](https://github.com/discordjs/discord-api-types/issues/1628)) ([09c71fe](https://github.com/discordjs/discord-api-types/commit/09c71fe9d19006d0b287be35456c25809e9afc1a))
|
||||
* **RESTJSONErrorCodes:** rename `ChannelSendRateLimit` to `ChannelWriteRateLimit` ([#1627](https://github.com/discordjs/discord-api-types/issues/1627)) ([d5dc47a](https://github.com/discordjs/discord-api-types/commit/d5dc47a36c544ff8a83adcfb29684d5ac5e15af4))
|
||||
|
||||
## [0.38.46](https://github.com/discordjs/discord-api-types/compare/0.38.45...0.38.46) (2026-04-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `APIUser` `global_name` description ([#1586](https://github.com/discordjs/discord-api-types/issues/1586)) ([d165766](https://github.com/discordjs/discord-api-types/commit/d165766302c8ae7c9cd78c5a2989787351ca45fa))
|
||||
* **Channel:** add applied_tags to forum thread form data body ([#1615](https://github.com/discordjs/discord-api-types/issues/1615)) ([19d04c0](https://github.com/discordjs/discord-api-types/commit/19d04c00c9f5ba585fc0d21dbf869b74f2ea2dda))
|
||||
* **Gateway:** correct scheduled event user remove dispatch type ([#1614](https://github.com/discordjs/discord-api-types/issues/1614)) ([b2a8b74](https://github.com/discordjs/discord-api-types/commit/b2a8b740e5c7904c77bd6ba3359b3b4d30b0e0f9))
|
||||
* **ReactionType:** rename Super to Burst ([#1613](https://github.com/discordjs/discord-api-types/issues/1613)) ([c21ae24](https://github.com/discordjs/discord-api-types/commit/c21ae24f7a3d8892a1126984223a5ddf996b3105))
|
||||
* **Webhook:** add delete message query, fix thread_id type ([#1611](https://github.com/discordjs/discord-api-types/issues/1611)) ([27ef064](https://github.com/discordjs/discord-api-types/commit/27ef064f922922b8da6d8baedcc0aed6261f6d59))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Message:** more attachment and embed fields and flags ([#1609](https://github.com/discordjs/discord-api-types/issues/1609)) ([702e541](https://github.com/discordjs/discord-api-types/commit/702e541bf0bbcf54c85a47e1ba56dc982cb49b17))
|
||||
* **UserFlags:** mark ActiveDeveloper as deprecated ([#1604](https://github.com/discordjs/discord-api-types/issues/1604)) ([5acf5c5](https://github.com/discordjs/discord-api-types/commit/5acf5c5989d09cabd73f3435155b9ca2cf07be81))
|
||||
|
||||
## [0.38.45](https://github.com/discordjs/discord-api-types/compare/0.38.44...0.38.45) (2026-04-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **OAuth2:** include flags in current application result ([#1610](https://github.com/discordjs/discord-api-types/issues/1610)) ([1506ff0](https://github.com/discordjs/discord-api-types/commit/1506ff0d2bf38cea590872fbc2a463096150baf6))
|
||||
* **User:** use Snowflake for DM recipient_id ([#1612](https://github.com/discordjs/discord-api-types/issues/1612)) ([3a296fa](https://github.com/discordjs/discord-api-types/commit/3a296fa929470b0dba74ee7cdd4343c03d171916))
|
||||
|
||||
## [0.38.44](https://github.com/discordjs/discord-api-types/compare/0.38.43...0.38.44) (2026-04-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **APIApplication:** make event_webhooks_status optional ([#1603](https://github.com/discordjs/discord-api-types/issues/1603)) ([c76a1bc](https://github.com/discordjs/discord-api-types/commit/c76a1bc37208789b9b626a9363e8a3992edc2899))
|
||||
|
||||
## [0.38.43](https://github.com/discordjs/discord-api-types/compare/0.38.41...0.38.43) (2026-03-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **Channel:** correct PATCH channel field nullability ([#1575](https://github.com/discordjs/discord-api-types/issues/1575)) ([a4aa724](https://github.com/discordjs/discord-api-types/commit/a4aa724eb84ca0dea335b52c312af7a0e50696f6))
|
||||
* **Gateway:** invite create timestamp type, zstd-stream ([#1569](https://github.com/discordjs/discord-api-types/issues/1569)) ([38b9467](https://github.com/discordjs/discord-api-types/commit/38b9467178783c71770a15905d5f6e716ed7cbbd))
|
||||
* **Guild:** correct optionality and nullability ([#1574](https://github.com/discordjs/discord-api-types/issues/1574)) ([cf6476d](https://github.com/discordjs/discord-api-types/commit/cf6476dc8aeecb3d36cac629cb1d921b2805c573))
|
||||
* **guildScheduledEvent:** entity_type required, channel_id nullable ([#1573](https://github.com/discordjs/discord-api-types/issues/1573)) ([bf12195](https://github.com/discordjs/discord-api-types/commit/bf121954013b21f9b8a2c35249791f96b275143a))
|
||||
* **poll:** mark expiry as nullable ([#1576](https://github.com/discordjs/discord-api-types/issues/1576)) ([dea22dc](https://github.com/discordjs/discord-api-types/commit/dea22dc487d8af22827a15815ff79acd8607465b))
|
||||
* role colors optionality, color deprecation, and stale annotations ([#1566](https://github.com/discordjs/discord-api-types/issues/1566)) ([0000e9a](https://github.com/discordjs/discord-api-types/commit/0000e9afe34f748d708c1d81441a08e1a06e0d50))
|
||||
* send soundboard result type ([#1568](https://github.com/discordjs/discord-api-types/issues/1568)) ([f1a3cb7](https://github.com/discordjs/discord-api-types/commit/f1a3cb7bb7fb6fba6824fcad42e0ce54a0d9be94))
|
||||
* split grouped gateway dispatch types ([#1563](https://github.com/discordjs/discord-api-types/issues/1563)) ([f76c2fa](https://github.com/discordjs/discord-api-types/commit/f76c2fa249b1b9ad02d4bfc26495f4cfa2349641))
|
||||
* **Voice, AuditLog:** voice state channel_id, audit log application_id ([#1580](https://github.com/discordjs/discord-api-types/issues/1580)) ([811314a](https://github.com/discordjs/discord-api-types/commit/811314a825bbe32360f98109bd4981d67fdb6726))
|
||||
* **webhook:** correct nullability for guild_id and channel_id ([#1567](https://github.com/discordjs/discord-api-types/issues/1567)) ([25778ae](https://github.com/discordjs/discord-api-types/commit/25778aeee9367c145fa841c977d4de6b247652c0))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Application:** add activity instance types and endpoint ([#1578](https://github.com/discordjs/discord-api-types/issues/1578)) ([b985362](https://github.com/discordjs/discord-api-types/commit/b9853622523d1be70e3f754d552f5b984fff8739))
|
||||
* **Application:** add webhook event fields to PATCH ([#1570](https://github.com/discordjs/discord-api-types/issues/1570)) ([e1ff008](https://github.com/discordjs/discord-api-types/commit/e1ff008cd697cf0dd0185ed2d8aba653c6be91e4))
|
||||
* **BaseThemeType:** add `Unset` base theme type ([#1577](https://github.com/discordjs/discord-api-types/issues/1577)) ([e65e02f](https://github.com/discordjs/discord-api-types/commit/e65e02f05f048cc57488deffb04e90313c92e4c2))
|
||||
* guild messages search ([#1583](https://github.com/discordjs/discord-api-types/issues/1583)) ([a99c8c0](https://github.com/discordjs/discord-api-types/commit/a99c8c0f53b119e58841979f319eb3e49cbe9b5f))
|
||||
* **Guild:** add collectibles to guild member ([#1572](https://github.com/discordjs/discord-api-types/issues/1572)) ([c8ef2fe](https://github.com/discordjs/discord-api-types/commit/c8ef2fefde5b8a37dee40863d2a2e24df8b50e28))
|
||||
* **Guild:** add flags to modify guild member ([#1571](https://github.com/discordjs/discord-api-types/issues/1571)) ([46b8cbd](https://github.com/discordjs/discord-api-types/commit/46b8cbd46f5c5331652624d74048775bd0e9ff8d))
|
||||
* mark new modal components as stable ([#1556](https://github.com/discordjs/discord-api-types/issues/1556)) ([818b899](https://github.com/discordjs/discord-api-types/commit/818b899f9dd8f93c93168550ba08976888927f77))
|
||||
* **message:** shared client themes ([#1565](https://github.com/discordjs/discord-api-types/issues/1565)) ([c3b331d](https://github.com/discordjs/discord-api-types/commit/c3b331d80a1c4b97b260584f4c9afb5f81871ba9))
|
||||
* **Rest:** add missing JSON error codes ([#1579](https://github.com/discordjs/discord-api-types/issues/1579)) ([ba01bac](https://github.com/discordjs/discord-api-types/commit/ba01bacfc073ec5b3476157a6d6f8f91836e0eb8))
|
||||
* **RESTJSONErrorCodes:** add error code `50278` ([#1587](https://github.com/discordjs/discord-api-types/issues/1587)) ([662cb0c](https://github.com/discordjs/discord-api-types/commit/662cb0cb0ac9c6f9ad93e180849476714bfceb0c))
|
||||
|
||||
## [0.38.42](https://github.com/discordjs/discord-api-types/compare/0.38.41...0.38.42) (2026-03-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* mark new modal components as stable ([#1556](https://github.com/discordjs/discord-api-types/issues/1556)) ([818b899](https://github.com/discordjs/discord-api-types/commit/818b899f9dd8f93c93168550ba08976888927f77))
|
||||
|
||||
## [0.38.41](https://github.com/discordjs/discord-api-types/compare/0.38.40...0.38.41) (2026-03-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* application command option allowed channel type ([#1548](https://github.com/discordjs/discord-api-types/issues/1548)) ([5ea94a6](https://github.com/discordjs/discord-api-types/commit/5ea94a6629812820174589f2ac8ebe3765548b31))
|
||||
* **voice:** add close code `4017` ([#1538](https://github.com/discordjs/discord-api-types/issues/1538)) ([1353b59](https://github.com/discordjs/discord-api-types/commit/1353b5915c1a0069a9b1c2a24fdc11256ec486e2))
|
||||
|
||||
|
||||
|
||||
## [0.38.40](https://github.com/discordjs/discord-api-types/compare/0.38.39...0.38.40) (2026-02-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* export missing properties and use interfaces on GatewayActivityAssets ([#1519](https://github.com/discordjs/discord-api-types/issues/1519)) ([8fd4024](https://github.com/discordjs/discord-api-types/commit/8fd402464a9db8f5341a3146cdd166d557a48510))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* mark guild member role counts endpoint as stable ([#1462](https://github.com/discordjs/discord-api-types/issues/1462)) ([2a9dfd4](https://github.com/discordjs/discord-api-types/commit/2a9dfd41db635f918a3ca905206ddde8a0d3f83f))
|
||||
|
||||
|
||||
|
||||
## [0.38.39](https://github.com/discordjs/discord-api-types/compare/0.38.38...0.38.39) (2026-02-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **APIModalSubmitRadioGroupComponent:** nullable value ([#1518](https://github.com/discordjs/discord-api-types/issues/1518)) ([6f6b780](https://github.com/discordjs/discord-api-types/commit/6f6b780851124cc0aa8f06cc28abce992619ee2b))
|
||||
|
||||
|
||||
|
||||
## [0.38.38](https://github.com/discordjs/discord-api-types/compare/0.38.37...0.38.38) (2026-01-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* radio groups and checkbox in modal ([#1495](https://github.com/discordjs/discord-api-types/issues/1495)) ([18fa946](https://github.com/discordjs/discord-api-types/commit/18fa946bdfb8e0b1537e7538ca046f1647166d1e))
|
||||
|
||||
|
||||
|
||||
## [0.38.37](https://github.com/discordjs/discord-api-types/compare/0.38.36...0.38.37) (2025-12-11)
|
||||
|
||||
|
||||
|
||||
## [0.38.36](https://github.com/discordjs/discord-api-types/compare/0.38.35...0.38.36) (2025-12-01)
|
||||
|
||||
|
||||
|
||||
## [0.38.35](https://github.com/discordjs/discord-api-types/compare/0.38.34...0.38.35) (2025-11-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Add missing s/S support to `StyledTimestamp` ([#1439](https://github.com/discordjs/discord-api-types/issues/1439)) ([a8c28ab](https://github.com/discordjs/discord-api-types/commit/a8c28ab7289726c3f29f53c5c2468e8da400f02f))
|
||||
|
||||
|
||||
|
||||
## [0.38.34](https://github.com/discordjs/discord-api-types/compare/0.38.33...0.38.34) (2025-11-17)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add `isModalSubmitInteraction()` type guard ([#1428](https://github.com/discordjs/discord-api-types/issues/1428)) ([f883770](https://github.com/discordjs/discord-api-types/commit/f883770df6ae7ce8b1b036c7619b4ab8c4f92354))
|
||||
|
||||
|
||||
|
||||
## [0.38.33](https://github.com/discordjs/discord-api-types/compare/0.38.32...0.38.33) (2025-11-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **PermissionFlagsBits:** add `BypassSlowmode` ([#1427](https://github.com/discordjs/discord-api-types/issues/1427)) ([2736687](https://github.com/discordjs/discord-api-types/commit/27366872836c9f1f069fafea7114dedb62467d27))
|
||||
|
||||
|
||||
|
||||
## [0.38.32](https://github.com/discordjs/discord-api-types/compare/0.38.31...0.38.32) (2025-11-03)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **globals:** Support new s/S timestamp styles ([#1418](https://github.com/discordjs/discord-api-types/issues/1418)) ([bf4291b](https://github.com/discordjs/discord-api-types/commit/bf4291bed83272036e0cd743ba2824fc6de837e4))
|
||||
|
||||
|
||||
|
||||
## [0.38.31](https://github.com/discordjs/discord-api-types/compare/0.38.30...0.38.31) (2025-10-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **APIModalInteractionResponseCallbackComponent:** remove `APIFileUploadComponent` ([#1406](https://github.com/discordjs/discord-api-types/issues/1406)) ([e37f802](https://github.com/discordjs/discord-api-types/commit/e37f802e392fdce948c2a15ae26088f8ae625793))
|
||||
* missing name and size property on APIFileComponent ([#1404](https://github.com/discordjs/discord-api-types/issues/1404)) ([7d6a934](https://github.com/discordjs/discord-api-types/commit/7d6a934f66c2a2d063bae16eb6fb323022ece192))
|
||||
* tsdoc unstable tag is block not modifier ([#1405](https://github.com/discordjs/discord-api-types/issues/1405)) ([6e5563e](https://github.com/discordjs/discord-api-types/commit/6e5563e2b727684b44e2851b09fdf5590e08a1f8))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APIAuditLogChange:** add some missing channel change types ([#1409](https://github.com/discordjs/discord-api-types/issues/1409)) ([ea2b922](https://github.com/discordjs/discord-api-types/commit/ea2b922d12618c54139fb37986697a1a2bd33393))
|
||||
* **GuildFeature:** add `PinPermissionMigrationComplete` ([#1407](https://github.com/discordjs/discord-api-types/issues/1407)) ([c5c0312](https://github.com/discordjs/discord-api-types/commit/c5c0312867e70aefb803f9988c46e6214a028be6))
|
||||
* publishing with OIDC ([62e5b4a](https://github.com/discordjs/discord-api-types/commit/62e5b4a95cc7d5b71384d81f96d0e583d117cee5))
|
||||
* **Webhooks:** add entitlement update and delete events ([#1408](https://github.com/discordjs/discord-api-types/issues/1408)) ([be8b372](https://github.com/discordjs/discord-api-types/commit/be8b3726630bd0b0f76615cb5d7e759a95de71e4))
|
||||
|
||||
|
||||
|
||||
## [0.38.30](https://github.com/discordjs/discord-api-types/compare/0.38.29...0.38.30) (2025-10-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add support for file upload components ([#1372](https://github.com/discordjs/discord-api-types/issues/1372)) ([51b2d4e](https://github.com/discordjs/discord-api-types/commit/51b2d4e1c91a2d10244baccf1fdeee767df2289f))
|
||||
|
||||
|
||||
|
||||
## [0.38.29](https://github.com/discordjs/discord-api-types/compare/0.38.28...0.38.29) (2025-10-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* edit self result ([#1393](https://github.com/discordjs/discord-api-types/issues/1393)) ([9665e02](https://github.com/discordjs/discord-api-types/commit/9665e0236734cf224e88da4a6ede4dc535ce53a5))
|
||||
|
||||
|
||||
|
||||
## [0.38.28](https://github.com/discordjs/discord-api-types/compare/0.38.27...0.38.28) (2025-10-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* move `applied_tags` back to thread channels ([#1391](https://github.com/discordjs/discord-api-types/issues/1391)) ([00c4694](https://github.com/discordjs/discord-api-types/commit/00c46946a02ace495031c6d257b0820c4a0652cc))
|
||||
|
||||
|
||||
|
||||
## [0.38.27](https://github.com/discordjs/discord-api-types/compare/0.38.26...0.38.27) (2025-10-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `[@unstable](https://github.com/unstable)` screening ([#1389](https://github.com/discordjs/discord-api-types/issues/1389)) ([95b186d](https://github.com/discordjs/discord-api-types/commit/95b186deb7410ff5a667a1cbac5e7b6dd915f6fe))
|
||||
* add `RESTPutAPIGuildIncidentActionsResult` ([#1388](https://github.com/discordjs/discord-api-types/issues/1388)) ([0c6d424](https://github.com/discordjs/discord-api-types/commit/0c6d4249b6e39b52607235b273bf0c46caa331dc))
|
||||
* Narrow thread-related properties for channels ([#1377](https://github.com/discordjs/discord-api-types/issues/1377)) ([18cf4a5](https://github.com/discordjs/discord-api-types/commit/18cf4a514e644d039f18f55d4062318dbeb1c3f6))
|
||||
* **RESTPutAPIGuildIncidentActionsJSONBody:** add `null` ([#1387](https://github.com/discordjs/discord-api-types/issues/1387)) ([6295858](https://github.com/discordjs/discord-api-types/commit/6295858de5d7bde4b2b289ef301d994ed78bf964))
|
||||
|
||||
|
||||
|
||||
## [0.38.26](https://github.com/discordjs/discord-api-types/compare/0.38.25...0.38.26) (2025-09-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add guild_id back to GatewayVoiceStateUpdateDispatchData ([#1346](https://github.com/discordjs/discord-api-types/issues/1346)) ([e52ac85](https://github.com/discordjs/discord-api-types/commit/e52ac85e9d60b4032bb21cd958cf032cad50643f))
|
||||
|
||||
|
||||
|
||||
## [0.38.25](https://github.com/discordjs/discord-api-types/compare/0.38.24...0.38.25) (2025-09-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add RateLimited gateway event ([#1334](https://github.com/discordjs/discord-api-types/issues/1334)) ([14963d6](https://github.com/discordjs/discord-api-types/commit/14963d61d488af2be8d3655651fd0677ad4c46ed))
|
||||
|
||||
|
||||
|
||||
## [0.38.24](https://github.com/discordjs/discord-api-types/compare/0.38.23...0.38.24) (2025-09-10)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **RESTPatchAPICurrentGuildMemberJSONBody:** Add `banner`, `avatar`, and `bio` ([#1356](https://github.com/discordjs/discord-api-types/issues/1356)) ([35a4084](https://github.com/discordjs/discord-api-types/commit/35a40846473eebfe5245656ee5437347ff2fa88f))
|
||||
* **RESTPostAPIChannelThreadsResult:** narrow response ([#1364](https://github.com/discordjs/discord-api-types/issues/1364)) ([8eb66a1](https://github.com/discordjs/discord-api-types/commit/8eb66a1512e5b8c57ba7e4a85a18380664ac6219))
|
||||
* Update invite types ([#1365](https://github.com/discordjs/discord-api-types/issues/1365)) ([35867c1](https://github.com/discordjs/discord-api-types/commit/35867c19e6942e82ac6b2bcd93f61853b0b41666))
|
||||
|
||||
|
||||
|
||||
## [0.38.23](https://github.com/discordjs/discord-api-types/compare/0.38.22...0.38.23) (2025-09-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add missing text display in modal submission ([#1362](https://github.com/discordjs/discord-api-types/issues/1362)) ([464a9c8](https://github.com/discordjs/discord-api-types/commit/464a9c8cbf613428c3da6b3a9ebd0da4bd827c2b))
|
||||
* **RESTPatchAPIWebhookWithTokenMessageJSONBody:** add `flags` ([#1354](https://github.com/discordjs/discord-api-types/issues/1354)) ([af3907b](https://github.com/discordjs/discord-api-types/commit/af3907b10690c224dcd3106127fd67491262cc6c))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add 400001 ([#1352](https://github.com/discordjs/discord-api-types/issues/1352)) ([ae09e2b](https://github.com/discordjs/discord-api-types/commit/ae09e2b9e47460b07907fc3b6e317bc1ae426663))
|
||||
* More label components and text display in modals ([#1351](https://github.com/discordjs/discord-api-types/issues/1351)) ([fa05a75](https://github.com/discordjs/discord-api-types/commit/fa05a7503f59017efc16ba2ca6cfb3fc99d331a3))
|
||||
|
||||
|
||||
|
||||
## [0.38.22](https://github.com/discordjs/discord-api-types/compare/0.38.21...0.38.22) (2025-08-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Support select in modals ([#1321](https://github.com/discordjs/discord-api-types/issues/1321)) ([3659c59](https://github.com/discordjs/discord-api-types/commit/3659c59ce7b3ee8c0281bf28499e733e1bc0752b))
|
||||
|
||||
|
||||
|
||||
## [0.38.21](https://github.com/discordjs/discord-api-types/compare/0.38.20...0.38.21) (2025-08-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* guest invites ([#1290](https://github.com/discordjs/discord-api-types/issues/1290)) ([1a37ae3](https://github.com/discordjs/discord-api-types/commit/1a37ae3eea156108e1add538b1d42c5fc2ce08ee))
|
||||
* **PermissionFlagsBits:** add `PinMessages` ([#1340](https://github.com/discordjs/discord-api-types/issues/1340)) ([b05df17](https://github.com/discordjs/discord-api-types/commit/b05df17466ade5bf58578b8a230d9cb5ec9e1024))
|
||||
|
||||
|
||||
|
||||
## [0.38.20](https://github.com/discordjs/discord-api-types/compare/0.38.19...0.38.20) (2025-08-14)
|
||||
|
||||
|
||||
|
||||
## [0.38.19](https://github.com/discordjs/discord-api-types/compare/0.38.18...0.38.19) (2025-08-12)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **GatewayActivity:** add url & status display type fields ([#1326](https://github.com/discordjs/discord-api-types/issues/1326)) ([5f9c1e1](https://github.com/discordjs/discord-api-types/commit/5f9c1e1b1c9f1a63d80718629fb2775b7bae62b3))
|
||||
|
||||
|
||||
|
||||
## [0.38.18](https://github.com/discordjs/discord-api-types/compare/0.38.17...0.38.18) (2025-07-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Deprecate API related to guild ownership ([#1316](https://github.com/discordjs/discord-api-types/issues/1316)) ([4afd0c1](https://github.com/discordjs/discord-api-types/commit/4afd0c13fde05fa7117ecdeaf20534545cfdb005))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **GuildFeature:** add `GUILD_TAGS` ([#1315](https://github.com/discordjs/discord-api-types/issues/1315)) ([03f02a5](https://github.com/discordjs/discord-api-types/commit/03f02a5a9ee2e533b58b7790c4deb7ad571e5a92))
|
||||
|
||||
|
||||
|
||||
## [0.38.17](https://github.com/discordjs/discord-api-types/compare/0.38.16...0.38.17) (2025-07-24)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **auditLog:** add `AUTO_MODERATION_QUARANTINE_USER` ([#1310](https://github.com/discordjs/discord-api-types/issues/1310)) ([a72e454](https://github.com/discordjs/discord-api-types/commit/a72e4545a3409388a9c5ec0b5555ecc258de0ac2))
|
||||
* **GuildMemberFlags:** add `AutoModQuarantinedGuildTag` ([#1309](https://github.com/discordjs/discord-api-types/issues/1309)) ([a41e646](https://github.com/discordjs/discord-api-types/commit/a41e646d3d9b9f6bb15c2f6165043ef8042b26bf))
|
||||
|
||||
|
||||
|
||||
## [0.38.16](https://github.com/discordjs/discord-api-types/compare/0.38.15...0.38.16) (2025-07-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **APIApplicationCommandChannelOption:** exclude directory channels ([#1300](https://github.com/discordjs/discord-api-types/issues/1300)) ([574e5c1](https://github.com/discordjs/discord-api-types/commit/574e5c12bddd2c515fd2b96b5705b5ef9f9d2787))
|
||||
|
||||
|
||||
|
||||
## [0.38.15](https://github.com/discordjs/discord-api-types/compare/0.38.14...0.38.15) (2025-07-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **CDNRoutes:** correct `guildTagBadge` route ([#1291](https://github.com/discordjs/discord-api-types/issues/1291)) ([1fee633](https://github.com/discordjs/discord-api-types/commit/1fee6339bf05a98900d8703207c77b8e6d047f24))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* user guild tags ([#1287](https://github.com/discordjs/discord-api-types/issues/1287)) ([3245f7d](https://github.com/discordjs/discord-api-types/commit/3245f7de92c40d3b74014dbf97a2c0eafea8bcd2))
|
||||
|
||||
|
||||
|
||||
## [0.38.14](https://github.com/discordjs/discord-api-types/compare/0.38.13...0.38.14) (2025-06-30)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* role gradient colors ([#1281](https://github.com/discordjs/discord-api-types/issues/1281)) ([7fbb3e3](https://github.com/discordjs/discord-api-types/commit/7fbb3e3310bde5ea0e977afb83ea21bda0220633))
|
||||
* support new pinned messages routes ([#1254](https://github.com/discordjs/discord-api-types/issues/1254)) ([71c6d26](https://github.com/discordjs/discord-api-types/commit/71c6d2609f1713827e95c5f617011c053cd3eb6a))
|
||||
* **voice:** add close codes 4021 and 4022 ([#1283](https://github.com/discordjs/discord-api-types/issues/1283)) ([6b05db5](https://github.com/discordjs/discord-api-types/commit/6b05db5a2f9ea540e34e8429c07b96411d418b73))
|
||||
|
||||
|
||||
|
||||
## [0.38.13](https://github.com/discordjs/discord-api-types/compare/0.38.12...0.38.13) (2025-06-23)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APIUser:** add `collectibles` ([#1274](https://github.com/discordjs/discord-api-types/issues/1274)) ([77cb327](https://github.com/discordjs/discord-api-types/commit/77cb32746f47247a4229910db8ec64f844038529))
|
||||
|
||||
|
||||
|
||||
## [0.38.12](https://github.com/discordjs/discord-api-types/compare/0.38.11...0.38.12) (2025-06-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APIApplication:** add `approximate_user_authorization_count` ([#1272](https://github.com/discordjs/discord-api-types/issues/1272)) ([91d8516](https://github.com/discordjs/discord-api-types/commit/91d851628d2078e70b79e4aa7e464297eca745ce))
|
||||
* **APIUnfurledMediaItem:** add `attachment_id` ([#1273](https://github.com/discordjs/discord-api-types/issues/1273)) ([b2da18c](https://github.com/discordjs/discord-api-types/commit/b2da18c634c4e20112ce13a8e0a5e6db50063acc))
|
||||
|
||||
|
||||
|
||||
## [0.38.11](https://github.com/discordjs/discord-api-types/compare/0.38.10...0.38.11) (2025-06-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **voice:** add `max_dave_protocol_version` to identify ([#1260](https://github.com/discordjs/discord-api-types/issues/1260)) ([83d34ef](https://github.com/discordjs/discord-api-types/commit/83d34ef00c4e25d5050c7fc47562b3faa9125215))
|
||||
* **voice:** add clients connect and client disconnect recieve payload ([#1261](https://github.com/discordjs/discord-api-types/issues/1261)) ([121fb47](https://github.com/discordjs/discord-api-types/commit/121fb47f4c0c51d6149bcf051ffc5bae04b1bba8))
|
||||
* **voice:** fix remaining payload typos ([#1262](https://github.com/discordjs/discord-api-types/issues/1262)) ([d71276c](https://github.com/discordjs/discord-api-types/commit/d71276cb5f3423a81780494d041694356b8cb49c))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* voice v8 payloads & MLS voice opcodes ([#1257](https://github.com/discordjs/discord-api-types/issues/1257)) ([ebf313c](https://github.com/discordjs/discord-api-types/commit/ebf313c49c1d78cb1aaf238cfbae7c114f6215cf))
|
||||
|
||||
|
||||
|
||||
## [0.38.10](https://github.com/discordjs/discord-api-types/compare/0.38.9...0.38.10) (2025-06-02)
|
||||
|
||||
|
||||
|
||||
## [0.38.9](https://github.com/discordjs/discord-api-types/compare/0.38.8...0.38.9) (2025-05-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* discriminated thread channel types ([#1247](https://github.com/discordjs/discord-api-types/issues/1247)) ([72b8c83](https://github.com/discordjs/discord-api-types/commit/72b8c830ee6ed369085644e93b3e27849b0274ed))
|
||||
* optional `client_id` and `client_secret` in access token data ([#1248](https://github.com/discordjs/discord-api-types/issues/1248)) ([b360b2e](https://github.com/discordjs/discord-api-types/commit/b360b2e6a767fa34d48b2f02fd19511a2db98ecb))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* deauthorised webhook events ([#1253](https://github.com/discordjs/discord-api-types/issues/1253)) ([9daac44](https://github.com/discordjs/discord-api-types/commit/9daac44f1d056115755e92fcc22995a9c05012be))
|
||||
|
||||
|
||||
|
||||
## [0.38.8](https://github.com/discordjs/discord-api-types/compare/0.38.7...0.38.8) (2025-05-15)
|
||||
|
||||
|
||||
|
||||
## [0.38.7](https://github.com/discordjs/discord-api-types/compare/0.38.6...0.38.7) (2025-05-15)
|
||||
|
||||
|
||||
|
||||
## [0.38.6](https://github.com/discordjs/discord-api-types/compare/0.38.5...0.38.6) (2025-05-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* wrong exports reported by ae ([#1239](https://github.com/discordjs/discord-api-types/issues/1239)) ([a5d949e](https://github.com/discordjs/discord-api-types/commit/a5d949e650fbc325c6b619da00edfa66d28abc72))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* experimental new docs gen ([#1240](https://github.com/discordjs/discord-api-types/issues/1240)) ([3af2ae2](https://github.com/discordjs/discord-api-types/commit/3af2ae2b85550c83ec9bf1e124226d16e6a8ca7e))
|
||||
|
||||
|
||||
|
||||
## [0.38.5](https://github.com/discordjs/discord-api-types/compare/0.38.4...0.38.5) (2025-05-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* imports ([#1237](https://github.com/discordjs/discord-api-types/issues/1237)) ([c64362a](https://github.com/discordjs/discord-api-types/commit/c64362a711940a5fb5b0cb56c374ebc003fb3b0d))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* `APIWebhookSourceChannel` ([#1235](https://github.com/discordjs/discord-api-types/issues/1235)) ([ca20659](https://github.com/discordjs/discord-api-types/commit/ca206593efd1dd8f09a59c832baef0187a7cc963))
|
||||
* `APIWebhookSourceGuild` ([#1236](https://github.com/discordjs/discord-api-types/issues/1236)) ([21420c3](https://github.com/discordjs/discord-api-types/commit/21420c3028afd8cc0e73cd1081c6ecdd02c81571))
|
||||
* invite channel ([#1232](https://github.com/discordjs/discord-api-types/issues/1232)) ([0479caf](https://github.com/discordjs/discord-api-types/commit/0479cafa1bedd549d54b7cc6c915fc6beb2ba6ec))
|
||||
|
||||
|
||||
|
||||
## [0.38.4](https://github.com/discordjs/discord-api-types/compare/0.38.3...0.38.4) (2025-05-08)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Specific typings for application emojis ([#1228](https://github.com/discordjs/discord-api-types/issues/1228)) ([4b0a3af](https://github.com/discordjs/discord-api-types/commit/4b0a3af12badba5221604a3304efaeb3d0b46dd7))
|
||||
|
||||
|
||||
|
||||
## [0.38.3](https://github.com/discordjs/discord-api-types/compare/0.38.2...0.38.3) (2025-05-05)
|
||||
|
||||
|
||||
|
||||
## [0.38.2](https://github.com/discordjs/discord-api-types/compare/0.38.1...0.38.2) (2025-05-01)
|
||||
|
||||
|
||||
|
||||
# [0.38.1](https://github.com/discordjs/discord-api-types/compare/0.37.120...0.38.1) (2025-04-22)
|
||||
|
||||
|
||||
|
||||
@@ -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 `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
|
||||
|
||||
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
|
||||
|
||||
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
|
||||
|
||||
- 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.
|
||||
|
||||
- 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).
|
||||
|
||||
104
api-extractor.json
Normal file
104
api-extractor.json
Normal file
@@ -0,0 +1,104 @@
|
||||
{
|
||||
"$schema": "../discord.js/packages/api-extractor/src/schemas/api-extractor.schema.json",
|
||||
|
||||
"mainEntryPointFilePath": "<projectFolder>/v10.d.ts",
|
||||
"mainEntryPointName": "v10",
|
||||
|
||||
"additionalEntryPoints": [
|
||||
{ "modulePath": "v9", "filePath": "<projectFolder>/v9.d.ts" },
|
||||
{ "modulePath": "rpc/v10", "filePath": "<projectFolder>/rpc/v10.d.ts" },
|
||||
{ "modulePath": "voice/v4", "filePath": "<projectFolder>/voice/v4.d.ts" },
|
||||
{ "modulePath": "voice/v8", "filePath": "<projectFolder>/voice/v8.d.ts" }
|
||||
],
|
||||
|
||||
"bundledPackages": [],
|
||||
|
||||
"compiler": {
|
||||
"overrideTsconfig": {
|
||||
"compilerOptions": {
|
||||
"allowUnreachableCode": false,
|
||||
"allowUnusedLabels": false,
|
||||
"exactOptionalPropertyTypes": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noImplicitOverride": true,
|
||||
"noImplicitReturns": true,
|
||||
"noPropertyAccessFromIndexSignature": false,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"strict": true,
|
||||
|
||||
"allowArbitraryExtensions": false,
|
||||
"allowImportingTsExtensions": false,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "nodenext",
|
||||
"resolveJsonModule": true,
|
||||
"resolvePackageJsonExports": false,
|
||||
"resolvePackageJsonImports": false,
|
||||
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"importHelpers": false,
|
||||
"newLine": "lf",
|
||||
"noEmitHelpers": true,
|
||||
"outDir": "dist",
|
||||
"removeComments": false,
|
||||
"sourceMap": true,
|
||||
|
||||
"esModuleInterop": false,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"isolatedModules": true,
|
||||
|
||||
"experimentalDecorators": true,
|
||||
"lib": ["ESNext"],
|
||||
"target": "ES2022",
|
||||
"useDefineForClassFields": true
|
||||
},
|
||||
"exclude": ["djs/**/*", "website/**/*", "node_modules/**/*"]
|
||||
}
|
||||
},
|
||||
"apiReport": {
|
||||
"enabled": false
|
||||
},
|
||||
|
||||
"docModel": {
|
||||
"enabled": true,
|
||||
|
||||
"apiJsonFilePath": "<projectFolder>/docs/docs.api.json",
|
||||
"projectFolderUrl": "https://github.com/discordjs/discord-api-types/tree/main"
|
||||
},
|
||||
|
||||
"dtsRollup": {
|
||||
"enabled": false,
|
||||
|
||||
"untrimmedFilePath": "<projectFolder>/v10.d.ts"
|
||||
},
|
||||
|
||||
"tsdocMetadata": {},
|
||||
|
||||
"newlineKind": "lf",
|
||||
|
||||
"messages": {
|
||||
"compilerMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "warning"
|
||||
}
|
||||
},
|
||||
|
||||
"extractorMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "warning"
|
||||
},
|
||||
|
||||
"ae-missing-release-tag": {
|
||||
"logLevel": "none"
|
||||
}
|
||||
},
|
||||
|
||||
"tsdocMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
465
deno/CHANGELOG.md
generated
465
deno/CHANGELOG.md
generated
@@ -1,3 +1,468 @@
|
||||
## [0.38.47](https://github.com/discordjs/discord-api-types/compare/0.38.46...0.38.47) (2026-04-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **RESTJSONErrorCodes:** add `CannotForwardMessageWithUnreadableContent` ([#1628](https://github.com/discordjs/discord-api-types/issues/1628)) ([09c71fe](https://github.com/discordjs/discord-api-types/commit/09c71fe9d19006d0b287be35456c25809e9afc1a))
|
||||
* **RESTJSONErrorCodes:** rename `ChannelSendRateLimit` to `ChannelWriteRateLimit` ([#1627](https://github.com/discordjs/discord-api-types/issues/1627)) ([d5dc47a](https://github.com/discordjs/discord-api-types/commit/d5dc47a36c544ff8a83adcfb29684d5ac5e15af4))
|
||||
|
||||
## [0.38.46](https://github.com/discordjs/discord-api-types/compare/0.38.45...0.38.46) (2026-04-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `APIUser` `global_name` description ([#1586](https://github.com/discordjs/discord-api-types/issues/1586)) ([d165766](https://github.com/discordjs/discord-api-types/commit/d165766302c8ae7c9cd78c5a2989787351ca45fa))
|
||||
* **Channel:** add applied_tags to forum thread form data body ([#1615](https://github.com/discordjs/discord-api-types/issues/1615)) ([19d04c0](https://github.com/discordjs/discord-api-types/commit/19d04c00c9f5ba585fc0d21dbf869b74f2ea2dda))
|
||||
* **Gateway:** correct scheduled event user remove dispatch type ([#1614](https://github.com/discordjs/discord-api-types/issues/1614)) ([b2a8b74](https://github.com/discordjs/discord-api-types/commit/b2a8b740e5c7904c77bd6ba3359b3b4d30b0e0f9))
|
||||
* **ReactionType:** rename Super to Burst ([#1613](https://github.com/discordjs/discord-api-types/issues/1613)) ([c21ae24](https://github.com/discordjs/discord-api-types/commit/c21ae24f7a3d8892a1126984223a5ddf996b3105))
|
||||
* **Webhook:** add delete message query, fix thread_id type ([#1611](https://github.com/discordjs/discord-api-types/issues/1611)) ([27ef064](https://github.com/discordjs/discord-api-types/commit/27ef064f922922b8da6d8baedcc0aed6261f6d59))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Message:** more attachment and embed fields and flags ([#1609](https://github.com/discordjs/discord-api-types/issues/1609)) ([702e541](https://github.com/discordjs/discord-api-types/commit/702e541bf0bbcf54c85a47e1ba56dc982cb49b17))
|
||||
* **UserFlags:** mark ActiveDeveloper as deprecated ([#1604](https://github.com/discordjs/discord-api-types/issues/1604)) ([5acf5c5](https://github.com/discordjs/discord-api-types/commit/5acf5c5989d09cabd73f3435155b9ca2cf07be81))
|
||||
|
||||
## [0.38.45](https://github.com/discordjs/discord-api-types/compare/0.38.44...0.38.45) (2026-04-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **OAuth2:** include flags in current application result ([#1610](https://github.com/discordjs/discord-api-types/issues/1610)) ([1506ff0](https://github.com/discordjs/discord-api-types/commit/1506ff0d2bf38cea590872fbc2a463096150baf6))
|
||||
* **User:** use Snowflake for DM recipient_id ([#1612](https://github.com/discordjs/discord-api-types/issues/1612)) ([3a296fa](https://github.com/discordjs/discord-api-types/commit/3a296fa929470b0dba74ee7cdd4343c03d171916))
|
||||
|
||||
## [0.38.44](https://github.com/discordjs/discord-api-types/compare/0.38.43...0.38.44) (2026-04-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **APIApplication:** make event_webhooks_status optional ([#1603](https://github.com/discordjs/discord-api-types/issues/1603)) ([c76a1bc](https://github.com/discordjs/discord-api-types/commit/c76a1bc37208789b9b626a9363e8a3992edc2899))
|
||||
|
||||
## [0.38.43](https://github.com/discordjs/discord-api-types/compare/0.38.41...0.38.43) (2026-03-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **Channel:** correct PATCH channel field nullability ([#1575](https://github.com/discordjs/discord-api-types/issues/1575)) ([a4aa724](https://github.com/discordjs/discord-api-types/commit/a4aa724eb84ca0dea335b52c312af7a0e50696f6))
|
||||
* **Gateway:** invite create timestamp type, zstd-stream ([#1569](https://github.com/discordjs/discord-api-types/issues/1569)) ([38b9467](https://github.com/discordjs/discord-api-types/commit/38b9467178783c71770a15905d5f6e716ed7cbbd))
|
||||
* **Guild:** correct optionality and nullability ([#1574](https://github.com/discordjs/discord-api-types/issues/1574)) ([cf6476d](https://github.com/discordjs/discord-api-types/commit/cf6476dc8aeecb3d36cac629cb1d921b2805c573))
|
||||
* **guildScheduledEvent:** entity_type required, channel_id nullable ([#1573](https://github.com/discordjs/discord-api-types/issues/1573)) ([bf12195](https://github.com/discordjs/discord-api-types/commit/bf121954013b21f9b8a2c35249791f96b275143a))
|
||||
* **poll:** mark expiry as nullable ([#1576](https://github.com/discordjs/discord-api-types/issues/1576)) ([dea22dc](https://github.com/discordjs/discord-api-types/commit/dea22dc487d8af22827a15815ff79acd8607465b))
|
||||
* role colors optionality, color deprecation, and stale annotations ([#1566](https://github.com/discordjs/discord-api-types/issues/1566)) ([0000e9a](https://github.com/discordjs/discord-api-types/commit/0000e9afe34f748d708c1d81441a08e1a06e0d50))
|
||||
* send soundboard result type ([#1568](https://github.com/discordjs/discord-api-types/issues/1568)) ([f1a3cb7](https://github.com/discordjs/discord-api-types/commit/f1a3cb7bb7fb6fba6824fcad42e0ce54a0d9be94))
|
||||
* split grouped gateway dispatch types ([#1563](https://github.com/discordjs/discord-api-types/issues/1563)) ([f76c2fa](https://github.com/discordjs/discord-api-types/commit/f76c2fa249b1b9ad02d4bfc26495f4cfa2349641))
|
||||
* **Voice, AuditLog:** voice state channel_id, audit log application_id ([#1580](https://github.com/discordjs/discord-api-types/issues/1580)) ([811314a](https://github.com/discordjs/discord-api-types/commit/811314a825bbe32360f98109bd4981d67fdb6726))
|
||||
* **webhook:** correct nullability for guild_id and channel_id ([#1567](https://github.com/discordjs/discord-api-types/issues/1567)) ([25778ae](https://github.com/discordjs/discord-api-types/commit/25778aeee9367c145fa841c977d4de6b247652c0))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **Application:** add activity instance types and endpoint ([#1578](https://github.com/discordjs/discord-api-types/issues/1578)) ([b985362](https://github.com/discordjs/discord-api-types/commit/b9853622523d1be70e3f754d552f5b984fff8739))
|
||||
* **Application:** add webhook event fields to PATCH ([#1570](https://github.com/discordjs/discord-api-types/issues/1570)) ([e1ff008](https://github.com/discordjs/discord-api-types/commit/e1ff008cd697cf0dd0185ed2d8aba653c6be91e4))
|
||||
* **BaseThemeType:** add `Unset` base theme type ([#1577](https://github.com/discordjs/discord-api-types/issues/1577)) ([e65e02f](https://github.com/discordjs/discord-api-types/commit/e65e02f05f048cc57488deffb04e90313c92e4c2))
|
||||
* guild messages search ([#1583](https://github.com/discordjs/discord-api-types/issues/1583)) ([a99c8c0](https://github.com/discordjs/discord-api-types/commit/a99c8c0f53b119e58841979f319eb3e49cbe9b5f))
|
||||
* **Guild:** add collectibles to guild member ([#1572](https://github.com/discordjs/discord-api-types/issues/1572)) ([c8ef2fe](https://github.com/discordjs/discord-api-types/commit/c8ef2fefde5b8a37dee40863d2a2e24df8b50e28))
|
||||
* **Guild:** add flags to modify guild member ([#1571](https://github.com/discordjs/discord-api-types/issues/1571)) ([46b8cbd](https://github.com/discordjs/discord-api-types/commit/46b8cbd46f5c5331652624d74048775bd0e9ff8d))
|
||||
* mark new modal components as stable ([#1556](https://github.com/discordjs/discord-api-types/issues/1556)) ([818b899](https://github.com/discordjs/discord-api-types/commit/818b899f9dd8f93c93168550ba08976888927f77))
|
||||
* **message:** shared client themes ([#1565](https://github.com/discordjs/discord-api-types/issues/1565)) ([c3b331d](https://github.com/discordjs/discord-api-types/commit/c3b331d80a1c4b97b260584f4c9afb5f81871ba9))
|
||||
* **Rest:** add missing JSON error codes ([#1579](https://github.com/discordjs/discord-api-types/issues/1579)) ([ba01bac](https://github.com/discordjs/discord-api-types/commit/ba01bacfc073ec5b3476157a6d6f8f91836e0eb8))
|
||||
* **RESTJSONErrorCodes:** add error code `50278` ([#1587](https://github.com/discordjs/discord-api-types/issues/1587)) ([662cb0c](https://github.com/discordjs/discord-api-types/commit/662cb0cb0ac9c6f9ad93e180849476714bfceb0c))
|
||||
|
||||
## [0.38.42](https://github.com/discordjs/discord-api-types/compare/0.38.41...0.38.42) (2026-03-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* mark new modal components as stable ([#1556](https://github.com/discordjs/discord-api-types/issues/1556)) ([818b899](https://github.com/discordjs/discord-api-types/commit/818b899f9dd8f93c93168550ba08976888927f77))
|
||||
|
||||
## [0.38.41](https://github.com/discordjs/discord-api-types/compare/0.38.40...0.38.41) (2026-03-05)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* application command option allowed channel type ([#1548](https://github.com/discordjs/discord-api-types/issues/1548)) ([5ea94a6](https://github.com/discordjs/discord-api-types/commit/5ea94a6629812820174589f2ac8ebe3765548b31))
|
||||
* **voice:** add close code `4017` ([#1538](https://github.com/discordjs/discord-api-types/issues/1538)) ([1353b59](https://github.com/discordjs/discord-api-types/commit/1353b5915c1a0069a9b1c2a24fdc11256ec486e2))
|
||||
|
||||
|
||||
|
||||
## [0.38.40](https://github.com/discordjs/discord-api-types/compare/0.38.39...0.38.40) (2026-02-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* export missing properties and use interfaces on GatewayActivityAssets ([#1519](https://github.com/discordjs/discord-api-types/issues/1519)) ([8fd4024](https://github.com/discordjs/discord-api-types/commit/8fd402464a9db8f5341a3146cdd166d557a48510))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* mark guild member role counts endpoint as stable ([#1462](https://github.com/discordjs/discord-api-types/issues/1462)) ([2a9dfd4](https://github.com/discordjs/discord-api-types/commit/2a9dfd41db635f918a3ca905206ddde8a0d3f83f))
|
||||
|
||||
|
||||
|
||||
## [0.38.39](https://github.com/discordjs/discord-api-types/compare/0.38.38...0.38.39) (2026-02-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **APIModalSubmitRadioGroupComponent:** nullable value ([#1518](https://github.com/discordjs/discord-api-types/issues/1518)) ([6f6b780](https://github.com/discordjs/discord-api-types/commit/6f6b780851124cc0aa8f06cc28abce992619ee2b))
|
||||
|
||||
|
||||
|
||||
## [0.38.38](https://github.com/discordjs/discord-api-types/compare/0.38.37...0.38.38) (2026-01-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* radio groups and checkbox in modal ([#1495](https://github.com/discordjs/discord-api-types/issues/1495)) ([18fa946](https://github.com/discordjs/discord-api-types/commit/18fa946bdfb8e0b1537e7538ca046f1647166d1e))
|
||||
|
||||
|
||||
|
||||
## [0.38.37](https://github.com/discordjs/discord-api-types/compare/0.38.36...0.38.37) (2025-12-11)
|
||||
|
||||
|
||||
|
||||
## [0.38.36](https://github.com/discordjs/discord-api-types/compare/0.38.35...0.38.36) (2025-12-01)
|
||||
|
||||
|
||||
|
||||
## [0.38.35](https://github.com/discordjs/discord-api-types/compare/0.38.34...0.38.35) (2025-11-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Add missing s/S support to `StyledTimestamp` ([#1439](https://github.com/discordjs/discord-api-types/issues/1439)) ([a8c28ab](https://github.com/discordjs/discord-api-types/commit/a8c28ab7289726c3f29f53c5c2468e8da400f02f))
|
||||
|
||||
|
||||
|
||||
## [0.38.34](https://github.com/discordjs/discord-api-types/compare/0.38.33...0.38.34) (2025-11-17)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add `isModalSubmitInteraction()` type guard ([#1428](https://github.com/discordjs/discord-api-types/issues/1428)) ([f883770](https://github.com/discordjs/discord-api-types/commit/f883770df6ae7ce8b1b036c7619b4ab8c4f92354))
|
||||
|
||||
|
||||
|
||||
## [0.38.33](https://github.com/discordjs/discord-api-types/compare/0.38.32...0.38.33) (2025-11-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **PermissionFlagsBits:** add `BypassSlowmode` ([#1427](https://github.com/discordjs/discord-api-types/issues/1427)) ([2736687](https://github.com/discordjs/discord-api-types/commit/27366872836c9f1f069fafea7114dedb62467d27))
|
||||
|
||||
|
||||
|
||||
## [0.38.32](https://github.com/discordjs/discord-api-types/compare/0.38.31...0.38.32) (2025-11-03)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **globals:** Support new s/S timestamp styles ([#1418](https://github.com/discordjs/discord-api-types/issues/1418)) ([bf4291b](https://github.com/discordjs/discord-api-types/commit/bf4291bed83272036e0cd743ba2824fc6de837e4))
|
||||
|
||||
|
||||
|
||||
## [0.38.31](https://github.com/discordjs/discord-api-types/compare/0.38.30...0.38.31) (2025-10-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **APIModalInteractionResponseCallbackComponent:** remove `APIFileUploadComponent` ([#1406](https://github.com/discordjs/discord-api-types/issues/1406)) ([e37f802](https://github.com/discordjs/discord-api-types/commit/e37f802e392fdce948c2a15ae26088f8ae625793))
|
||||
* missing name and size property on APIFileComponent ([#1404](https://github.com/discordjs/discord-api-types/issues/1404)) ([7d6a934](https://github.com/discordjs/discord-api-types/commit/7d6a934f66c2a2d063bae16eb6fb323022ece192))
|
||||
* tsdoc unstable tag is block not modifier ([#1405](https://github.com/discordjs/discord-api-types/issues/1405)) ([6e5563e](https://github.com/discordjs/discord-api-types/commit/6e5563e2b727684b44e2851b09fdf5590e08a1f8))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APIAuditLogChange:** add some missing channel change types ([#1409](https://github.com/discordjs/discord-api-types/issues/1409)) ([ea2b922](https://github.com/discordjs/discord-api-types/commit/ea2b922d12618c54139fb37986697a1a2bd33393))
|
||||
* **GuildFeature:** add `PinPermissionMigrationComplete` ([#1407](https://github.com/discordjs/discord-api-types/issues/1407)) ([c5c0312](https://github.com/discordjs/discord-api-types/commit/c5c0312867e70aefb803f9988c46e6214a028be6))
|
||||
* publishing with OIDC ([62e5b4a](https://github.com/discordjs/discord-api-types/commit/62e5b4a95cc7d5b71384d81f96d0e583d117cee5))
|
||||
* **Webhooks:** add entitlement update and delete events ([#1408](https://github.com/discordjs/discord-api-types/issues/1408)) ([be8b372](https://github.com/discordjs/discord-api-types/commit/be8b3726630bd0b0f76615cb5d7e759a95de71e4))
|
||||
|
||||
|
||||
|
||||
## [0.38.30](https://github.com/discordjs/discord-api-types/compare/0.38.29...0.38.30) (2025-10-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add support for file upload components ([#1372](https://github.com/discordjs/discord-api-types/issues/1372)) ([51b2d4e](https://github.com/discordjs/discord-api-types/commit/51b2d4e1c91a2d10244baccf1fdeee767df2289f))
|
||||
|
||||
|
||||
|
||||
## [0.38.29](https://github.com/discordjs/discord-api-types/compare/0.38.28...0.38.29) (2025-10-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* edit self result ([#1393](https://github.com/discordjs/discord-api-types/issues/1393)) ([9665e02](https://github.com/discordjs/discord-api-types/commit/9665e0236734cf224e88da4a6ede4dc535ce53a5))
|
||||
|
||||
|
||||
|
||||
## [0.38.28](https://github.com/discordjs/discord-api-types/compare/0.38.27...0.38.28) (2025-10-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* move `applied_tags` back to thread channels ([#1391](https://github.com/discordjs/discord-api-types/issues/1391)) ([00c4694](https://github.com/discordjs/discord-api-types/commit/00c46946a02ace495031c6d257b0820c4a0652cc))
|
||||
|
||||
|
||||
|
||||
## [0.38.27](https://github.com/discordjs/discord-api-types/compare/0.38.26...0.38.27) (2025-10-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `[@unstable](https://github.com/unstable)` screening ([#1389](https://github.com/discordjs/discord-api-types/issues/1389)) ([95b186d](https://github.com/discordjs/discord-api-types/commit/95b186deb7410ff5a667a1cbac5e7b6dd915f6fe))
|
||||
* add `RESTPutAPIGuildIncidentActionsResult` ([#1388](https://github.com/discordjs/discord-api-types/issues/1388)) ([0c6d424](https://github.com/discordjs/discord-api-types/commit/0c6d4249b6e39b52607235b273bf0c46caa331dc))
|
||||
* Narrow thread-related properties for channels ([#1377](https://github.com/discordjs/discord-api-types/issues/1377)) ([18cf4a5](https://github.com/discordjs/discord-api-types/commit/18cf4a514e644d039f18f55d4062318dbeb1c3f6))
|
||||
* **RESTPutAPIGuildIncidentActionsJSONBody:** add `null` ([#1387](https://github.com/discordjs/discord-api-types/issues/1387)) ([6295858](https://github.com/discordjs/discord-api-types/commit/6295858de5d7bde4b2b289ef301d994ed78bf964))
|
||||
|
||||
|
||||
|
||||
## [0.38.26](https://github.com/discordjs/discord-api-types/compare/0.38.25...0.38.26) (2025-09-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add guild_id back to GatewayVoiceStateUpdateDispatchData ([#1346](https://github.com/discordjs/discord-api-types/issues/1346)) ([e52ac85](https://github.com/discordjs/discord-api-types/commit/e52ac85e9d60b4032bb21cd958cf032cad50643f))
|
||||
|
||||
|
||||
|
||||
## [0.38.25](https://github.com/discordjs/discord-api-types/compare/0.38.24...0.38.25) (2025-09-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add RateLimited gateway event ([#1334](https://github.com/discordjs/discord-api-types/issues/1334)) ([14963d6](https://github.com/discordjs/discord-api-types/commit/14963d61d488af2be8d3655651fd0677ad4c46ed))
|
||||
|
||||
|
||||
|
||||
## [0.38.24](https://github.com/discordjs/discord-api-types/compare/0.38.23...0.38.24) (2025-09-10)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **RESTPatchAPICurrentGuildMemberJSONBody:** Add `banner`, `avatar`, and `bio` ([#1356](https://github.com/discordjs/discord-api-types/issues/1356)) ([35a4084](https://github.com/discordjs/discord-api-types/commit/35a40846473eebfe5245656ee5437347ff2fa88f))
|
||||
* **RESTPostAPIChannelThreadsResult:** narrow response ([#1364](https://github.com/discordjs/discord-api-types/issues/1364)) ([8eb66a1](https://github.com/discordjs/discord-api-types/commit/8eb66a1512e5b8c57ba7e4a85a18380664ac6219))
|
||||
* Update invite types ([#1365](https://github.com/discordjs/discord-api-types/issues/1365)) ([35867c1](https://github.com/discordjs/discord-api-types/commit/35867c19e6942e82ac6b2bcd93f61853b0b41666))
|
||||
|
||||
|
||||
|
||||
## [0.38.23](https://github.com/discordjs/discord-api-types/compare/0.38.22...0.38.23) (2025-09-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add missing text display in modal submission ([#1362](https://github.com/discordjs/discord-api-types/issues/1362)) ([464a9c8](https://github.com/discordjs/discord-api-types/commit/464a9c8cbf613428c3da6b3a9ebd0da4bd827c2b))
|
||||
* **RESTPatchAPIWebhookWithTokenMessageJSONBody:** add `flags` ([#1354](https://github.com/discordjs/discord-api-types/issues/1354)) ([af3907b](https://github.com/discordjs/discord-api-types/commit/af3907b10690c224dcd3106127fd67491262cc6c))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add 400001 ([#1352](https://github.com/discordjs/discord-api-types/issues/1352)) ([ae09e2b](https://github.com/discordjs/discord-api-types/commit/ae09e2b9e47460b07907fc3b6e317bc1ae426663))
|
||||
* More label components and text display in modals ([#1351](https://github.com/discordjs/discord-api-types/issues/1351)) ([fa05a75](https://github.com/discordjs/discord-api-types/commit/fa05a7503f59017efc16ba2ca6cfb3fc99d331a3))
|
||||
|
||||
|
||||
|
||||
## [0.38.22](https://github.com/discordjs/discord-api-types/compare/0.38.21...0.38.22) (2025-08-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Support select in modals ([#1321](https://github.com/discordjs/discord-api-types/issues/1321)) ([3659c59](https://github.com/discordjs/discord-api-types/commit/3659c59ce7b3ee8c0281bf28499e733e1bc0752b))
|
||||
|
||||
|
||||
|
||||
## [0.38.21](https://github.com/discordjs/discord-api-types/compare/0.38.20...0.38.21) (2025-08-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* guest invites ([#1290](https://github.com/discordjs/discord-api-types/issues/1290)) ([1a37ae3](https://github.com/discordjs/discord-api-types/commit/1a37ae3eea156108e1add538b1d42c5fc2ce08ee))
|
||||
* **PermissionFlagsBits:** add `PinMessages` ([#1340](https://github.com/discordjs/discord-api-types/issues/1340)) ([b05df17](https://github.com/discordjs/discord-api-types/commit/b05df17466ade5bf58578b8a230d9cb5ec9e1024))
|
||||
|
||||
|
||||
|
||||
## [0.38.20](https://github.com/discordjs/discord-api-types/compare/0.38.19...0.38.20) (2025-08-14)
|
||||
|
||||
|
||||
|
||||
## [0.38.19](https://github.com/discordjs/discord-api-types/compare/0.38.18...0.38.19) (2025-08-12)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **GatewayActivity:** add url & status display type fields ([#1326](https://github.com/discordjs/discord-api-types/issues/1326)) ([5f9c1e1](https://github.com/discordjs/discord-api-types/commit/5f9c1e1b1c9f1a63d80718629fb2775b7bae62b3))
|
||||
|
||||
|
||||
|
||||
## [0.38.18](https://github.com/discordjs/discord-api-types/compare/0.38.17...0.38.18) (2025-07-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Deprecate API related to guild ownership ([#1316](https://github.com/discordjs/discord-api-types/issues/1316)) ([4afd0c1](https://github.com/discordjs/discord-api-types/commit/4afd0c13fde05fa7117ecdeaf20534545cfdb005))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **GuildFeature:** add `GUILD_TAGS` ([#1315](https://github.com/discordjs/discord-api-types/issues/1315)) ([03f02a5](https://github.com/discordjs/discord-api-types/commit/03f02a5a9ee2e533b58b7790c4deb7ad571e5a92))
|
||||
|
||||
|
||||
|
||||
## [0.38.17](https://github.com/discordjs/discord-api-types/compare/0.38.16...0.38.17) (2025-07-24)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **auditLog:** add `AUTO_MODERATION_QUARANTINE_USER` ([#1310](https://github.com/discordjs/discord-api-types/issues/1310)) ([a72e454](https://github.com/discordjs/discord-api-types/commit/a72e4545a3409388a9c5ec0b5555ecc258de0ac2))
|
||||
* **GuildMemberFlags:** add `AutoModQuarantinedGuildTag` ([#1309](https://github.com/discordjs/discord-api-types/issues/1309)) ([a41e646](https://github.com/discordjs/discord-api-types/commit/a41e646d3d9b9f6bb15c2f6165043ef8042b26bf))
|
||||
|
||||
|
||||
|
||||
## [0.38.16](https://github.com/discordjs/discord-api-types/compare/0.38.15...0.38.16) (2025-07-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **APIApplicationCommandChannelOption:** exclude directory channels ([#1300](https://github.com/discordjs/discord-api-types/issues/1300)) ([574e5c1](https://github.com/discordjs/discord-api-types/commit/574e5c12bddd2c515fd2b96b5705b5ef9f9d2787))
|
||||
|
||||
|
||||
|
||||
## [0.38.15](https://github.com/discordjs/discord-api-types/compare/0.38.14...0.38.15) (2025-07-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **CDNRoutes:** correct `guildTagBadge` route ([#1291](https://github.com/discordjs/discord-api-types/issues/1291)) ([1fee633](https://github.com/discordjs/discord-api-types/commit/1fee6339bf05a98900d8703207c77b8e6d047f24))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* user guild tags ([#1287](https://github.com/discordjs/discord-api-types/issues/1287)) ([3245f7d](https://github.com/discordjs/discord-api-types/commit/3245f7de92c40d3b74014dbf97a2c0eafea8bcd2))
|
||||
|
||||
|
||||
|
||||
## [0.38.14](https://github.com/discordjs/discord-api-types/compare/0.38.13...0.38.14) (2025-06-30)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* role gradient colors ([#1281](https://github.com/discordjs/discord-api-types/issues/1281)) ([7fbb3e3](https://github.com/discordjs/discord-api-types/commit/7fbb3e3310bde5ea0e977afb83ea21bda0220633))
|
||||
* support new pinned messages routes ([#1254](https://github.com/discordjs/discord-api-types/issues/1254)) ([71c6d26](https://github.com/discordjs/discord-api-types/commit/71c6d2609f1713827e95c5f617011c053cd3eb6a))
|
||||
* **voice:** add close codes 4021 and 4022 ([#1283](https://github.com/discordjs/discord-api-types/issues/1283)) ([6b05db5](https://github.com/discordjs/discord-api-types/commit/6b05db5a2f9ea540e34e8429c07b96411d418b73))
|
||||
|
||||
|
||||
|
||||
## [0.38.13](https://github.com/discordjs/discord-api-types/compare/0.38.12...0.38.13) (2025-06-23)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APIUser:** add `collectibles` ([#1274](https://github.com/discordjs/discord-api-types/issues/1274)) ([77cb327](https://github.com/discordjs/discord-api-types/commit/77cb32746f47247a4229910db8ec64f844038529))
|
||||
|
||||
|
||||
|
||||
## [0.38.12](https://github.com/discordjs/discord-api-types/compare/0.38.11...0.38.12) (2025-06-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APIApplication:** add `approximate_user_authorization_count` ([#1272](https://github.com/discordjs/discord-api-types/issues/1272)) ([91d8516](https://github.com/discordjs/discord-api-types/commit/91d851628d2078e70b79e4aa7e464297eca745ce))
|
||||
* **APIUnfurledMediaItem:** add `attachment_id` ([#1273](https://github.com/discordjs/discord-api-types/issues/1273)) ([b2da18c](https://github.com/discordjs/discord-api-types/commit/b2da18c634c4e20112ce13a8e0a5e6db50063acc))
|
||||
|
||||
|
||||
|
||||
## [0.38.11](https://github.com/discordjs/discord-api-types/compare/0.38.10...0.38.11) (2025-06-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **voice:** add `max_dave_protocol_version` to identify ([#1260](https://github.com/discordjs/discord-api-types/issues/1260)) ([83d34ef](https://github.com/discordjs/discord-api-types/commit/83d34ef00c4e25d5050c7fc47562b3faa9125215))
|
||||
* **voice:** add clients connect and client disconnect recieve payload ([#1261](https://github.com/discordjs/discord-api-types/issues/1261)) ([121fb47](https://github.com/discordjs/discord-api-types/commit/121fb47f4c0c51d6149bcf051ffc5bae04b1bba8))
|
||||
* **voice:** fix remaining payload typos ([#1262](https://github.com/discordjs/discord-api-types/issues/1262)) ([d71276c](https://github.com/discordjs/discord-api-types/commit/d71276cb5f3423a81780494d041694356b8cb49c))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* voice v8 payloads & MLS voice opcodes ([#1257](https://github.com/discordjs/discord-api-types/issues/1257)) ([ebf313c](https://github.com/discordjs/discord-api-types/commit/ebf313c49c1d78cb1aaf238cfbae7c114f6215cf))
|
||||
|
||||
|
||||
|
||||
## [0.38.10](https://github.com/discordjs/discord-api-types/compare/0.38.9...0.38.10) (2025-06-02)
|
||||
|
||||
|
||||
|
||||
## [0.38.9](https://github.com/discordjs/discord-api-types/compare/0.38.8...0.38.9) (2025-05-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* discriminated thread channel types ([#1247](https://github.com/discordjs/discord-api-types/issues/1247)) ([72b8c83](https://github.com/discordjs/discord-api-types/commit/72b8c830ee6ed369085644e93b3e27849b0274ed))
|
||||
* optional `client_id` and `client_secret` in access token data ([#1248](https://github.com/discordjs/discord-api-types/issues/1248)) ([b360b2e](https://github.com/discordjs/discord-api-types/commit/b360b2e6a767fa34d48b2f02fd19511a2db98ecb))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* deauthorised webhook events ([#1253](https://github.com/discordjs/discord-api-types/issues/1253)) ([9daac44](https://github.com/discordjs/discord-api-types/commit/9daac44f1d056115755e92fcc22995a9c05012be))
|
||||
|
||||
|
||||
|
||||
## [0.38.8](https://github.com/discordjs/discord-api-types/compare/0.38.7...0.38.8) (2025-05-15)
|
||||
|
||||
|
||||
|
||||
## [0.38.7](https://github.com/discordjs/discord-api-types/compare/0.38.6...0.38.7) (2025-05-15)
|
||||
|
||||
|
||||
|
||||
## [0.38.6](https://github.com/discordjs/discord-api-types/compare/0.38.5...0.38.6) (2025-05-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* wrong exports reported by ae ([#1239](https://github.com/discordjs/discord-api-types/issues/1239)) ([a5d949e](https://github.com/discordjs/discord-api-types/commit/a5d949e650fbc325c6b619da00edfa66d28abc72))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* experimental new docs gen ([#1240](https://github.com/discordjs/discord-api-types/issues/1240)) ([3af2ae2](https://github.com/discordjs/discord-api-types/commit/3af2ae2b85550c83ec9bf1e124226d16e6a8ca7e))
|
||||
|
||||
|
||||
|
||||
## [0.38.5](https://github.com/discordjs/discord-api-types/compare/0.38.4...0.38.5) (2025-05-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* imports ([#1237](https://github.com/discordjs/discord-api-types/issues/1237)) ([c64362a](https://github.com/discordjs/discord-api-types/commit/c64362a711940a5fb5b0cb56c374ebc003fb3b0d))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* `APIWebhookSourceChannel` ([#1235](https://github.com/discordjs/discord-api-types/issues/1235)) ([ca20659](https://github.com/discordjs/discord-api-types/commit/ca206593efd1dd8f09a59c832baef0187a7cc963))
|
||||
* `APIWebhookSourceGuild` ([#1236](https://github.com/discordjs/discord-api-types/issues/1236)) ([21420c3](https://github.com/discordjs/discord-api-types/commit/21420c3028afd8cc0e73cd1081c6ecdd02c81571))
|
||||
* invite channel ([#1232](https://github.com/discordjs/discord-api-types/issues/1232)) ([0479caf](https://github.com/discordjs/discord-api-types/commit/0479cafa1bedd549d54b7cc6c915fc6beb2ba6ec))
|
||||
|
||||
|
||||
|
||||
## [0.38.4](https://github.com/discordjs/discord-api-types/compare/0.38.3...0.38.4) (2025-05-08)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Specific typings for application emojis ([#1228](https://github.com/discordjs/discord-api-types/issues/1228)) ([4b0a3af](https://github.com/discordjs/discord-api-types/commit/4b0a3af12badba5221604a3304efaeb3d0b46dd7))
|
||||
|
||||
|
||||
|
||||
## [0.38.3](https://github.com/discordjs/discord-api-types/compare/0.38.2...0.38.3) (2025-05-05)
|
||||
|
||||
|
||||
|
||||
## [0.38.2](https://github.com/discordjs/discord-api-types/compare/0.38.1...0.38.2) (2025-05-01)
|
||||
|
||||
|
||||
|
||||
# [0.38.1](https://github.com/discordjs/discord-api-types/compare/0.37.120...0.38.1) (2025-04-22)
|
||||
|
||||
|
||||
|
||||
3
deno/README.md
generated
3
deno/README.md
generated
@@ -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 `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
|
||||
|
||||
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
|
||||
|
||||
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
|
||||
|
||||
- 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.
|
||||
|
||||
- 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).
|
||||
|
||||
2
deno/gateway/common.ts
generated
2
deno/gateway/common.ts
generated
@@ -4,5 +4,5 @@
|
||||
export interface GatewayURLQuery {
|
||||
v: string;
|
||||
encoding: 'etf' | 'json';
|
||||
compress?: 'zlib-stream';
|
||||
compress?: 'zlib-stream' | 'zstd-stream';
|
||||
}
|
||||
|
||||
395
deno/gateway/v10.ts
generated
395
deno/gateway/v10.ts
generated
@@ -3,7 +3,6 @@
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../globals.ts';
|
||||
import type { GatewayPresenceUpdate } from '../payloads/v10/gateway.ts';
|
||||
import type {
|
||||
APIApplication,
|
||||
APIApplicationCommandPermission,
|
||||
@@ -16,7 +15,6 @@ import type {
|
||||
APIGuildMember,
|
||||
APIGuildScheduledEvent,
|
||||
APIInteraction,
|
||||
APIMessage,
|
||||
APIRole,
|
||||
APIStageInstance,
|
||||
APISticker,
|
||||
@@ -25,10 +23,9 @@ import type {
|
||||
APIUnavailableGuild,
|
||||
APIUser,
|
||||
GatewayActivity,
|
||||
GatewayPresenceUpdate as RawGatewayPresenceUpdate,
|
||||
GatewayThreadListSync as RawGatewayThreadListSync,
|
||||
GatewayPresenceUpdate,
|
||||
GatewayThreadListSync,
|
||||
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
|
||||
APIVoiceState,
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
AutoModerationRuleTriggerType,
|
||||
@@ -39,11 +36,22 @@ import type {
|
||||
APISoundboardSound,
|
||||
GuildChannelType,
|
||||
ThreadChannelType,
|
||||
APIBaseGuild,
|
||||
APIBaseGuildMember,
|
||||
APIBaseVoiceState,
|
||||
APIBaseVoiceGuildMember,
|
||||
APIGuildMemberJoined,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
APIGuildMemberUser,
|
||||
GatewayGuildMembersChunkPresence,
|
||||
APIBaseMessage,
|
||||
APIVoiceState,
|
||||
} from '../payloads/v10/mod.ts';
|
||||
import type { ReactionType } from '../rest/v10/mod.ts';
|
||||
import type { _Nullable } from '../utils/internals.ts';
|
||||
|
||||
export * from './common.ts';
|
||||
export type * from './common.ts';
|
||||
|
||||
export const GatewayVersion = '10';
|
||||
|
||||
@@ -278,6 +286,7 @@ export enum GatewayDispatchEvents {
|
||||
MessageReactionRemoveEmoji = 'MESSAGE_REACTION_REMOVE_EMOJI',
|
||||
MessageUpdate = 'MESSAGE_UPDATE',
|
||||
PresenceUpdate = 'PRESENCE_UPDATE',
|
||||
RateLimited = 'RATE_LIMITED',
|
||||
Ready = 'READY',
|
||||
Resumed = 'RESUMED',
|
||||
StageInstanceCreate = 'STAGE_INSTANCE_CREATE',
|
||||
@@ -322,12 +331,17 @@ export type GatewayDispatchPayload =
|
||||
| GatewayAutoModerationActionExecutionDispatch
|
||||
| GatewayAutoModerationRuleCreateDispatch
|
||||
| GatewayAutoModerationRuleDeleteDispatch
|
||||
| GatewayAutoModerationRuleModifyDispatch
|
||||
| GatewayChannelModifyDispatch
|
||||
| GatewayAutoModerationRuleUpdateDispatch
|
||||
| GatewayChannelCreateDispatch
|
||||
| GatewayChannelDeleteDispatch
|
||||
| GatewayChannelPinsUpdateDispatch
|
||||
| GatewayEntitlementModifyDispatch
|
||||
| GatewayChannelUpdateDispatch
|
||||
| GatewayEntitlementCreateDispatch
|
||||
| GatewayEntitlementDeleteDispatch
|
||||
| GatewayEntitlementUpdateDispatch
|
||||
| GatewayGuildAuditLogEntryCreateDispatch
|
||||
| GatewayGuildBanModifyDispatch
|
||||
| GatewayGuildBanAddDispatch
|
||||
| GatewayGuildBanRemoveDispatch
|
||||
| GatewayGuildCreateDispatch
|
||||
| GatewayGuildDeleteDispatch
|
||||
| GatewayGuildEmojisUpdateDispatch
|
||||
@@ -337,8 +351,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayGuildMembersChunkDispatch
|
||||
| GatewayGuildMemberUpdateDispatch
|
||||
| GatewayGuildModifyDispatch
|
||||
| GatewayGuildRoleCreateDispatch
|
||||
| GatewayGuildRoleDeleteDispatch
|
||||
| GatewayGuildRoleModifyDispatch
|
||||
| GatewayGuildRoleUpdateDispatch
|
||||
| GatewayGuildScheduledEventCreateDispatch
|
||||
| GatewayGuildScheduledEventDeleteDispatch
|
||||
| GatewayGuildScheduledEventUpdateDispatch
|
||||
@@ -366,13 +381,16 @@ export type GatewayDispatchPayload =
|
||||
| GatewayMessageReactionRemoveEmojiDispatch
|
||||
| GatewayMessageUpdateDispatch
|
||||
| GatewayPresenceUpdateDispatch
|
||||
| GatewayRateLimitedDispatch
|
||||
| GatewayReadyDispatch
|
||||
| GatewayResumedDispatch
|
||||
| GatewaySoundboardSoundsDispatch
|
||||
| GatewayStageInstanceCreateDispatch
|
||||
| GatewayStageInstanceDeleteDispatch
|
||||
| GatewayStageInstanceUpdateDispatch
|
||||
| GatewaySubscriptionModifyDispatch
|
||||
| GatewaySubscriptionCreateDispatch
|
||||
| GatewaySubscriptionDeleteDispatch
|
||||
| GatewaySubscriptionUpdateDispatch
|
||||
| GatewayThreadCreateDispatch
|
||||
| GatewayThreadDeleteDispatch
|
||||
| GatewayThreadListSyncDispatch
|
||||
@@ -519,7 +537,10 @@ export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleCreate,
|
||||
GatewayAutoModerationRuleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
@@ -529,7 +550,10 @@ export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleUpdate,
|
||||
GatewayAutoModerationRuleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
@@ -539,7 +563,10 @@ export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleDelete,
|
||||
GatewayAutoModerationRuleDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
@@ -664,7 +691,10 @@ export type GatewaySubscriptionModifyDispatchData = APISubscription;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
*/
|
||||
export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionCreate,
|
||||
GatewaySubscriptionCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
@@ -674,7 +704,10 @@ export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
*/
|
||||
export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionUpdate,
|
||||
GatewaySubscriptionUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
@@ -684,7 +717,10 @@ export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
*/
|
||||
export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionDelete,
|
||||
GatewaySubscriptionDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
@@ -714,7 +750,10 @@ export type GatewayChannelModifyDispatchData = APIChannel & {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
*/
|
||||
export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelCreate,
|
||||
GatewayChannelCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
@@ -724,7 +763,10 @@ export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
*/
|
||||
export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelUpdate,
|
||||
GatewayChannelUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
@@ -734,7 +776,10 @@ export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
*/
|
||||
export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelDelete,
|
||||
GatewayChannelDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
@@ -789,14 +834,15 @@ export type GatewayEntitlementModifyDispatch = _DataPayload<
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create}
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatchData = Omit<GatewayEntitlementModifyDispatchData, 'ends_at'> & {
|
||||
ends_at: GatewayEntitlementModifyDispatchData['ends_at'] | null;
|
||||
};
|
||||
export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispatchData;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create}
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementCreate,
|
||||
GatewayEntitlementCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
@@ -806,7 +852,10 @@ export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementUpdate,
|
||||
GatewayEntitlementUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
@@ -816,7 +865,10 @@ export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementDelete,
|
||||
GatewayEntitlementDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update}
|
||||
@@ -873,7 +925,7 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
|
||||
*/
|
||||
voice_states: Omit<APIVoiceState, 'guild_id'>[];
|
||||
voice_states: APIBaseVoiceState[];
|
||||
/**
|
||||
* Users in the guild
|
||||
*
|
||||
@@ -953,7 +1005,7 @@ export type GatewayGuildDeleteDispatch = _DataPayload<
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-delete}
|
||||
*/
|
||||
export interface GatewayGuildDeleteDispatchData extends Omit<APIUnavailableGuild, 'unavailable'> {
|
||||
export interface GatewayGuildDeleteDispatchData extends APIBaseGuild {
|
||||
/**
|
||||
* `true` if this guild is unavailable due to an outage
|
||||
*
|
||||
@@ -991,7 +1043,10 @@ export interface GatewayGuildBanModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
*/
|
||||
export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanAddDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanAdd,
|
||||
GatewayGuildBanAddDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
@@ -1001,7 +1056,10 @@ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
*/
|
||||
export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanRemove,
|
||||
GatewayGuildBanRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
@@ -1127,15 +1185,19 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload<
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update}
|
||||
*/
|
||||
export type GatewayGuildMemberUpdateDispatchData = _Nullable<Pick<APIGuildMember, 'joined_at'>> &
|
||||
Omit<APIGuildMember, 'deaf' | 'flags' | 'joined_at' | 'mute' | 'user'> &
|
||||
Partial<Pick<APIGuildMember, 'deaf' | 'flags' | 'mute'>> &
|
||||
Required<Pick<APIGuildMember, 'avatar' | 'banner' | 'user'>> & {
|
||||
/**
|
||||
* The id of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
};
|
||||
export interface GatewayGuildMemberUpdateDispatchData
|
||||
extends
|
||||
APIGuildMemberJoined,
|
||||
APIBaseGuildMember,
|
||||
Partial<APIBaseVoiceGuildMember>,
|
||||
Partial<APIFlaggedGuildMember>,
|
||||
Required<APIGuildMemberAvatar>,
|
||||
Required<APIGuildMemberUser> {
|
||||
/**
|
||||
* The id of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk}
|
||||
@@ -1145,11 +1207,6 @@ export type GatewayGuildMembersChunkDispatch = _DataPayload<
|
||||
GatewayGuildMembersChunkDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence}
|
||||
*/
|
||||
export type GatewayGuildMembersChunkPresence = Omit<RawGatewayPresenceUpdate, 'guild_id'>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk}
|
||||
*/
|
||||
@@ -1219,7 +1276,10 @@ export interface GatewayGuildRoleModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
*/
|
||||
export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleCreate,
|
||||
GatewayGuildRoleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
@@ -1229,7 +1289,10 @@ export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchD
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
*/
|
||||
export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleUpdate,
|
||||
GatewayGuildRoleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
@@ -1319,7 +1382,7 @@ export interface GatewayGuildScheduledEventUserAddDispatchData {
|
||||
*/
|
||||
export type GatewayGuildScheduledEventUserRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildScheduledEventUserRemove,
|
||||
GatewayGuildScheduledEventUserAddDispatchData
|
||||
GatewayGuildScheduledEventUserRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
@@ -1513,7 +1576,7 @@ export interface GatewayInviteCreateDispatchData {
|
||||
/**
|
||||
* The time at which the invite was created
|
||||
*/
|
||||
created_at: number;
|
||||
created_at: string;
|
||||
/**
|
||||
* The guild of the invite
|
||||
*/
|
||||
@@ -1556,6 +1619,10 @@ export interface GatewayInviteCreateDispatchData {
|
||||
* How many times the invite has been used (always will be `0`)
|
||||
*/
|
||||
uses: 0;
|
||||
/**
|
||||
* The expiration date of this invite.
|
||||
*/
|
||||
expires_at: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1597,7 +1664,7 @@ export type GatewayMessageCreateDispatch = _DataPayload<
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-create}
|
||||
*/
|
||||
export type GatewayMessageCreateDispatchData = GatewayMessageEventExtraFields & Omit<APIMessage, 'mentions'>;
|
||||
export interface GatewayMessageCreateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-update}
|
||||
@@ -1610,7 +1677,25 @@ export type GatewayMessageUpdateDispatch = _DataPayload<
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-update}
|
||||
*/
|
||||
export type GatewayMessageUpdateDispatchData = GatewayMessageEventExtraFields & Omit<APIMessage, 'mentions'>;
|
||||
export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {}
|
||||
|
||||
export interface APIGuildMemberNoUser
|
||||
extends
|
||||
APIBaseGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
NonNullable<APIGuildMemberJoined>,
|
||||
APIBaseVoiceGuildMember {}
|
||||
|
||||
export interface APIUserWithMember extends APIUser {
|
||||
/**
|
||||
* The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
member?: APIGuildMemberNoUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-create-message-create-extra-fields}
|
||||
@@ -1628,17 +1713,13 @@ export interface GatewayMessageEventExtraFields {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
member?: Omit<APIGuildMember, 'user'>;
|
||||
member?: APIGuildMemberNoUser;
|
||||
/**
|
||||
* Users specifically mentioned in the message
|
||||
*
|
||||
* The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
mentions: (APIUser & { member?: Omit<APIGuildMember, 'user'> })[];
|
||||
mentions: APIUserWithMember[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1696,25 +1777,74 @@ export interface GatewayMessageDeleteBulkDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-add}
|
||||
*/
|
||||
export type GatewayMessageReactionAddDispatch = GatewayMessageReactionData<GatewayDispatchEvents.MessageReactionAdd>;
|
||||
export interface GatewayMessageReactionAddDispatchData extends GatewayMessageReactionRemoveDispatchData {
|
||||
/**
|
||||
* The member who reacted if this happened in a guild
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
/**
|
||||
* The id of the user that posted the message that was reacted to
|
||||
*/
|
||||
message_author_id?: Snowflake;
|
||||
/**
|
||||
* Colors used for super-reaction animation in "#rrggbb" format
|
||||
*/
|
||||
burst_colors?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-add}
|
||||
*/
|
||||
export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDispatch['d'];
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove}
|
||||
*/
|
||||
export type GatewayMessageReactionRemoveDispatch = GatewayMessageReactionData<
|
||||
GatewayDispatchEvents.MessageReactionRemove,
|
||||
'burst_colors' | 'member' | 'message_author_id'
|
||||
export type GatewayMessageReactionAddDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.MessageReactionAdd,
|
||||
GatewayMessageReactionAddDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove}
|
||||
*/
|
||||
export type GatewayMessageReactionRemoveDispatchData = GatewayMessageReactionRemoveDispatch['d'];
|
||||
export interface GatewayMessageReactionRemoveDispatchData {
|
||||
/**
|
||||
* The id of the user
|
||||
*/
|
||||
user_id: Snowflake;
|
||||
/**
|
||||
* The id of the channel
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* The id of the message
|
||||
*/
|
||||
message_id: Snowflake;
|
||||
/**
|
||||
* The id of the guild
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* The emoji used to react
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object}
|
||||
*/
|
||||
emoji: APIEmoji;
|
||||
/**
|
||||
* True if this is a super-reaction
|
||||
*/
|
||||
burst: boolean;
|
||||
/**
|
||||
* The type of reaction
|
||||
*/
|
||||
type: ReactionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove}
|
||||
*/
|
||||
export type GatewayMessageReactionRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.MessageReactionRemove,
|
||||
GatewayMessageReactionRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-all}
|
||||
@@ -1758,7 +1888,7 @@ export type GatewayPresenceUpdateDispatch = _DataPayload<
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update}
|
||||
*/
|
||||
export type GatewayPresenceUpdateDispatchData = RawGatewayPresenceUpdate;
|
||||
export type GatewayPresenceUpdateDispatchData = GatewayPresenceUpdate;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#stage-instance-create}
|
||||
@@ -1810,7 +1940,7 @@ export type GatewayThreadListSyncDispatch = _DataPayload<
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-list-sync}
|
||||
*/
|
||||
export type GatewayThreadListSyncDispatchData = RawGatewayThreadListSync;
|
||||
export type GatewayThreadListSyncDispatchData = GatewayThreadListSync;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-members-update}
|
||||
@@ -2147,6 +2277,73 @@ export interface GatewayMessagePollVoteDispatchData {
|
||||
answer_id: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
|
||||
*/
|
||||
export type GatewayRateLimitedDispatch<
|
||||
Opcode extends keyof GatewayOpcodeRateLimitMetadataMap = keyof GatewayOpcodeRateLimitMetadataMap,
|
||||
> = _DataPayload<GatewayDispatchEvents.RateLimited, GatewayRateLimitedDispatchData<Opcode>>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
|
||||
*/
|
||||
export type GatewayRateLimitedRequestGuildMembersDispatch =
|
||||
GatewayRateLimitedDispatch<GatewayOpcodes.RequestGuildMembers>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
|
||||
*/
|
||||
export interface GatewayRateLimitedDispatchData<
|
||||
Opcode extends keyof GatewayOpcodeRateLimitMetadataMap = keyof GatewayOpcodeRateLimitMetadataMap,
|
||||
> {
|
||||
/**
|
||||
* {@link GatewayOpcodes | Gateway opcode} of the event that was rate limited
|
||||
*/
|
||||
opcode: Opcode;
|
||||
/**
|
||||
* The number of seconds to wait before submitting another request
|
||||
*/
|
||||
retry_after: number;
|
||||
/**
|
||||
* Metadata for the event that was rate limited
|
||||
*/
|
||||
meta: GatewayOpcodeRateLimitMetadataMap[Opcode];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
|
||||
*/
|
||||
export type GatewayRateLimitedRequestGuildMembersDispatchData =
|
||||
GatewayRateLimitedDispatchData<GatewayOpcodes.RequestGuildMembers>;
|
||||
|
||||
/**
|
||||
* Map of gateway opcodes to their rate limit metadata types
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited-rate-limit-metadata-for-opcode-structure}
|
||||
*/
|
||||
export interface GatewayOpcodeRateLimitMetadataMap {
|
||||
[GatewayOpcodes.RequestGuildMembers]: GatewayRequestGuildMemberRateLimitMetadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* Types of metadata that can be received in a {@link GatewayRateLimitedDispatchData.meta} field
|
||||
*/
|
||||
export type GatewayRateLimitedMetadata = GatewayOpcodeRateLimitMetadataMap[keyof GatewayOpcodeRateLimitMetadataMap];
|
||||
|
||||
/**
|
||||
* Rate limit metadata for the {@link GatewayOpcodes.RequestGuildMembers} opcode
|
||||
*/
|
||||
export interface GatewayRequestGuildMemberRateLimitMetadata {
|
||||
/**
|
||||
* Id of the guild members were requested for
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* Nonce used to identify the {@link GatewayGuildMembersChunkDispatch} response
|
||||
*/
|
||||
nonce?: string;
|
||||
}
|
||||
|
||||
// #endregion Dispatch Payloads
|
||||
|
||||
// #region Sendable Payloads
|
||||
@@ -2415,7 +2612,7 @@ export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'state' |
|
||||
// #endregion Sendable Payloads
|
||||
|
||||
// #region Shared
|
||||
export interface _BasePayload {
|
||||
export interface _BaseBasePayload {
|
||||
/**
|
||||
* Opcode for the payload
|
||||
*/
|
||||
@@ -2424,6 +2621,9 @@ export interface _BasePayload {
|
||||
* Event data
|
||||
*/
|
||||
d?: unknown;
|
||||
}
|
||||
|
||||
export interface _BasePayload {
|
||||
/**
|
||||
* Sequence number, used for resuming sessions and heartbeats
|
||||
*/
|
||||
@@ -2434,10 +2634,10 @@ export interface _BasePayload {
|
||||
t?: string;
|
||||
}
|
||||
|
||||
export type _NonDispatchPayload = Omit<_BasePayload, 's' | 't'> & {
|
||||
export interface _NonDispatchPayload extends _BaseBasePayload {
|
||||
t: null;
|
||||
s: null;
|
||||
};
|
||||
}
|
||||
|
||||
export interface _DataPayload<Event extends GatewayDispatchEvents, D = unknown> extends _BasePayload {
|
||||
op: GatewayOpcodes.Dispatch;
|
||||
@@ -2445,57 +2645,10 @@ export interface _DataPayload<Event extends GatewayDispatchEvents, D = unknown>
|
||||
d: D;
|
||||
}
|
||||
|
||||
// This is not used internally anymore, just remains to be non-breaking
|
||||
export type GatewayMessageReactionData<E extends GatewayDispatchEvents, O extends string = never> = _DataPayload<
|
||||
E,
|
||||
Omit<
|
||||
{
|
||||
/**
|
||||
* The id of the user
|
||||
*/
|
||||
user_id: Snowflake;
|
||||
/**
|
||||
* The id of the channel
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* The id of the message
|
||||
*/
|
||||
message_id: Snowflake;
|
||||
/**
|
||||
* The id of the guild
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* The member who reacted if this happened in a guild
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
/**
|
||||
* The emoji used to react
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object}
|
||||
*/
|
||||
emoji: APIEmoji;
|
||||
/**
|
||||
* The id of the user that posted the message that was reacted to
|
||||
*/
|
||||
message_author_id?: Snowflake;
|
||||
/**
|
||||
* True if this is a super-reaction
|
||||
*/
|
||||
burst: boolean;
|
||||
/**
|
||||
* Colors used for super-reaction animation in "#rrggbb" format
|
||||
*/
|
||||
burst_colors: string[];
|
||||
/**
|
||||
* The type of reaction
|
||||
*/
|
||||
type: ReactionType;
|
||||
},
|
||||
O
|
||||
>
|
||||
Omit<GatewayMessageReactionAddDispatchData, O>
|
||||
>;
|
||||
|
||||
export interface GatewayMessageReactionRemoveData {
|
||||
|
||||
4
deno/gateway/v6.ts
generated
4
deno/gateway/v6.ts
generated
@@ -18,7 +18,7 @@ import type {
|
||||
PresenceUpdateStatus,
|
||||
} from '../payloads/v6/mod.ts';
|
||||
|
||||
export * from './common.ts';
|
||||
export type * from './common.ts';
|
||||
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
@@ -313,7 +313,6 @@ export type GatewayReadyDispatch = DataPayload<
|
||||
*/
|
||||
export type GatewayResumedDispatch = DataPayload<GatewayDispatchEvents.Resumed, never>;
|
||||
|
||||
/* eslint-disable @typescript-eslint/indent */
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-create
|
||||
* https://discord.com/developers/docs/topics/gateway#channel-update
|
||||
@@ -325,7 +324,6 @@ export type GatewayChannelModifyDispatch = DataPayload<
|
||||
GatewayDispatchEvents.ChannelCreate | GatewayDispatchEvents.ChannelDelete | GatewayDispatchEvents.ChannelUpdate,
|
||||
APIChannel
|
||||
>;
|
||||
/* eslint-enable @typescript-eslint/indent */
|
||||
|
||||
/**
|
||||
* @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8.
|
||||
|
||||
2
deno/gateway/v8.ts
generated
2
deno/gateway/v8.ts
generated
@@ -26,7 +26,7 @@ import type {
|
||||
} from '../payloads/v8/mod.ts';
|
||||
import type { _Nullable } from '../utils/internals.ts';
|
||||
|
||||
export * from './common.ts';
|
||||
export type * from './common.ts';
|
||||
|
||||
/**
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
|
||||
397
deno/gateway/v9.ts
generated
397
deno/gateway/v9.ts
generated
@@ -3,7 +3,6 @@
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../globals.ts';
|
||||
import type { GatewayPresenceUpdate } from '../payloads/v9/gateway.ts';
|
||||
import type {
|
||||
APIApplication,
|
||||
APIApplicationCommandPermission,
|
||||
@@ -16,7 +15,6 @@ import type {
|
||||
APIGuildMember,
|
||||
APIGuildScheduledEvent,
|
||||
APIInteraction,
|
||||
APIMessage,
|
||||
APIRole,
|
||||
APIStageInstance,
|
||||
APISticker,
|
||||
@@ -25,10 +23,9 @@ import type {
|
||||
APIUnavailableGuild,
|
||||
APIUser,
|
||||
GatewayActivity,
|
||||
GatewayPresenceUpdate as RawGatewayPresenceUpdate,
|
||||
GatewayThreadListSync as RawGatewayThreadListSync,
|
||||
GatewayPresenceUpdate,
|
||||
GatewayThreadListSync,
|
||||
GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate,
|
||||
APIVoiceState,
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
AutoModerationRuleTriggerType,
|
||||
@@ -38,12 +35,23 @@ import type {
|
||||
APISoundboardSound,
|
||||
GuildChannelType,
|
||||
ThreadChannelType,
|
||||
APIEntitlement,
|
||||
APIBaseGuild,
|
||||
APIBaseGuildMember,
|
||||
APIBaseVoiceState,
|
||||
APIBaseVoiceGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberUser,
|
||||
APIGuildMemberAvatar,
|
||||
GatewayGuildMembersChunkPresence,
|
||||
APIBaseMessage,
|
||||
APIGuildMemberJoined,
|
||||
APIVoiceState,
|
||||
} from '../payloads/v9/mod.ts';
|
||||
import type { ReactionType } from '../rest/v9/mod.ts';
|
||||
import type { _Nullable } from '../utils/internals.ts';
|
||||
import type { APIEntitlement } from '../v10.ts';
|
||||
|
||||
export * from './common.ts';
|
||||
export type * from './common.ts';
|
||||
|
||||
export const GatewayVersion = '9';
|
||||
|
||||
@@ -277,6 +285,7 @@ export enum GatewayDispatchEvents {
|
||||
MessageReactionRemoveEmoji = 'MESSAGE_REACTION_REMOVE_EMOJI',
|
||||
MessageUpdate = 'MESSAGE_UPDATE',
|
||||
PresenceUpdate = 'PRESENCE_UPDATE',
|
||||
RateLimited = 'RATE_LIMITED',
|
||||
Ready = 'READY',
|
||||
Resumed = 'RESUMED',
|
||||
StageInstanceCreate = 'STAGE_INSTANCE_CREATE',
|
||||
@@ -321,12 +330,17 @@ export type GatewayDispatchPayload =
|
||||
| GatewayAutoModerationActionExecutionDispatch
|
||||
| GatewayAutoModerationRuleCreateDispatch
|
||||
| GatewayAutoModerationRuleDeleteDispatch
|
||||
| GatewayAutoModerationRuleModifyDispatch
|
||||
| GatewayChannelModifyDispatch
|
||||
| GatewayAutoModerationRuleUpdateDispatch
|
||||
| GatewayChannelCreateDispatch
|
||||
| GatewayChannelDeleteDispatch
|
||||
| GatewayChannelPinsUpdateDispatch
|
||||
| GatewayEntitlementModifyDispatch
|
||||
| GatewayChannelUpdateDispatch
|
||||
| GatewayEntitlementCreateDispatch
|
||||
| GatewayEntitlementDeleteDispatch
|
||||
| GatewayEntitlementUpdateDispatch
|
||||
| GatewayGuildAuditLogEntryCreateDispatch
|
||||
| GatewayGuildBanModifyDispatch
|
||||
| GatewayGuildBanAddDispatch
|
||||
| GatewayGuildBanRemoveDispatch
|
||||
| GatewayGuildCreateDispatch
|
||||
| GatewayGuildDeleteDispatch
|
||||
| GatewayGuildEmojisUpdateDispatch
|
||||
@@ -336,8 +350,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayGuildMembersChunkDispatch
|
||||
| GatewayGuildMemberUpdateDispatch
|
||||
| GatewayGuildModifyDispatch
|
||||
| GatewayGuildRoleCreateDispatch
|
||||
| GatewayGuildRoleDeleteDispatch
|
||||
| GatewayGuildRoleModifyDispatch
|
||||
| GatewayGuildRoleUpdateDispatch
|
||||
| GatewayGuildScheduledEventCreateDispatch
|
||||
| GatewayGuildScheduledEventDeleteDispatch
|
||||
| GatewayGuildScheduledEventUpdateDispatch
|
||||
@@ -365,13 +380,16 @@ export type GatewayDispatchPayload =
|
||||
| GatewayMessageReactionRemoveEmojiDispatch
|
||||
| GatewayMessageUpdateDispatch
|
||||
| GatewayPresenceUpdateDispatch
|
||||
| GatewayRateLimitedDispatch
|
||||
| GatewayReadyDispatch
|
||||
| GatewayResumedDispatch
|
||||
| GatewaySoundboardSoundsDispatch
|
||||
| GatewayStageInstanceCreateDispatch
|
||||
| GatewayStageInstanceDeleteDispatch
|
||||
| GatewayStageInstanceUpdateDispatch
|
||||
| GatewaySubscriptionModifyDispatch
|
||||
| GatewaySubscriptionCreateDispatch
|
||||
| GatewaySubscriptionDeleteDispatch
|
||||
| GatewaySubscriptionUpdateDispatch
|
||||
| GatewayThreadCreateDispatch
|
||||
| GatewayThreadDeleteDispatch
|
||||
| GatewayThreadListSyncDispatch
|
||||
@@ -518,7 +536,10 @@ export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleCreate,
|
||||
GatewayAutoModerationRuleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
@@ -528,7 +549,10 @@ export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleUpdate,
|
||||
GatewayAutoModerationRuleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
@@ -538,7 +562,10 @@ export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleDelete,
|
||||
GatewayAutoModerationRuleDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
@@ -663,7 +690,10 @@ export type GatewaySubscriptionModifyDispatchData = APISubscription;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
*/
|
||||
export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionCreate,
|
||||
GatewaySubscriptionCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
@@ -673,7 +703,10 @@ export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
*/
|
||||
export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionUpdate,
|
||||
GatewaySubscriptionUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
@@ -683,7 +716,10 @@ export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
*/
|
||||
export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionDelete,
|
||||
GatewaySubscriptionDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
@@ -713,7 +749,10 @@ export type GatewayChannelModifyDispatchData = APIChannel & {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
*/
|
||||
export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelCreate,
|
||||
GatewayChannelCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
@@ -723,7 +762,10 @@ export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
*/
|
||||
export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelUpdate,
|
||||
GatewayChannelUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
@@ -733,7 +775,10 @@ export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
*/
|
||||
export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelDelete,
|
||||
GatewayChannelDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
@@ -788,14 +833,15 @@ export type GatewayEntitlementModifyDispatch = _DataPayload<
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create}
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatchData = Omit<GatewayEntitlementModifyDispatchData, 'ends_at'> & {
|
||||
ends_at: GatewayEntitlementModifyDispatchData['ends_at'] | null;
|
||||
};
|
||||
export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispatchData;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create}
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementCreate,
|
||||
GatewayEntitlementCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
@@ -805,7 +851,10 @@ export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementUpdate,
|
||||
GatewayEntitlementUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
@@ -815,7 +864,10 @@ export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementDelete,
|
||||
GatewayEntitlementDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update}
|
||||
@@ -872,7 +924,7 @@ export interface GatewayGuildCreateDispatchData extends APIGuild {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
|
||||
*/
|
||||
voice_states: Omit<APIVoiceState, 'guild_id'>[];
|
||||
voice_states: APIBaseVoiceState[];
|
||||
/**
|
||||
* Users in the guild
|
||||
*
|
||||
@@ -952,7 +1004,7 @@ export type GatewayGuildDeleteDispatch = _DataPayload<
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-delete}
|
||||
*/
|
||||
export interface GatewayGuildDeleteDispatchData extends Omit<APIUnavailableGuild, 'unavailable'> {
|
||||
export interface GatewayGuildDeleteDispatchData extends APIBaseGuild {
|
||||
/**
|
||||
* `true` if this guild is unavailable due to an outage
|
||||
*
|
||||
@@ -990,7 +1042,10 @@ export interface GatewayGuildBanModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
*/
|
||||
export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanAddDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanAdd,
|
||||
GatewayGuildBanAddDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
@@ -1000,7 +1055,10 @@ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
*/
|
||||
export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanRemove,
|
||||
GatewayGuildBanRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
@@ -1126,15 +1184,19 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload<
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update}
|
||||
*/
|
||||
export type GatewayGuildMemberUpdateDispatchData = _Nullable<Pick<APIGuildMember, 'joined_at'>> &
|
||||
Omit<APIGuildMember, 'deaf' | 'flags' | 'joined_at' | 'mute' | 'user'> &
|
||||
Partial<Pick<APIGuildMember, 'deaf' | 'flags' | 'mute'>> &
|
||||
Required<Pick<APIGuildMember, 'avatar' | 'banner' | 'user'>> & {
|
||||
/**
|
||||
* The id of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
};
|
||||
export interface GatewayGuildMemberUpdateDispatchData
|
||||
extends
|
||||
APIGuildMemberJoined,
|
||||
APIBaseGuildMember,
|
||||
Partial<APIBaseVoiceGuildMember>,
|
||||
Partial<APIFlaggedGuildMember>,
|
||||
Required<APIGuildMemberUser>,
|
||||
Required<APIGuildMemberAvatar> {
|
||||
/**
|
||||
* The id of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk}
|
||||
@@ -1144,11 +1206,6 @@ export type GatewayGuildMembersChunkDispatch = _DataPayload<
|
||||
GatewayGuildMembersChunkDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence}
|
||||
*/
|
||||
export type GatewayGuildMembersChunkPresence = Omit<RawGatewayPresenceUpdate, 'guild_id'>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk}
|
||||
*/
|
||||
@@ -1218,7 +1275,10 @@ export interface GatewayGuildRoleModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
*/
|
||||
export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleCreate,
|
||||
GatewayGuildRoleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
@@ -1228,7 +1288,10 @@ export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchD
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
*/
|
||||
export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleUpdate,
|
||||
GatewayGuildRoleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
@@ -1318,7 +1381,7 @@ export interface GatewayGuildScheduledEventUserAddDispatchData {
|
||||
*/
|
||||
export type GatewayGuildScheduledEventUserRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildScheduledEventUserRemove,
|
||||
GatewayGuildScheduledEventUserAddDispatchData
|
||||
GatewayGuildScheduledEventUserRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
@@ -1512,7 +1575,7 @@ export interface GatewayInviteCreateDispatchData {
|
||||
/**
|
||||
* The time at which the invite was created
|
||||
*/
|
||||
created_at: number;
|
||||
created_at: string;
|
||||
/**
|
||||
* The guild of the invite
|
||||
*/
|
||||
@@ -1555,6 +1618,10 @@ export interface GatewayInviteCreateDispatchData {
|
||||
* How many times the invite has been used (always will be `0`)
|
||||
*/
|
||||
uses: 0;
|
||||
/**
|
||||
* The expiration date of this invite.
|
||||
*/
|
||||
expires_at: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1596,7 +1663,7 @@ export type GatewayMessageCreateDispatch = _DataPayload<
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-create}
|
||||
*/
|
||||
export type GatewayMessageCreateDispatchData = GatewayMessageEventExtraFields & Omit<APIMessage, 'mentions'>;
|
||||
export interface GatewayMessageCreateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-update}
|
||||
@@ -1609,7 +1676,25 @@ export type GatewayMessageUpdateDispatch = _DataPayload<
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-update}
|
||||
*/
|
||||
export type GatewayMessageUpdateDispatchData = GatewayMessageEventExtraFields & Omit<APIMessage, 'mentions'>;
|
||||
export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {}
|
||||
|
||||
export interface APIGuildMemberNoUser
|
||||
extends
|
||||
APIBaseGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
NonNullable<APIGuildMemberJoined>,
|
||||
APIBaseVoiceGuildMember {}
|
||||
|
||||
export interface APIUserWithMember extends APIUser {
|
||||
/**
|
||||
* The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
member?: APIGuildMemberNoUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-create-message-create-extra-fields}
|
||||
@@ -1627,17 +1712,13 @@ export interface GatewayMessageEventExtraFields {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
member?: Omit<APIGuildMember, 'user'>;
|
||||
member?: APIGuildMemberNoUser;
|
||||
/**
|
||||
* Users specifically mentioned in the message
|
||||
*
|
||||
* The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events
|
||||
* from text-based guild channels
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
mentions: (APIUser & { member?: Omit<APIGuildMember, 'user'> })[];
|
||||
mentions: APIUserWithMember[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1695,25 +1776,74 @@ export interface GatewayMessageDeleteBulkDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-add}
|
||||
*/
|
||||
export type GatewayMessageReactionAddDispatch = GatewayMessageReactionData<GatewayDispatchEvents.MessageReactionAdd>;
|
||||
export interface GatewayMessageReactionAddDispatchData extends GatewayMessageReactionRemoveDispatchData {
|
||||
/**
|
||||
* The member who reacted if this happened in a guild
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
/**
|
||||
* The id of the user that posted the message that was reacted to
|
||||
*/
|
||||
message_author_id?: Snowflake;
|
||||
/**
|
||||
* Colors used for super-reaction animation in "#rrggbb" format
|
||||
*/
|
||||
burst_colors?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-add}
|
||||
*/
|
||||
export type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDispatch['d'];
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove}
|
||||
*/
|
||||
export type GatewayMessageReactionRemoveDispatch = GatewayMessageReactionData<
|
||||
GatewayDispatchEvents.MessageReactionRemove,
|
||||
'burst_colors' | 'member' | 'message_author_id'
|
||||
export type GatewayMessageReactionAddDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.MessageReactionAdd,
|
||||
GatewayMessageReactionAddDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove}
|
||||
*/
|
||||
export type GatewayMessageReactionRemoveDispatchData = GatewayMessageReactionRemoveDispatch['d'];
|
||||
export interface GatewayMessageReactionRemoveDispatchData {
|
||||
/**
|
||||
* The id of the user
|
||||
*/
|
||||
user_id: Snowflake;
|
||||
/**
|
||||
* The id of the channel
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* The id of the message
|
||||
*/
|
||||
message_id: Snowflake;
|
||||
/**
|
||||
* The id of the guild
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* The emoji used to react
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object}
|
||||
*/
|
||||
emoji: APIEmoji;
|
||||
/**
|
||||
* True if this is a super-reaction
|
||||
*/
|
||||
burst: boolean;
|
||||
/**
|
||||
* The type of reaction
|
||||
*/
|
||||
type: ReactionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove}
|
||||
*/
|
||||
export type GatewayMessageReactionRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.MessageReactionRemove,
|
||||
GatewayMessageReactionRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-all}
|
||||
@@ -1757,7 +1887,7 @@ export type GatewayPresenceUpdateDispatch = _DataPayload<
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update}
|
||||
*/
|
||||
export type GatewayPresenceUpdateDispatchData = RawGatewayPresenceUpdate;
|
||||
export type GatewayPresenceUpdateDispatchData = GatewayPresenceUpdate;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#stage-instance-create}
|
||||
@@ -1809,7 +1939,7 @@ export type GatewayThreadListSyncDispatch = _DataPayload<
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-list-sync}
|
||||
*/
|
||||
export type GatewayThreadListSyncDispatchData = RawGatewayThreadListSync;
|
||||
export type GatewayThreadListSyncDispatchData = GatewayThreadListSync;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-members-update}
|
||||
@@ -2146,6 +2276,73 @@ export interface GatewayMessagePollVoteDispatchData {
|
||||
answer_id: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
|
||||
*/
|
||||
export type GatewayRateLimitedDispatch<
|
||||
Opcode extends keyof GatewayOpcodeRateLimitMetadataMap = keyof GatewayOpcodeRateLimitMetadataMap,
|
||||
> = _DataPayload<GatewayDispatchEvents.RateLimited, GatewayRateLimitedDispatchData<Opcode>>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
|
||||
*/
|
||||
export type GatewayRateLimitedRequestGuildMembersDispatch =
|
||||
GatewayRateLimitedDispatch<GatewayOpcodes.RequestGuildMembers>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
|
||||
*/
|
||||
export interface GatewayRateLimitedDispatchData<
|
||||
Opcode extends keyof GatewayOpcodeRateLimitMetadataMap = keyof GatewayOpcodeRateLimitMetadataMap,
|
||||
> {
|
||||
/**
|
||||
* {@link GatewayOpcodes | Gateway opcode} of the event that was rate limited
|
||||
*/
|
||||
opcode: Opcode;
|
||||
/**
|
||||
* The number of seconds to wait before submitting another request
|
||||
*/
|
||||
retry_after: number;
|
||||
/**
|
||||
* Metadata for the event that was rate limited
|
||||
*/
|
||||
meta: GatewayOpcodeRateLimitMetadataMap[Opcode];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
|
||||
*/
|
||||
export type GatewayRateLimitedRequestGuildMembersDispatchData =
|
||||
GatewayRateLimitedDispatchData<GatewayOpcodes.RequestGuildMembers>;
|
||||
|
||||
/**
|
||||
* Map of gateway opcodes to their rate limit metadata types
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited-rate-limit-metadata-for-opcode-structure}
|
||||
*/
|
||||
export interface GatewayOpcodeRateLimitMetadataMap {
|
||||
[GatewayOpcodes.RequestGuildMembers]: GatewayRequestGuildMemberRateLimitMetadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* Types of metadata that can be received in a {@link GatewayRateLimitedDispatchData.meta} field
|
||||
*/
|
||||
export type GatewayRateLimitedMetadata = GatewayOpcodeRateLimitMetadataMap[keyof GatewayOpcodeRateLimitMetadataMap];
|
||||
|
||||
/**
|
||||
* Rate limit metadata for the {@link GatewayOpcodes.RequestGuildMembers} opcode
|
||||
*/
|
||||
export interface GatewayRequestGuildMemberRateLimitMetadata {
|
||||
/**
|
||||
* Id of the guild members were requested for
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* Nonce used to identify the {@link GatewayGuildMembersChunkDispatch} response
|
||||
*/
|
||||
nonce?: string;
|
||||
}
|
||||
|
||||
// #endregion Dispatch Payloads
|
||||
|
||||
// #region Sendable Payloads
|
||||
@@ -2414,7 +2611,8 @@ export type GatewayActivityUpdateData = Pick<GatewayActivity, 'name' | 'state' |
|
||||
// #endregion Sendable Payloads
|
||||
|
||||
// #region Shared
|
||||
export interface _BasePayload {
|
||||
|
||||
export interface _BaseBasePayload {
|
||||
/**
|
||||
* Opcode for the payload
|
||||
*/
|
||||
@@ -2423,6 +2621,8 @@ export interface _BasePayload {
|
||||
* Event data
|
||||
*/
|
||||
d?: unknown;
|
||||
}
|
||||
export interface _BasePayload extends _BaseBasePayload {
|
||||
/**
|
||||
* Sequence number, used for resuming sessions and heartbeats
|
||||
*/
|
||||
@@ -2433,10 +2633,10 @@ export interface _BasePayload {
|
||||
t?: string;
|
||||
}
|
||||
|
||||
export type _NonDispatchPayload = Omit<_BasePayload, 's' | 't'> & {
|
||||
export interface _NonDispatchPayload extends _BaseBasePayload {
|
||||
t: null;
|
||||
s: null;
|
||||
};
|
||||
}
|
||||
|
||||
export interface _DataPayload<Event extends GatewayDispatchEvents, D = unknown> extends _BasePayload {
|
||||
op: GatewayOpcodes.Dispatch;
|
||||
@@ -2444,57 +2644,10 @@ export interface _DataPayload<Event extends GatewayDispatchEvents, D = unknown>
|
||||
d: D;
|
||||
}
|
||||
|
||||
// This is not used internally anymore, just remains to be non-breaking
|
||||
export type GatewayMessageReactionData<E extends GatewayDispatchEvents, O extends string = never> = _DataPayload<
|
||||
E,
|
||||
Omit<
|
||||
{
|
||||
/**
|
||||
* The id of the user
|
||||
*/
|
||||
user_id: Snowflake;
|
||||
/**
|
||||
* The id of the channel
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* The id of the message
|
||||
*/
|
||||
message_id: Snowflake;
|
||||
/**
|
||||
* The id of the guild
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* The member who reacted if this happened in a guild
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
/**
|
||||
* The emoji used to react
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object}
|
||||
*/
|
||||
emoji: APIEmoji;
|
||||
/**
|
||||
* The id of the user that posted the message that was reacted to
|
||||
*/
|
||||
message_author_id?: Snowflake;
|
||||
/**
|
||||
* True if this is a super-reaction
|
||||
*/
|
||||
burst: boolean;
|
||||
/**
|
||||
* Colors used for super-reaction animation in "#rrggbb" format
|
||||
*/
|
||||
burst_colors?: string[];
|
||||
/**
|
||||
* The type of reaction
|
||||
*/
|
||||
type: ReactionType;
|
||||
},
|
||||
O
|
||||
>
|
||||
Omit<GatewayMessageReactionAddDispatchData, O>
|
||||
>;
|
||||
|
||||
export interface GatewayMessageReactionRemoveData {
|
||||
|
||||
11
deno/globals.ts
generated
11
deno/globals.ts
generated
@@ -8,6 +8,9 @@ export type Snowflake = string;
|
||||
*/
|
||||
export type Permissions = string;
|
||||
|
||||
const timestampStyles = 'DFRSTdfst';
|
||||
const timestampLength = 13;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/reference#message-formatting-formats}
|
||||
*/
|
||||
@@ -52,7 +55,6 @@ export const FormattingPatterns = {
|
||||
* The `fullName` (possibly including `name`, `subcommandOrGroup` and `subcommand`) and `id` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
SlashCommand:
|
||||
// eslint-disable-next-line unicorn/no-unsafe-regex
|
||||
/<\/(?<fullName>(?<name>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32})(?: (?<subcommandOrGroup>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?(?: (?<subcommand>[-_\p{Letter}\p{Number}\p{sc=Deva}\p{sc=Thai}]{1,32}))?):(?<id>\d{17,20})>/u,
|
||||
/**
|
||||
* Regular expression for matching a custom emoji, either static or animated
|
||||
@@ -77,20 +79,19 @@ export const FormattingPatterns = {
|
||||
*
|
||||
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
// eslint-disable-next-line prefer-named-capture-group
|
||||
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRTdft]))?>/,
|
||||
Timestamp: new RegExp(`<t:(?<timestamp>-?\\d{1,${timestampLength}})(:(?<style>[${timestampStyles}]))?>`),
|
||||
/**
|
||||
* Regular expression for matching strictly default styled timestamps
|
||||
*
|
||||
* The `timestamp` group property is present on the `exec` result of this expression
|
||||
*/
|
||||
DefaultStyledTimestamp: /<t:(?<timestamp>-?\d{1,13})>/,
|
||||
DefaultStyledTimestamp: new RegExp(`<t:(?<timestamp>-?\\d{1,${timestampLength}})>`),
|
||||
/**
|
||||
* Regular expression for matching strictly custom styled timestamps
|
||||
*
|
||||
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
StyledTimestamp: /<t:(?<timestamp>-?\d{1,13}):(?<style>[DFRTdft])>/,
|
||||
StyledTimestamp: new RegExp(`<t:(?<timestamp>-?\\d{1,${timestampLength}}):(?<style>[${timestampStyles}])>`),
|
||||
/**
|
||||
* Regular expression for matching a guild navigation mention
|
||||
*
|
||||
|
||||
19
deno/payloads/common.ts
generated
19
deno/payloads/common.ts
generated
@@ -17,7 +17,6 @@ export const PermissionFlagsBits = {
|
||||
/**
|
||||
* Allows kicking members
|
||||
*/
|
||||
// eslint-disable-next-line sonarjs/no-identical-expressions
|
||||
KickMembers: 1n << 1n,
|
||||
/**
|
||||
* Allows banning members
|
||||
@@ -38,7 +37,7 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
ManageGuild: 1n << 5n,
|
||||
/**
|
||||
* Allows for the addition of reactions to messages
|
||||
* Allows for the addition of reactions to messages. This permission does not apply to reacting with an existing reaction on a message
|
||||
*
|
||||
* Applies to channel types: Text, Voice, Stage
|
||||
*/
|
||||
@@ -234,9 +233,9 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
SendMessagesInThreads: 1n << 38n,
|
||||
/**
|
||||
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag) in a voice channel
|
||||
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag)
|
||||
*
|
||||
* Applies to channel types: Voice
|
||||
* Applies to channel types: Text, Voice
|
||||
*/
|
||||
UseEmbeddedActivities: 1n << 39n,
|
||||
/**
|
||||
@@ -288,6 +287,18 @@ export const PermissionFlagsBits = {
|
||||
* 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,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import type { Snowflake } from '../../../../../globals.ts';
|
||||
import type { ChannelType } from '../../../channel.ts';
|
||||
import type { ApplicationCommandOptionAllowedChannelType } from '../../../channel.ts';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandChannelOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>[];
|
||||
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
channel_types?: ApplicationCommandOptionAllowedChannelType[];
|
||||
}
|
||||
|
||||
export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export 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.
|
||||
*/
|
||||
@@ -23,10 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption<Type extends InteractionType = InteractionType>
|
||||
extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Integer,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Integer,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export 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.
|
||||
*/
|
||||
@@ -23,10 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataNumberOption<Type extends InteractionType = InteractionType>
|
||||
extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Number,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
export interface APIApplicationCommandInteractionDataNumberOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Number,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export 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`).
|
||||
*/
|
||||
@@ -22,7 +21,9 @@ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithA
|
||||
APIApplicationCommandOptionChoice<string>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataStringOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
|
||||
export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.String,
|
||||
string
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@ import type { APIApplicationCommandBasicOption, APIApplicationCommandInteraction
|
||||
import type { APIApplicationCommandOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandSubcommandOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
options?: APIApplicationCommandBasicOption[];
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
APIApplicationCommandSubcommandOption,
|
||||
} from './subcommand.ts';
|
||||
|
||||
export interface APIApplicationCommandSubcommandGroupOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
options?: APIApplicationCommandSubcommandOption[];
|
||||
}
|
||||
|
||||
|
||||
@@ -47,19 +47,19 @@ import type {
|
||||
} from './_chatInput/user.ts';
|
||||
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
|
||||
export * from './_chatInput/attachment.ts';
|
||||
export * from './_chatInput/base.ts';
|
||||
export * from './_chatInput/boolean.ts';
|
||||
export * from './_chatInput/channel.ts';
|
||||
export * from './_chatInput/integer.ts';
|
||||
export * from './_chatInput/mentionable.ts';
|
||||
export * from './_chatInput/number.ts';
|
||||
export * from './_chatInput/role.ts';
|
||||
export type * from './_chatInput/attachment.ts';
|
||||
export type * from './_chatInput/base.ts';
|
||||
export type * from './_chatInput/boolean.ts';
|
||||
export type * from './_chatInput/channel.ts';
|
||||
export type * from './_chatInput/integer.ts';
|
||||
export type * from './_chatInput/mentionable.ts';
|
||||
export type * from './_chatInput/number.ts';
|
||||
export type * from './_chatInput/role.ts';
|
||||
export * from './_chatInput/shared.ts';
|
||||
export * from './_chatInput/string.ts';
|
||||
export * from './_chatInput/subcommand.ts';
|
||||
export * from './_chatInput/subcommandGroup.ts';
|
||||
export * from './_chatInput/user.ts';
|
||||
export type * from './_chatInput/string.ts';
|
||||
export type * from './_chatInput/subcommand.ts';
|
||||
export type * from './_chatInput/subcommandGroup.ts';
|
||||
export type * from './_chatInput/user.ts';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure}
|
||||
@@ -105,8 +105,7 @@ export type APIApplicationCommandInteractionDataBasicOption<Type extends Interac
|
||||
/**
|
||||
* @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<InteractionType.ApplicationCommand>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
@@ -114,8 +113,7 @@ export interface APIChatInputApplicationCommandInteractionData
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIAutocompleteApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Snowflake } from '../../../../globals.ts';
|
||||
import type { APIMessage } from '../../channel.ts';
|
||||
import type { APIMessage } from '../../message.ts';
|
||||
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIUserInteractionDataResolved } from '../base.ts';
|
||||
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
@@ -7,8 +7,7 @@ import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
/**
|
||||
* @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;
|
||||
resolved: APIUserInteractionDataResolved;
|
||||
}
|
||||
@@ -16,8 +15,7 @@ export interface APIUserApplicationCommandInteractionData
|
||||
/**
|
||||
* @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;
|
||||
resolved: APIMessageApplicationCommandInteractionDataResolved;
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@ import type { APIBaseInteraction } from './base.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
|
||||
export * from './_applicationCommands/chatInput.ts';
|
||||
export * from './_applicationCommands/contextMenu.ts';
|
||||
export type * from './_applicationCommands/contextMenu.ts';
|
||||
export * from './_applicationCommands/permissions.ts';
|
||||
export * from './_applicationCommands/entryPoint.ts';
|
||||
export * from './_applicationCommands/internals.ts';
|
||||
export type * from './_applicationCommands/entryPoint.ts';
|
||||
export type * from './_applicationCommands/internals.ts';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object}
|
||||
@@ -95,15 +95,21 @@ export interface APIApplicationCommand {
|
||||
*/
|
||||
default_permission?: boolean;
|
||||
/**
|
||||
* Indicates whether the command is age-restricted, defaults to `false`
|
||||
* Indicates whether the command is age-restricted
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
nsfw?: boolean;
|
||||
/**
|
||||
* Installation context(s) where the command is available, only for globally-scoped commands. Defaults to `GUILD_INSTALL ([0])`
|
||||
* 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. By default, all interaction context types included for new commands `[0,1,2]`.
|
||||
* Interaction context(s) where the command can be used, only for globally-scoped commands
|
||||
*
|
||||
* @defaultValue `[InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel]`
|
||||
*/
|
||||
contexts?: InteractionContextType[] | null;
|
||||
/**
|
||||
|
||||
27
deno/payloads/v10/_interactions/base.ts
generated
27
deno/payloads/v10/_interactions/base.ts
generated
@@ -1,15 +1,15 @@
|
||||
import type { Permissions, Snowflake } from '../../../globals.ts';
|
||||
import type { APIRole, ApplicationIntegrationType, InteractionContextType, Locale } from '../../../v10.ts';
|
||||
import type { APIChannel, APIPartialChannel, APIThreadChannel, ChannelType, ThreadChannelType } from '../channel.ts';
|
||||
import type {
|
||||
APIAttachment,
|
||||
APIChannel,
|
||||
APIMessage,
|
||||
APIPartialChannel,
|
||||
APIThreadChannel,
|
||||
ChannelType,
|
||||
ThreadChannelType,
|
||||
} from '../channel.ts';
|
||||
import type { APIGuildMember, APIPartialInteractionGuild } from '../guild.ts';
|
||||
APIBaseGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
APIGuildMemberJoined,
|
||||
APIPartialInteractionGuild,
|
||||
} from '../guild.ts';
|
||||
import type { APIAttachment, APIMessage } from '../message.ts';
|
||||
import type { APIEntitlement } from '../monetization.ts';
|
||||
import type { APIUser } from '../user.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
@@ -48,8 +48,7 @@ export interface APIBaseInteractionMetadata<Type extends InteractionType> {
|
||||
/**
|
||||
* @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> {
|
||||
export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
|
||||
/**
|
||||
* The user the command was run on, present only on user commands interactions
|
||||
*/
|
||||
@@ -64,8 +63,7 @@ export interface APIApplicationCommandInteractionMetadata
|
||||
/**
|
||||
* @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> {
|
||||
export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
|
||||
/**
|
||||
* ID of the message that contained the interactive component
|
||||
*/
|
||||
@@ -253,7 +251,8 @@ export type APIInteractionDataResolvedChannel =
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
||||
17
deno/payloads/v10/_interactions/messageComponents.ts
generated
17
deno/payloads/v10/_interactions/messageComponents.ts
generated
@@ -1,6 +1,6 @@
|
||||
import type { Snowflake } from '../../../globals.ts';
|
||||
import type { ComponentType } from '../channel.ts';
|
||||
import type { APIBaseInteraction, InteractionType } from '../interactions.ts';
|
||||
import type { ComponentType } from '../message.ts';
|
||||
import type {
|
||||
APIDMInteractionWrapper,
|
||||
APIGuildInteractionWrapper,
|
||||
@@ -56,31 +56,26 @@ export interface APIMessageComponentBaseInteractionData<CType extends ComponentT
|
||||
|
||||
export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>;
|
||||
|
||||
export interface APIMessageStringSelectInteractionData
|
||||
extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> {
|
||||
export interface APIMessageStringSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIMessageUserSelectInteractionData
|
||||
extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> {
|
||||
export interface APIMessageUserSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> {
|
||||
values: Snowflake[];
|
||||
resolved: APIUserInteractionDataResolved;
|
||||
}
|
||||
|
||||
export interface APIMessageRoleSelectInteractionData
|
||||
extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> {
|
||||
export interface APIMessageRoleSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> {
|
||||
values: Snowflake[];
|
||||
resolved: Required<Pick<APIInteractionDataResolved, 'roles'>>;
|
||||
}
|
||||
|
||||
export interface APIMessageMentionableSelectInteractionData
|
||||
extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> {
|
||||
export interface APIMessageMentionableSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> {
|
||||
values: Snowflake[];
|
||||
resolved: Pick<APIInteractionDataResolved, 'members' | 'roles' | 'users'>;
|
||||
}
|
||||
|
||||
export interface APIMessageChannelSelectInteractionData
|
||||
extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> {
|
||||
export interface APIMessageChannelSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> {
|
||||
values: Snowflake[];
|
||||
resolved: Required<Pick<APIInteractionDataResolved, 'channels'>>;
|
||||
}
|
||||
|
||||
81
deno/payloads/v10/_interactions/modalSubmit.ts
generated
81
deno/payloads/v10/_interactions/modalSubmit.ts
generated
@@ -1,27 +1,94 @@
|
||||
import type { APIActionRowComponent, APIComponentInModalActionRow } from '../channel.ts';
|
||||
import type {
|
||||
APIBaseInteraction,
|
||||
APIDMInteractionWrapper,
|
||||
APIGuildInteractionWrapper,
|
||||
APIInteractionDataResolved,
|
||||
ComponentType,
|
||||
InteractionType,
|
||||
} from '../mod.ts';
|
||||
import type { APIBaseComponent } from '../message.ts';
|
||||
|
||||
export interface ModalSubmitComponent {
|
||||
type: ComponentType;
|
||||
export interface APIBaseModalSubmitComponent<T extends ComponentType> extends APIBaseComponent<T> {
|
||||
custom_id: string;
|
||||
}
|
||||
|
||||
export interface APIModalSubmitTextInputComponent extends APIBaseModalSubmitComponent<ComponentType.TextInput> {
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface ModalSubmitActionRowComponent
|
||||
extends Omit<APIActionRowComponent<APIComponentInModalActionRow>, 'components'> {
|
||||
components: ModalSubmitComponent[];
|
||||
export interface APIModalSubmitStringSelectComponent extends APIBaseModalSubmitComponent<ComponentType.StringSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitUserSelectComponent extends APIBaseModalSubmitComponent<ComponentType.UserSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitComponent<ComponentType.RoleSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmitComponent<ComponentType.ChannelSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitComponent<ComponentType.FileUpload> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitRadioGroupComponent extends APIBaseModalSubmitComponent<ComponentType.RadioGroup> {
|
||||
value: string | null;
|
||||
}
|
||||
|
||||
export interface APIModalSubmitCheckboxGroupComponent extends APIBaseModalSubmitComponent<ComponentType.CheckboxGroup> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitCheckboxComponent extends APIBaseModalSubmitComponent<ComponentType.Checkbox> {
|
||||
value: boolean;
|
||||
}
|
||||
|
||||
export type ModalSubmitComponent =
|
||||
| APIModalSubmitChannelSelectComponent
|
||||
| APIModalSubmitCheckboxComponent
|
||||
| APIModalSubmitCheckboxGroupComponent
|
||||
| APIModalSubmitFileUploadComponent
|
||||
| APIModalSubmitMentionableSelectComponent
|
||||
| APIModalSubmitRadioGroupComponent
|
||||
| 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;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure}
|
||||
*/
|
||||
export interface APIModalSubmission {
|
||||
/**
|
||||
* Data for users, members, channels, and roles in the modal's auto-populated select menus
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
|
||||
*/
|
||||
resolved?: APIInteractionDataResolved;
|
||||
/**
|
||||
* A developer-defined identifier for the component, max 100 characters
|
||||
*/
|
||||
@@ -29,7 +96,7 @@ export interface APIModalSubmission {
|
||||
/**
|
||||
* A list of child components
|
||||
*/
|
||||
components: ModalSubmitActionRowComponent[];
|
||||
components: APIModalSubmissionComponent[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
16
deno/payloads/v10/_interactions/responses.ts
generated
16
deno/payloads/v10/_interactions/responses.ts
generated
@@ -1,5 +1,10 @@
|
||||
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v10.ts';
|
||||
import type { APIActionRowComponent, APIComponentInModalActionRow } from '../channel.ts';
|
||||
import type {
|
||||
APIActionRowComponent,
|
||||
APIComponentInModalActionRow,
|
||||
APILabelComponent,
|
||||
APITextDisplayComponent,
|
||||
} from '../message.ts';
|
||||
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
|
||||
|
||||
/**
|
||||
@@ -126,6 +131,11 @@ export interface APICommandAutocompleteInteractionResponseCallbackData {
|
||||
choices?: APIApplicationCommandOptionChoice[];
|
||||
}
|
||||
|
||||
export type APIModalInteractionResponseCallbackComponent =
|
||||
| APIActionRowComponent<APIComponentInModalActionRow>
|
||||
| APILabelComponent
|
||||
| APITextDisplayComponent;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal}
|
||||
*/
|
||||
@@ -140,6 +150,8 @@ export interface APIModalInteractionResponseCallbackData {
|
||||
title: string;
|
||||
/**
|
||||
* Between 1 and 5 (inclusive) components that make up the modal
|
||||
*
|
||||
* @remarks Using action rows inside modals is deprecated.
|
||||
*/
|
||||
components: APIActionRowComponent<APIComponentInModalActionRow>[];
|
||||
components: APIModalInteractionResponseCallbackComponent[];
|
||||
}
|
||||
|
||||
74
deno/payloads/v10/application.ts
generated
74
deno/payloads/v10/application.ts
generated
@@ -111,9 +111,13 @@ export interface APIApplication {
|
||||
*/
|
||||
approximate_guild_count?: number;
|
||||
/**
|
||||
* Approximate count of users that have installed the app
|
||||
* Approximate count of users that have installed the app (authorized with `application.commands` as a scope)
|
||||
*/
|
||||
approximate_user_install_count?: number;
|
||||
/**
|
||||
* Approximate count of users that have OAuth2 authorizations for the app
|
||||
*/
|
||||
approximate_user_authorization_count?: number;
|
||||
/**
|
||||
* Array of redirect URIs for the application
|
||||
*/
|
||||
@@ -150,7 +154,7 @@ export interface APIApplication {
|
||||
/**
|
||||
* If webhook events are enabled for the app
|
||||
*/
|
||||
event_webhooks_status: ApplicationWebhookEventStatus;
|
||||
event_webhooks_status?: ApplicationWebhookEventStatus;
|
||||
/**
|
||||
* List of webhook event types the app subscribes to
|
||||
*/
|
||||
@@ -227,11 +231,11 @@ export enum ApplicationFlags {
|
||||
*/
|
||||
Embedded = 1 << 17,
|
||||
/**
|
||||
* Intent required for bots in 100 or more servers to receive {@link https://support-dev.discord.com/hc/en-us/articles/4404772028055 | message content}
|
||||
* Intent required for bots in 100 or more servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content}
|
||||
*/
|
||||
GatewayMessageContent = 1 << 18,
|
||||
/**
|
||||
* Intent required for bots in under 100 servers to receive {@link https://support-dev.discord.com/hc/en-us/articles/4404772028055 | message content},
|
||||
* Intent required for bots in under 100 servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content},
|
||||
* found in Bot Settings
|
||||
*/
|
||||
GatewayMessageContentLimited = 1 << 19,
|
||||
@@ -313,6 +317,68 @@ export enum ApplicationRoleConnectionMetadataType {
|
||||
BooleanNotEqual,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-kind-enum}
|
||||
*/
|
||||
export enum ActivityLocationKind {
|
||||
/**
|
||||
* Location is a guild channel
|
||||
*/
|
||||
GuildChannel = 'gc',
|
||||
/**
|
||||
* Location is a private channel, such as a DM or GDM
|
||||
*/
|
||||
PrivateChannel = 'pc',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-object}
|
||||
*/
|
||||
export interface APIActivityLocation {
|
||||
/**
|
||||
* Unique identifier for the location
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Enum describing kind of location
|
||||
*/
|
||||
kind: ActivityLocationKind;
|
||||
/**
|
||||
* ID of the channel
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* ID of the guild
|
||||
*/
|
||||
guild_id?: Snowflake | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-instance-object}
|
||||
*/
|
||||
export interface APIActivityInstance {
|
||||
/**
|
||||
* Application ID
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Activity instance ID
|
||||
*/
|
||||
instance_id: string;
|
||||
/**
|
||||
* Unique identifier for the launch
|
||||
*/
|
||||
launch_id: Snowflake;
|
||||
/**
|
||||
* Location the instance is running in
|
||||
*/
|
||||
location: APIActivityLocation;
|
||||
/**
|
||||
* IDs of the users currently connected to the instance
|
||||
*/
|
||||
users: Snowflake[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status}
|
||||
*/
|
||||
|
||||
34
deno/payloads/v10/auditLog.ts
generated
34
deno/payloads/v10/auditLog.ts
generated
@@ -10,7 +10,13 @@ import type {
|
||||
AutoModerationRuleEventType,
|
||||
AutoModerationRuleTriggerType,
|
||||
} from './autoModeration.ts';
|
||||
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel.ts';
|
||||
import type {
|
||||
APIChannel,
|
||||
APIGuildForumDefaultReactionEmoji,
|
||||
APIGuildForumTag,
|
||||
APIOverwrite,
|
||||
VideoQualityMode,
|
||||
} from './channel.ts';
|
||||
import type {
|
||||
APIGuildIntegration,
|
||||
APIGuildIntegrationType,
|
||||
@@ -207,6 +213,7 @@ export enum AuditLogEvent {
|
||||
AutoModerationBlockMessage,
|
||||
AutoModerationFlagToChannel,
|
||||
AutoModerationUserCommunicationDisabled,
|
||||
AutoModerationQuarantineUser,
|
||||
|
||||
CreatorMonetizationRequestCreated = 150,
|
||||
CreatorMonetizationTermsAccepted,
|
||||
@@ -232,6 +239,7 @@ export interface APIAuditLogOptions {
|
||||
* - AUTO_MODERATION_BLOCK_MESSAGE
|
||||
* - AUTO_MODERATION_FLAG_TO_CHANNEL
|
||||
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
|
||||
* - AUTO_MODERATION_QUARANTINE_USER
|
||||
*/
|
||||
auto_moderation_rule_name?: string;
|
||||
/**
|
||||
@@ -241,6 +249,7 @@ export interface APIAuditLogOptions {
|
||||
* - AUTO_MODERATION_BLOCK_MESSAGE
|
||||
* - AUTO_MODERATION_FLAG_TO_CHANNEL
|
||||
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
|
||||
* - AUTO_MODERATION_QUARANTINE_USER
|
||||
*/
|
||||
auto_moderation_rule_trigger_type?: AuditLogRuleTriggerType;
|
||||
/**
|
||||
@@ -272,6 +281,7 @@ export interface APIAuditLogOptions {
|
||||
* - AUTO_MODERATION_BLOCK_MESSAGE
|
||||
* - AUTO_MODERATION_FLAG_TO_CHANNEL
|
||||
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
|
||||
* - AUTO_MODERATION_QUARANTINE_USER
|
||||
*/
|
||||
channel_id?: Snowflake;
|
||||
|
||||
@@ -325,7 +335,7 @@ export interface APIAuditLogOptions {
|
||||
* - CHANNEL_OVERWRITE_UPDATE
|
||||
* - CHANNEL_OVERWRITE_DELETE
|
||||
*
|
||||
* **Present only if the {@link APIAuditLogOptions.type | entry type} is "0"**
|
||||
* **Present only if the {@link APIAuditLogOptions."type" | entry type} is "0"**
|
||||
*/
|
||||
role_name?: string;
|
||||
|
||||
@@ -337,6 +347,13 @@ export interface APIAuditLogOptions {
|
||||
* - MEMBER_ROLE_UPDATE
|
||||
*/
|
||||
integration_type?: APIGuildIntegrationType;
|
||||
/**
|
||||
* ID of the app whose permissions were targeted
|
||||
*
|
||||
* Present from:
|
||||
* - APPLICATION_COMMAND_PERMISSION_UPDATE
|
||||
*/
|
||||
application_id?: Snowflake;
|
||||
}
|
||||
|
||||
export enum AuditLogOptionsType {
|
||||
@@ -418,7 +435,9 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyRateLimitPerUser
|
||||
| APIAuditLogChangeKeyRecurrenceRule
|
||||
| APIAuditLogChangeKeyRegion
|
||||
| APIAuditLogChangeKeyRTCRegion
|
||||
| APIAuditLogChangeKeyRulesChannelId
|
||||
| APIAuditLogChangeKeySafetyAlertsChannelId
|
||||
| APIAuditLogChangeKeySoundId
|
||||
| APIAuditLogChangeKeySplashHash
|
||||
| APIAuditLogChangeKeyStatus
|
||||
@@ -435,6 +454,7 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyUses
|
||||
| APIAuditLogChangeKeyVanityURLCode
|
||||
| APIAuditLogChangeKeyVerificationLevel
|
||||
| APIAuditLogChangeKeyVideoQualityMode
|
||||
| APIAuditLogChangeKeyVolume
|
||||
| APIAuditLogChangeKeyWidgetChannelId
|
||||
| APIAuditLogChangeKeyWidgetEnabled;
|
||||
@@ -484,6 +504,11 @@ export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snow
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's rtc_region is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRTCRegion = APIAuditLogChangeData<'rtc_region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's preferred_locale is changed
|
||||
*/
|
||||
@@ -524,6 +549,11 @@ export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', Gu
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's video_quality_mode is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVideoQualityMode = APIAuditLogChangeData<'video_quality_mode', VideoQualityMode>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's explicit_content_filter is changed
|
||||
*/
|
||||
|
||||
1575
deno/payloads/v10/channel.ts
generated
1575
deno/payloads/v10/channel.ts
generated
File diff suppressed because it is too large
Load Diff
31
deno/payloads/v10/emoji.ts
generated
31
deno/payloads/v10/emoji.ts
generated
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { _NonNullableFields } from '../../utils/internals.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
@@ -49,3 +50,33 @@ export interface APIEmoji extends APIPartialEmoji {
|
||||
*/
|
||||
available?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-applicationowned-emoji}
|
||||
*/
|
||||
export type APIApplicationEmoji = _NonNullableFields<Required<Pick<APIEmoji, 'animated' | 'id' | 'name' | 'user'>>> & {
|
||||
/**
|
||||
* Roles allowed to use this emoji.
|
||||
*
|
||||
* @remarks Always empty.
|
||||
*/
|
||||
roles: [];
|
||||
/**
|
||||
* Whether this emoji must be wrapped in colons.
|
||||
*
|
||||
* @remarks Always `true`.
|
||||
*/
|
||||
require_colons: true;
|
||||
/**
|
||||
* Whether this emoji is managed.
|
||||
*
|
||||
* @remarks Always `false`.
|
||||
*/
|
||||
managed: false;
|
||||
/**
|
||||
* Whether this emoji is available.
|
||||
*
|
||||
* @remarks Always `true`.
|
||||
*/
|
||||
available: true;
|
||||
};
|
||||
|
||||
103
deno/payloads/v10/gateway.ts
generated
103
deno/payloads/v10/gateway.ts
generated
@@ -60,9 +60,9 @@ export interface APIGatewaySessionStartLimit {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields}
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence}
|
||||
*/
|
||||
export interface GatewayPresenceUpdate {
|
||||
export interface GatewayGuildMembersChunkPresence {
|
||||
/**
|
||||
* The user presence is being updated for
|
||||
*
|
||||
@@ -72,10 +72,6 @@ export interface GatewayPresenceUpdate {
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
user: Partial<APIUser> & Pick<APIUser, 'id'>;
|
||||
/**
|
||||
* ID of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* Either "idle", "dnd", "online", or "offline"
|
||||
*/
|
||||
@@ -94,6 +90,16 @@ export interface GatewayPresenceUpdate {
|
||||
client_status?: GatewayPresenceClientStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields}
|
||||
*/
|
||||
export interface GatewayPresenceUpdate extends GatewayGuildMembersChunkPresence {
|
||||
/**
|
||||
* ID of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types}
|
||||
*/
|
||||
@@ -176,14 +182,28 @@ export interface GatewayActivity {
|
||||
* Application id for the game
|
||||
*/
|
||||
application_id?: Snowflake;
|
||||
/**
|
||||
* Controls which field is displayed in the user's status text in the member list
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
|
||||
*/
|
||||
status_display_type?: StatusDisplayType | null;
|
||||
/**
|
||||
* What the player is currently doing
|
||||
*/
|
||||
details?: string | null;
|
||||
/**
|
||||
* URL that is linked when clicking on the details text
|
||||
*/
|
||||
details_url?: string | null;
|
||||
/**
|
||||
* The user's current party status, or the text used for a custom status
|
||||
*/
|
||||
state?: string | null;
|
||||
/**
|
||||
* URL that is linked when clicking on the state text
|
||||
*/
|
||||
state_url?: string | null;
|
||||
/**
|
||||
* The emoji used for a custom status
|
||||
*
|
||||
@@ -274,6 +294,26 @@ export enum ActivityType {
|
||||
Competing,
|
||||
}
|
||||
|
||||
/**
|
||||
* Controls which field is used in the user's status message
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
|
||||
*/
|
||||
export enum StatusDisplayType {
|
||||
/**
|
||||
* Playing \{name\}
|
||||
*/
|
||||
Name,
|
||||
/**
|
||||
* Playing \{state\}
|
||||
*/
|
||||
State,
|
||||
/**
|
||||
* Playing \{details\}
|
||||
*/
|
||||
Details,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps}
|
||||
*/
|
||||
@@ -310,14 +350,57 @@ export interface GatewayActivityParty {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
|
||||
*/
|
||||
export type GatewayActivityAssets = Partial<
|
||||
Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>
|
||||
>;
|
||||
export interface GatewayActivityAssets {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
|
||||
*/
|
||||
large_image?: string;
|
||||
/**
|
||||
* Text displayed when hovering over the large image of the activity
|
||||
*/
|
||||
large_text?: string;
|
||||
/**
|
||||
* URL that is opened when clicking on the large image
|
||||
*/
|
||||
large_url?: string;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
|
||||
*/
|
||||
small_image?: string;
|
||||
/**
|
||||
* Text displayed when hovering over the small image of the activity
|
||||
*/
|
||||
small_text?: string;
|
||||
/**
|
||||
* URL that is opened when clicking on the small image
|
||||
*/
|
||||
small_url?: string;
|
||||
/**
|
||||
* Displayed as a banner on a Game Invite.
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image | Activity Asset Image}
|
||||
* @see {@link https://discord.com/developers/docs/discord-social-sdk/development-guides/managing-game-invites | Game Invite}
|
||||
*/
|
||||
invite_cover_image?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
|
||||
*/
|
||||
export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>;
|
||||
export interface GatewayActivitySecrets {
|
||||
/**
|
||||
* The secret for joining a party
|
||||
*/
|
||||
join?: string;
|
||||
/**
|
||||
* The secret for spectating a game
|
||||
*/
|
||||
spectate?: string;
|
||||
/**
|
||||
* The secret for a specific instance of a match
|
||||
*/
|
||||
match?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}
|
||||
|
||||
194
deno/payloads/v10/guild.ts
generated
194
deno/payloads/v10/guild.ts
generated
@@ -9,16 +9,19 @@ import type { PresenceUpdateReceiveStatus } from './gateway.ts';
|
||||
import type { OAuth2Scopes } from './oauth2.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APISticker } from './sticker.ts';
|
||||
import type { APIAvatarDecorationData, APIUser } from './user.ts';
|
||||
import type { APIAvatarDecorationData, APICollectibles, APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#unavailable-guild-object}
|
||||
*/
|
||||
export interface APIUnavailableGuild {
|
||||
export interface APIBaseGuild {
|
||||
/**
|
||||
* Guild id
|
||||
*/
|
||||
id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#unavailable-guild-object}
|
||||
*/
|
||||
export interface APIUnavailableGuild extends APIBaseGuild {
|
||||
/**
|
||||
* `true` if this guild is unavailable due to an outage
|
||||
*/
|
||||
@@ -28,7 +31,7 @@ export interface APIUnavailableGuild {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure}
|
||||
*/
|
||||
export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'>, Pick<APIGuild, 'welcome_screen'> {
|
||||
export interface APIPartialGuild extends APIBaseGuild {
|
||||
/**
|
||||
* Guild name (2-100 characters, excluding trailing and leading whitespace)
|
||||
*/
|
||||
@@ -71,8 +74,19 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
|
||||
* The vanity url code for the guild
|
||||
*/
|
||||
vanity_url_code?: string | null;
|
||||
/**
|
||||
* The welcome screen of a Community guild, shown to new members
|
||||
*
|
||||
* Returned in the invite object
|
||||
*/
|
||||
welcome_screen?: APIGuildWelcomeScreen;
|
||||
}
|
||||
|
||||
/**
|
||||
* Source guild of channel follower webhooks.
|
||||
*/
|
||||
export type APIWebhookSourceGuild = Pick<APIPartialGuild, 'icon' | 'id' | 'name'>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure}
|
||||
*/
|
||||
@@ -113,7 +127,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
|
||||
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
|
||||
*/
|
||||
region: string;
|
||||
region?: string | null;
|
||||
/**
|
||||
* ID of afk channel
|
||||
*/
|
||||
@@ -223,7 +237,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
*/
|
||||
premium_subscription_count?: number;
|
||||
/**
|
||||
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
|
||||
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
|
||||
*
|
||||
* @defaultValue `"en-US"`
|
||||
*/
|
||||
@@ -250,12 +264,6 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`
|
||||
*/
|
||||
approximate_presence_count?: number;
|
||||
/**
|
||||
* The welcome screen of a Community guild, shown to new members
|
||||
*
|
||||
* Returned in the invite object
|
||||
*/
|
||||
welcome_screen?: APIGuildWelcomeScreen;
|
||||
/**
|
||||
* The nsfw level of the guild
|
||||
*
|
||||
@@ -267,7 +275,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
|
||||
*/
|
||||
stickers: APISticker[];
|
||||
stickers?: APISticker[];
|
||||
/**
|
||||
* Whether the guild has the boost progress bar enabled.
|
||||
*/
|
||||
@@ -291,7 +299,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
*/
|
||||
export interface APIPartialInteractionGuild extends Pick<APIGuild, 'features' | 'id'> {
|
||||
/**
|
||||
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
|
||||
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
|
||||
*
|
||||
* @unstable https://github.com/discord/discord-api-docs/issues/6938
|
||||
* @defaultValue `"en-US"`
|
||||
@@ -557,6 +565,24 @@ export enum GuildFeature {
|
||||
* Guild has enabled the welcome screen
|
||||
*/
|
||||
WelcomeScreenEnabled = 'WELCOME_SCREEN_ENABLED',
|
||||
/**
|
||||
* Guild has access to set guild tags
|
||||
*/
|
||||
GuildTags = 'GUILD_TAGS',
|
||||
/**
|
||||
* Guild is able to set gradient colors to roles
|
||||
*/
|
||||
EnhancedRoleColors = 'ENHANCED_ROLE_COLORS',
|
||||
/**
|
||||
* Guild has access to guest invites
|
||||
*/
|
||||
GuestsEnabled = 'GUESTS_ENABLED',
|
||||
/**
|
||||
* Guild has migrated to the new pin messages permission
|
||||
*
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
PinPermissionMigrationComplete = 'PIN_PERMISSION_MIGRATION_COMPLETE',
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -612,7 +638,7 @@ export interface APIGuildPreview {
|
||||
/**
|
||||
* The description for the guild
|
||||
*/
|
||||
description: string;
|
||||
description: string | null;
|
||||
/**
|
||||
* Custom guild stickers
|
||||
*/
|
||||
@@ -636,55 +662,23 @@ export interface APIGuildWidgetSettings {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMember {
|
||||
/**
|
||||
* The user this guild member represents
|
||||
*
|
||||
* **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.**
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
user: APIUser;
|
||||
export interface APIBaseGuildMember {
|
||||
/**
|
||||
* This users guild nickname
|
||||
*/
|
||||
nick?: string | null;
|
||||
/**
|
||||
* The member's guild avatar hash
|
||||
*/
|
||||
avatar?: string | null;
|
||||
/**
|
||||
* The member's guild banner hash
|
||||
*/
|
||||
banner?: string | null;
|
||||
/**
|
||||
* Array of role object ids
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object}
|
||||
*/
|
||||
roles: Snowflake[];
|
||||
/**
|
||||
* When the user joined the guild
|
||||
*/
|
||||
joined_at: string;
|
||||
/**
|
||||
* When the user started boosting the guild
|
||||
*
|
||||
* @see {@link https://support.discord.com/hc/articles/360028038352}
|
||||
*/
|
||||
premium_since?: string | null;
|
||||
/**
|
||||
* Whether the user is deafened in voice channels
|
||||
*/
|
||||
deaf: boolean;
|
||||
/**
|
||||
* Whether the user is muted in voice channels
|
||||
*/
|
||||
mute: boolean;
|
||||
/**
|
||||
* Guild member flags represented as a bit set, defaults to `0`
|
||||
*/
|
||||
flags: GuildMemberFlags;
|
||||
/**
|
||||
* Whether the user has not yet passed the guild's Membership Screening requirements
|
||||
*
|
||||
@@ -701,8 +695,90 @@ export interface APIGuildMember {
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
|
||||
*/
|
||||
avatar_decoration_data?: APIAvatarDecorationData | null;
|
||||
/**
|
||||
* The data for the member's collectibles
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
|
||||
*/
|
||||
collectibles?: APICollectibles | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIFlaggedGuildMember {
|
||||
/**
|
||||
* Guild member flags represented as a bit set
|
||||
*
|
||||
* @defaultValue `0`
|
||||
*/
|
||||
flags: GuildMemberFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMemberJoined {
|
||||
/**
|
||||
* When the user joined the guild
|
||||
*/
|
||||
joined_at: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMemberAvatar {
|
||||
/**
|
||||
* The member's guild avatar hash
|
||||
*/
|
||||
avatar?: string | null;
|
||||
/**
|
||||
* The member's guild banner hash
|
||||
*/
|
||||
banner?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIBaseVoiceGuildMember {
|
||||
/**
|
||||
* Whether the user is deafened in voice channels
|
||||
*/
|
||||
deaf: boolean;
|
||||
/**
|
||||
* Whether the user is muted in voice channels
|
||||
*/
|
||||
mute: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMemberUser {
|
||||
/**
|
||||
* The user this guild member represents
|
||||
*
|
||||
* **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.**
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMember
|
||||
extends
|
||||
APIBaseGuildMember,
|
||||
APIBaseVoiceGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
APIGuildMemberJoined,
|
||||
APIGuildMemberUser {}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
|
||||
*/
|
||||
@@ -748,6 +824,10 @@ export enum GuildMemberFlags {
|
||||
* Member has dismissed the DM settings upsell
|
||||
*/
|
||||
DmSettingsUpsellAcknowledged = 1 << 9,
|
||||
/**
|
||||
* Member's guild tag is blocked by AutoMod
|
||||
*/
|
||||
AutoModQuarantinedGuildTag = 1 << 10,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1007,6 +1087,9 @@ export interface APIGuildWelcomeScreenChannel {
|
||||
emoji_name: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable https://github.com/discord/discord-api-docs/pull/2547
|
||||
*/
|
||||
export interface APIGuildMembershipScreening {
|
||||
/**
|
||||
* When the fields were last updated
|
||||
@@ -1022,8 +1105,9 @@ export interface APIGuildMembershipScreening {
|
||||
description: string | null;
|
||||
}
|
||||
|
||||
// TODO: make this a union based on the type in the future, when new types are added
|
||||
|
||||
/**
|
||||
* @unstable https://github.com/discord/discord-api-docs/pull/2547
|
||||
*/
|
||||
export interface APIGuildMembershipScreeningField {
|
||||
/**
|
||||
* The type of field
|
||||
@@ -1043,6 +1127,9 @@ export interface APIGuildMembershipScreeningField {
|
||||
required: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable https://github.com/discord/discord-api-docs/pull/2547
|
||||
*/
|
||||
export enum MembershipScreeningFieldType {
|
||||
/**
|
||||
* Server Rules
|
||||
@@ -1163,6 +1250,9 @@ export enum GuildOnboardingPromptType {
|
||||
Dropdown,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#incidents-data-object}
|
||||
*/
|
||||
export interface APIIncidentsData {
|
||||
/**
|
||||
* When invites get enabled again
|
||||
|
||||
6
deno/payloads/v10/guildScheduledEvent.ts
generated
6
deno/payloads/v10/guildScheduledEvent.ts
generated
@@ -181,8 +181,7 @@ export interface APIGuildScheduledEventRecurrenceRuleNWeekday {
|
||||
*/
|
||||
export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday;
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
@@ -192,8 +191,7 @@ export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
export interface APIExternalGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
channel_id: null;
|
||||
entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
|
||||
}
|
||||
|
||||
10
deno/payloads/v10/interactions.ts
generated
10
deno/payloads/v10/interactions.ts
generated
@@ -21,11 +21,11 @@ import type {
|
||||
import type { APIPingInteraction } from './_interactions/ping.ts';
|
||||
|
||||
export * from './_interactions/applicationCommands.ts';
|
||||
export * from './_interactions/autocomplete.ts';
|
||||
export * from './_interactions/base.ts';
|
||||
export * from './_interactions/messageComponents.ts';
|
||||
export * from './_interactions/modalSubmit.ts';
|
||||
export * from './_interactions/ping.ts';
|
||||
export type * from './_interactions/autocomplete.ts';
|
||||
export type * from './_interactions/base.ts';
|
||||
export type * from './_interactions/messageComponents.ts';
|
||||
export type * from './_interactions/modalSubmit.ts';
|
||||
export type * from './_interactions/ping.ts';
|
||||
export * from './_interactions/responses.ts';
|
||||
|
||||
/**
|
||||
|
||||
26
deno/payloads/v10/invite.ts
generated
26
deno/payloads/v10/invite.ts
generated
@@ -3,10 +3,9 @@
|
||||
*/
|
||||
|
||||
import type { APIApplication } from './application.ts';
|
||||
import type { APIPartialChannel } from './channel.ts';
|
||||
import type { APIInviteChannel } from './channel.ts';
|
||||
import type { APIGuild } from './guild.ts';
|
||||
import type { APIGuildScheduledEvent } from './guildScheduledEvent.ts';
|
||||
import type { APIInviteStageInstance } from './stageInstance.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
export type APIInviteGuild = Pick<
|
||||
@@ -43,7 +42,7 @@ export interface APIInvite {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object}
|
||||
*/
|
||||
channel: Required<APIPartialChannel> | null;
|
||||
channel: APIInviteChannel | null;
|
||||
/**
|
||||
* The user who created the invite
|
||||
*
|
||||
@@ -77,16 +76,16 @@ export interface APIInvite {
|
||||
*/
|
||||
approximate_member_count?: number;
|
||||
/**
|
||||
* The expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true`
|
||||
* The expiration date of this invite
|
||||
*/
|
||||
expires_at?: string | null;
|
||||
expires_at: string | null;
|
||||
/**
|
||||
* The stage instance data if there is a public stage instance in the stage channel this invite is for
|
||||
*
|
||||
* @deprecated
|
||||
* {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479}
|
||||
* @deprecated This has been removed from the documentation.
|
||||
* {@link https://github.com/discord/discord-api-docs/pull/7779 | discord-api-docs#7779}
|
||||
*/
|
||||
stage_instance?: APIInviteStageInstance;
|
||||
stage_instance?: never;
|
||||
/**
|
||||
* The guild scheduled event data, returned from the `GET /invites/<code>` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id
|
||||
*/
|
||||
@@ -95,6 +94,17 @@ export interface APIInvite {
|
||||
* The invite type
|
||||
*/
|
||||
type: InviteType;
|
||||
/**
|
||||
* The flags of the invite
|
||||
*/
|
||||
flags?: InviteFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object-guild-invite-flags}
|
||||
*/
|
||||
export enum InviteFlags {
|
||||
IsGuestInvite = 1 << 0,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
2347
deno/payloads/v10/message.ts
generated
Normal file
2347
deno/payloads/v10/message.ts
generated
Normal file
File diff suppressed because it is too large
Load Diff
9
deno/payloads/v10/mod.ts
generated
9
deno/payloads/v10/mod.ts
generated
@@ -3,21 +3,22 @@ export * from './application.ts';
|
||||
export * from './auditLog.ts';
|
||||
export * from './autoModeration.ts';
|
||||
export * from './channel.ts';
|
||||
export * from './emoji.ts';
|
||||
export type * from './emoji.ts';
|
||||
export * from './gateway.ts';
|
||||
export * from './guild.ts';
|
||||
export * from './guildScheduledEvent.ts';
|
||||
export * from './interactions.ts';
|
||||
export * from './invite.ts';
|
||||
export * from './message.ts';
|
||||
export * from './monetization.ts';
|
||||
export * from './oauth2.ts';
|
||||
export * from './permissions.ts';
|
||||
export * from './poll.ts';
|
||||
export * from './soundboard.ts';
|
||||
export type * from './soundboard.ts';
|
||||
export * from './stageInstance.ts';
|
||||
export * from './sticker.ts';
|
||||
export * from './teams.ts';
|
||||
export * from './template.ts';
|
||||
export type * from './template.ts';
|
||||
export * from './user.ts';
|
||||
export * from './voice.ts';
|
||||
export type * from './voice.ts';
|
||||
export * from './webhook.ts';
|
||||
|
||||
27
deno/payloads/v10/permissions.ts
generated
27
deno/payloads/v10/permissions.ts
generated
@@ -18,8 +18,15 @@ export interface APIRole {
|
||||
name: string;
|
||||
/**
|
||||
* Integer representation of hexadecimal color code
|
||||
*
|
||||
* @deprecated Use `colors` instead.
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color: number;
|
||||
/**
|
||||
* The role's colors
|
||||
*/
|
||||
colors: APIRoleColors;
|
||||
/**
|
||||
* If this role is pinned in the user listing
|
||||
*/
|
||||
@@ -99,3 +106,23 @@ export enum RoleFlags {
|
||||
*/
|
||||
InPrompt = 1 << 0,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions#role-colors-object}
|
||||
*/
|
||||
export interface APIRoleColors {
|
||||
/**
|
||||
* The primary color for the role
|
||||
*/
|
||||
primary_color: number;
|
||||
/**
|
||||
* The secondary color for the role, this will make the role a gradient between the other provided colors
|
||||
*/
|
||||
secondary_color: number | null;
|
||||
/**
|
||||
* The tertiary color for the role, this will turn the gradient into a holographic style
|
||||
*
|
||||
* @remarks When sending `tertiary_color` the API enforces the role color to be a holographic style with values of `primary_color = 11127295`, `secondary_color = 16759788`, and `tertiary_color = 16761760`.
|
||||
*/
|
||||
tertiary_color: number | null;
|
||||
}
|
||||
|
||||
49
deno/payloads/v10/poll.ts
generated
49
deno/payloads/v10/poll.ts
generated
@@ -4,22 +4,14 @@
|
||||
|
||||
import type { APIPartialEmoji } from './emoji.ts';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure}
|
||||
*/
|
||||
export interface APIPoll {
|
||||
export interface APIBasePoll {
|
||||
/**
|
||||
* The question of the poll
|
||||
*/
|
||||
question: APIPollMedia;
|
||||
/**
|
||||
* Each of the answers available in the poll, up to 10
|
||||
*/
|
||||
answers: APIPollAnswer[];
|
||||
/**
|
||||
* The time when the poll ends (IS08601 timestamp)
|
||||
*/
|
||||
expiry: string;
|
||||
}
|
||||
|
||||
export interface APIPollDefaults {
|
||||
/**
|
||||
* Whether a user can select multiple answers
|
||||
*
|
||||
@@ -32,6 +24,20 @@ export interface APIPoll {
|
||||
* @defaultValue `PollLayoutType.Default`
|
||||
*/
|
||||
layout_type: PollLayoutType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure}
|
||||
*/
|
||||
export interface APIPoll extends APIBasePoll, APIPollDefaults {
|
||||
/**
|
||||
* Each of the answers available in the poll, up to 10
|
||||
*/
|
||||
answers: APIPollAnswer[];
|
||||
/**
|
||||
* The time when the poll ends (IS08601 timestamp)
|
||||
*/
|
||||
expiry: string | null;
|
||||
/**
|
||||
* The results of the poll
|
||||
*/
|
||||
@@ -64,20 +70,23 @@ export interface APIPollMedia {
|
||||
emoji?: APIPartialEmoji;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure}
|
||||
*/
|
||||
export interface APIPollAnswer {
|
||||
/**
|
||||
* The ID of the answer. Starts at `1` for the first answer and goes up sequentially
|
||||
*/
|
||||
answer_id: number;
|
||||
export interface APIBasePollAnswer {
|
||||
/**
|
||||
* The data of the answer
|
||||
*/
|
||||
poll_media: APIPollMedia;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure}
|
||||
*/
|
||||
export interface APIPollAnswer extends APIBasePollAnswer {
|
||||
/**
|
||||
* The ID of the answer. Starts at `1` for the first answer and goes up sequentially
|
||||
*/
|
||||
answer_id: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/poll#poll-results-object-poll-results-object-structure}
|
||||
*/
|
||||
|
||||
94
deno/payloads/v10/user.ts
generated
94
deno/payloads/v10/user.ts
generated
@@ -22,7 +22,7 @@ export interface APIUser {
|
||||
*/
|
||||
discriminator: string;
|
||||
/**
|
||||
* The user's display name, if it is set. For bots, this is the application name
|
||||
* The user's display name, if it is set
|
||||
*/
|
||||
global_name: string | null;
|
||||
/**
|
||||
@@ -96,6 +96,18 @@ export interface APIUser {
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
|
||||
*/
|
||||
avatar_decoration_data?: APIAvatarDecorationData | null;
|
||||
/**
|
||||
* The data for the user's collectibles
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
|
||||
*/
|
||||
collectibles?: APICollectibles | null;
|
||||
/**
|
||||
* The user's primary guild
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
|
||||
*/
|
||||
primary_guild?: APIUserPrimaryGuild | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -182,6 +194,8 @@ export enum UserFlags {
|
||||
DisablePremium = 1 << 21,
|
||||
/**
|
||||
* User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer}
|
||||
*
|
||||
* @deprecated This user flag is no longer available. See {@link https://support-dev.discord.com/hc/articles/10113997751447-Active-Developer-Badge} for more information.
|
||||
*/
|
||||
ActiveDeveloper = 1 << 22,
|
||||
/**
|
||||
@@ -348,3 +362,81 @@ export interface APIAvatarDecorationData {
|
||||
*/
|
||||
sku_id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* The collectibles the user has, excluding Avatar Decorations and Profile Effects.
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
|
||||
*/
|
||||
export interface APICollectibles {
|
||||
/**
|
||||
* Object mapping of {@link APINameplateData}
|
||||
*/
|
||||
nameplate?: APINameplateData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#nameplate}
|
||||
*/
|
||||
export interface APINameplateData {
|
||||
/**
|
||||
* ID of the nameplate SKU
|
||||
*/
|
||||
sku_id: Snowflake;
|
||||
/**
|
||||
* Path to the nameplate asset
|
||||
*
|
||||
* @example `nameplates/nameplates/twilight/`
|
||||
*/
|
||||
asset: string;
|
||||
/**
|
||||
* The label of this nameplate. Currently unused
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Background color of the nameplate
|
||||
*/
|
||||
palette: NameplatePalette;
|
||||
}
|
||||
|
||||
/**
|
||||
* Background color of a nameplate.
|
||||
*/
|
||||
export enum NameplatePalette {
|
||||
Berry = 'berry',
|
||||
BubbleGum = 'bubble_gum',
|
||||
Clover = 'clover',
|
||||
Cobalt = 'cobalt',
|
||||
Crimson = 'crimson',
|
||||
Forest = 'forest',
|
||||
Lemon = 'lemon',
|
||||
Sky = 'sky',
|
||||
Teal = 'teal',
|
||||
Violet = 'violet',
|
||||
White = 'white',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
|
||||
*/
|
||||
export interface APIUserPrimaryGuild {
|
||||
/**
|
||||
* The id of the user's primary guild
|
||||
*/
|
||||
identity_guild_id: Snowflake | null;
|
||||
/**
|
||||
* Whether the user is displaying the primary guild's server tag.
|
||||
* This can be `null` if the system clears the identity, e.g. because the server no longer supports tags
|
||||
*/
|
||||
identity_enabled: boolean | null;
|
||||
/**
|
||||
* The text of the user's server tag. Limited to 4 characters
|
||||
*/
|
||||
tag: string | null;
|
||||
/**
|
||||
* The server tag badge hash
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
badge: string | null;
|
||||
}
|
||||
|
||||
17
deno/payloads/v10/voice.ts
generated
17
deno/payloads/v10/voice.ts
generated
@@ -14,11 +14,7 @@ export type GatewayVoiceState = APIVoiceState;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
|
||||
*/
|
||||
export interface APIVoiceState {
|
||||
/**
|
||||
* The guild id this voice state is for
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
export interface APIBaseVoiceState {
|
||||
/**
|
||||
* The channel id this user is connected to
|
||||
*/
|
||||
@@ -30,6 +26,7 @@ export interface APIVoiceState {
|
||||
/**
|
||||
* The guild member this voice state is for
|
||||
*
|
||||
* @remarks The member field will have `joined_at` set to `null` if the member was invited as a guest.
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
@@ -71,6 +68,16 @@ export interface APIVoiceState {
|
||||
request_to_speak_timestamp: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
|
||||
*/
|
||||
export interface APIVoiceState extends APIBaseVoiceState {
|
||||
/**
|
||||
* The guild id this voice state is for
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
|
||||
*/
|
||||
|
||||
41
deno/payloads/v10/webhook.ts
generated
41
deno/payloads/v10/webhook.ts
generated
@@ -6,11 +6,11 @@ import type { Snowflake } from '../../globals.ts';
|
||||
import type {
|
||||
APIEntitlement,
|
||||
APIGuild,
|
||||
APIPartialChannel,
|
||||
APIPartialGuild,
|
||||
APIUser,
|
||||
APIWebhookSourceGuild,
|
||||
ApplicationIntegrationType,
|
||||
OAuth2Scopes,
|
||||
APIWebhookSourceChannel,
|
||||
} from './mod.ts';
|
||||
|
||||
/**
|
||||
@@ -30,11 +30,11 @@ export interface APIWebhook {
|
||||
/**
|
||||
* The guild id this webhook is for
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
guild_id?: Snowflake | null;
|
||||
/**
|
||||
* The channel id this webhook is for
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
channel_id: Snowflake | null;
|
||||
/**
|
||||
* The user this webhook was created by (not returned when getting a webhook with its token)
|
||||
*
|
||||
@@ -60,11 +60,11 @@ export interface APIWebhook {
|
||||
/**
|
||||
* The guild of the channel that this webhook is following (returned for Channel Follower Webhooks)
|
||||
*/
|
||||
source_guild?: APIPartialGuild;
|
||||
source_guild?: APIWebhookSourceGuild;
|
||||
/**
|
||||
* The channel that this webhook is following (returned for Channel Follower Webhooks)
|
||||
*/
|
||||
source_channel?: APIPartialChannel;
|
||||
source_channel?: APIWebhookSourceChannel;
|
||||
/**
|
||||
* The url used for executing the webhook (returned by the webhooks OAuth2 flow)
|
||||
*/
|
||||
@@ -86,7 +86,13 @@ export type APIWebhookEventBody =
|
||||
ApplicationWebhookEventType.ApplicationAuthorized,
|
||||
APIWebhookEventApplicationAuthorizedData
|
||||
>
|
||||
| APIWebhookEventEventBase<
|
||||
ApplicationWebhookEventType.ApplicationDeauthorized,
|
||||
APIWebhookEventApplicationDeauthorizedData
|
||||
>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementCreate, APIWebhookEventEntitlementCreateData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementDelete, APIWebhookEventEntitlementDeleteData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementUpdate, APIWebhookEventEntitlementUpdateData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.QuestUserEnrollment, APIWebhookEventQuestUserEnrollmentData>;
|
||||
|
||||
export interface APIWebhookEventApplicationAuthorizedData {
|
||||
@@ -108,8 +114,19 @@ export interface APIWebhookEventApplicationAuthorizedData {
|
||||
guild?: APIGuild;
|
||||
}
|
||||
|
||||
export interface APIWebhookEventApplicationDeauthorizedData {
|
||||
/**
|
||||
* User who deauthorized the app
|
||||
*/
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventQuestUserEnrollmentData = never;
|
||||
|
||||
export interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
|
||||
@@ -168,10 +185,22 @@ export enum ApplicationWebhookEventType {
|
||||
* Sent when an app was authorized by a user to a server or their account
|
||||
*/
|
||||
ApplicationAuthorized = 'APPLICATION_AUTHORIZED',
|
||||
/**
|
||||
* Sent when an app was deauthorized by a user
|
||||
*/
|
||||
ApplicationDeauthorized = 'APPLICATION_DEAUTHORIZED',
|
||||
/**
|
||||
* Entitlement was created
|
||||
*/
|
||||
EntitlementCreate = 'ENTITLEMENT_CREATE',
|
||||
/**
|
||||
* Entitlement was updated
|
||||
*/
|
||||
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
|
||||
/**
|
||||
* Entitlement was deleted
|
||||
*/
|
||||
EntitlementDelete = 'ENTITLEMENT_DELETE',
|
||||
/**
|
||||
* User was added to a Quest (currently unavailable)
|
||||
*/
|
||||
|
||||
@@ -3,9 +3,8 @@ import type { ChannelType } from '../../../channel.ts';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandChannelOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>[];
|
||||
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory>[];
|
||||
}
|
||||
|
||||
export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export 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.
|
||||
*/
|
||||
@@ -23,10 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption<Type extends InteractionType = InteractionType>
|
||||
extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Integer,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Integer,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export 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.
|
||||
*/
|
||||
@@ -23,10 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataNumberOption<Type extends InteractionType = InteractionType>
|
||||
extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Number,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
export interface APIApplicationCommandInteractionDataNumberOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Number,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export 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`).
|
||||
*/
|
||||
@@ -22,7 +21,9 @@ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithA
|
||||
APIApplicationCommandOptionChoice<string>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataStringOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
|
||||
export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.String,
|
||||
string
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@ import type { APIApplicationCommandBasicOption, APIApplicationCommandInteraction
|
||||
import type { APIApplicationCommandOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandSubcommandOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
options?: APIApplicationCommandBasicOption[];
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
APIApplicationCommandSubcommandOption,
|
||||
} from './subcommand.ts';
|
||||
|
||||
export interface APIApplicationCommandSubcommandGroupOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
options?: APIApplicationCommandSubcommandOption[];
|
||||
}
|
||||
|
||||
|
||||
@@ -47,19 +47,19 @@ import type {
|
||||
} from './_chatInput/user.ts';
|
||||
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
|
||||
export * from './_chatInput/attachment.ts';
|
||||
export * from './_chatInput/base.ts';
|
||||
export * from './_chatInput/boolean.ts';
|
||||
export * from './_chatInput/channel.ts';
|
||||
export * from './_chatInput/integer.ts';
|
||||
export * from './_chatInput/mentionable.ts';
|
||||
export * from './_chatInput/number.ts';
|
||||
export * from './_chatInput/role.ts';
|
||||
export type * from './_chatInput/attachment.ts';
|
||||
export type * from './_chatInput/base.ts';
|
||||
export type * from './_chatInput/boolean.ts';
|
||||
export type * from './_chatInput/channel.ts';
|
||||
export type * from './_chatInput/integer.ts';
|
||||
export type * from './_chatInput/mentionable.ts';
|
||||
export type * from './_chatInput/number.ts';
|
||||
export type * from './_chatInput/role.ts';
|
||||
export * from './_chatInput/shared.ts';
|
||||
export * from './_chatInput/string.ts';
|
||||
export * from './_chatInput/subcommand.ts';
|
||||
export * from './_chatInput/subcommandGroup.ts';
|
||||
export * from './_chatInput/user.ts';
|
||||
export type * from './_chatInput/string.ts';
|
||||
export type * from './_chatInput/subcommand.ts';
|
||||
export type * from './_chatInput/subcommandGroup.ts';
|
||||
export type * from './_chatInput/user.ts';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure}
|
||||
@@ -105,8 +105,7 @@ export type APIApplicationCommandInteractionDataBasicOption<Type extends Interac
|
||||
/**
|
||||
* @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<InteractionType.ApplicationCommand>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
@@ -114,8 +113,7 @@ export interface APIChatInputApplicationCommandInteractionData
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIAutocompleteApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Snowflake } from '../../../../globals.ts';
|
||||
import type { APIMessage } from '../../channel.ts';
|
||||
import type { APIMessage } from '../../message.ts';
|
||||
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper, APIUserInteractionDataResolved } from '../base.ts';
|
||||
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
@@ -7,8 +7,7 @@ import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
/**
|
||||
* @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;
|
||||
resolved: APIUserInteractionDataResolved;
|
||||
}
|
||||
@@ -16,8 +15,7 @@ export interface APIUserApplicationCommandInteractionData
|
||||
/**
|
||||
* @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;
|
||||
resolved: APIMessageApplicationCommandInteractionDataResolved;
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@ import type { APIBaseInteraction } from './base.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
|
||||
export * from './_applicationCommands/chatInput.ts';
|
||||
export * from './_applicationCommands/contextMenu.ts';
|
||||
export type * from './_applicationCommands/contextMenu.ts';
|
||||
export * from './_applicationCommands/permissions.ts';
|
||||
export * from './_applicationCommands/entryPoint.ts';
|
||||
export * from './_applicationCommands/internals.ts';
|
||||
export type * from './_applicationCommands/entryPoint.ts';
|
||||
export type * from './_applicationCommands/internals.ts';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object}
|
||||
@@ -95,15 +95,19 @@ export interface APIApplicationCommand {
|
||||
*/
|
||||
default_permission?: boolean;
|
||||
/**
|
||||
* Indicates whether the command is age-restricted, defaults to `false`
|
||||
* Indicates whether the command is age-restricted
|
||||
*/
|
||||
nsfw?: boolean;
|
||||
/**
|
||||
* Installation context(s) where the command is available, only for globally-scoped commands. Defaults to `GUILD_INSTALL ([0])`
|
||||
* 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. By default, all interaction context types included for new commands `[0,1,2]`.
|
||||
* Interaction context(s) where the command can be used, only for globally-scoped commands
|
||||
*
|
||||
* @defaultValue `[InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel]`
|
||||
*/
|
||||
contexts?: InteractionContextType[] | null;
|
||||
/**
|
||||
|
||||
27
deno/payloads/v9/_interactions/base.ts
generated
27
deno/payloads/v9/_interactions/base.ts
generated
@@ -1,15 +1,15 @@
|
||||
import type { Permissions, Snowflake } from '../../../globals.ts';
|
||||
import type { APIRole, ApplicationIntegrationType, InteractionContextType, Locale } from '../../../v9.ts';
|
||||
import type { APIChannel, APIPartialChannel, APIThreadChannel, ChannelType, ThreadChannelType } from '../channel.ts';
|
||||
import type {
|
||||
APIAttachment,
|
||||
APIChannel,
|
||||
APIMessage,
|
||||
APIPartialChannel,
|
||||
APIThreadChannel,
|
||||
ChannelType,
|
||||
ThreadChannelType,
|
||||
} from '../channel.ts';
|
||||
import type { APIGuildMember, APIPartialInteractionGuild } from '../guild.ts';
|
||||
APIBaseGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
APIGuildMemberJoined,
|
||||
APIPartialInteractionGuild,
|
||||
} from '../guild.ts';
|
||||
import type { APIAttachment, APIMessage } from '../message.ts';
|
||||
import type { APIEntitlement } from '../monetization.ts';
|
||||
import type { APIUser } from '../user.ts';
|
||||
import type { InteractionType } from './responses.ts';
|
||||
@@ -51,8 +51,7 @@ export interface APIBaseInteractionMetadata<Type extends InteractionType> {
|
||||
/**
|
||||
* @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> {
|
||||
export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
|
||||
/**
|
||||
* The user the command was run on, present only on user commands interactions
|
||||
*/
|
||||
@@ -67,8 +66,7 @@ export interface APIApplicationCommandInteractionMetadata
|
||||
/**
|
||||
* @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> {
|
||||
export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
|
||||
/**
|
||||
* ID of the message that contained the interactive component
|
||||
*/
|
||||
@@ -256,7 +254,8 @@ export type APIInteractionDataResolvedChannel =
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
|
||||
17
deno/payloads/v9/_interactions/messageComponents.ts
generated
17
deno/payloads/v9/_interactions/messageComponents.ts
generated
@@ -1,6 +1,6 @@
|
||||
import type { Snowflake } from '../../../globals.ts';
|
||||
import type { ComponentType } from '../channel.ts';
|
||||
import type { APIBaseInteraction, InteractionType } from '../interactions.ts';
|
||||
import type { ComponentType } from '../message.ts';
|
||||
import type {
|
||||
APIDMInteractionWrapper,
|
||||
APIGuildInteractionWrapper,
|
||||
@@ -56,31 +56,26 @@ export interface APIMessageComponentBaseInteractionData<CType extends ComponentT
|
||||
|
||||
export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>;
|
||||
|
||||
export interface APIMessageStringSelectInteractionData
|
||||
extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> {
|
||||
export interface APIMessageStringSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.StringSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIMessageUserSelectInteractionData
|
||||
extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> {
|
||||
export interface APIMessageUserSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.UserSelect> {
|
||||
values: Snowflake[];
|
||||
resolved: APIUserInteractionDataResolved;
|
||||
}
|
||||
|
||||
export interface APIMessageRoleSelectInteractionData
|
||||
extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> {
|
||||
export interface APIMessageRoleSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.RoleSelect> {
|
||||
values: Snowflake[];
|
||||
resolved: Required<Pick<APIInteractionDataResolved, 'roles'>>;
|
||||
}
|
||||
|
||||
export interface APIMessageMentionableSelectInteractionData
|
||||
extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> {
|
||||
export interface APIMessageMentionableSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.MentionableSelect> {
|
||||
values: Snowflake[];
|
||||
resolved: Pick<APIInteractionDataResolved, 'members' | 'roles' | 'users'>;
|
||||
}
|
||||
|
||||
export interface APIMessageChannelSelectInteractionData
|
||||
extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> {
|
||||
export interface APIMessageChannelSelectInteractionData extends APIMessageComponentBaseInteractionData<ComponentType.ChannelSelect> {
|
||||
values: Snowflake[];
|
||||
resolved: Required<Pick<APIInteractionDataResolved, 'channels'>>;
|
||||
}
|
||||
|
||||
81
deno/payloads/v9/_interactions/modalSubmit.ts
generated
81
deno/payloads/v9/_interactions/modalSubmit.ts
generated
@@ -1,27 +1,94 @@
|
||||
import type { APIActionRowComponent, APIComponentInModalActionRow } from '../channel.ts';
|
||||
import type {
|
||||
APIBaseInteraction,
|
||||
APIDMInteractionWrapper,
|
||||
APIGuildInteractionWrapper,
|
||||
APIInteractionDataResolved,
|
||||
ComponentType,
|
||||
InteractionType,
|
||||
} from '../mod.ts';
|
||||
import type { APIBaseComponent } from '../message.ts';
|
||||
|
||||
export interface ModalSubmitComponent {
|
||||
type: ComponentType;
|
||||
export interface APIBaseModalSubmitComponent<T extends ComponentType> extends APIBaseComponent<T> {
|
||||
custom_id: string;
|
||||
}
|
||||
|
||||
export interface APIModalSubmitTextInputComponent extends APIBaseModalSubmitComponent<ComponentType.TextInput> {
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface ModalSubmitActionRowComponent
|
||||
extends Omit<APIActionRowComponent<APIComponentInModalActionRow>, 'components'> {
|
||||
components: ModalSubmitComponent[];
|
||||
export interface APIModalSubmitStringSelectComponent extends APIBaseModalSubmitComponent<ComponentType.StringSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitUserSelectComponent extends APIBaseModalSubmitComponent<ComponentType.UserSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitComponent<ComponentType.RoleSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmitComponent<ComponentType.ChannelSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitComponent<ComponentType.FileUpload> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitRadioGroupComponent extends APIBaseModalSubmitComponent<ComponentType.RadioGroup> {
|
||||
value: string | null;
|
||||
}
|
||||
|
||||
export interface APIModalSubmitCheckboxGroupComponent extends APIBaseModalSubmitComponent<ComponentType.CheckboxGroup> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitCheckboxComponent extends APIBaseModalSubmitComponent<ComponentType.Checkbox> {
|
||||
value: boolean;
|
||||
}
|
||||
|
||||
export type ModalSubmitComponent =
|
||||
| APIModalSubmitChannelSelectComponent
|
||||
| APIModalSubmitCheckboxComponent
|
||||
| APIModalSubmitCheckboxGroupComponent
|
||||
| APIModalSubmitFileUploadComponent
|
||||
| APIModalSubmitMentionableSelectComponent
|
||||
| APIModalSubmitRadioGroupComponent
|
||||
| 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;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure}
|
||||
*/
|
||||
export interface APIModalSubmission {
|
||||
/**
|
||||
* Data for users, members, channels, and roles in the modal's auto-populated select menus
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
|
||||
*/
|
||||
resolved?: APIInteractionDataResolved;
|
||||
/**
|
||||
* A developer-defined identifier for the component, max 100 characters
|
||||
*/
|
||||
@@ -29,7 +96,7 @@ export interface APIModalSubmission {
|
||||
/**
|
||||
* A list of child components
|
||||
*/
|
||||
components: ModalSubmitActionRowComponent[];
|
||||
components: APIModalSubmissionComponent[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
16
deno/payloads/v9/_interactions/responses.ts
generated
16
deno/payloads/v9/_interactions/responses.ts
generated
@@ -1,5 +1,10 @@
|
||||
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v9.ts';
|
||||
import type { APIActionRowComponent, APIComponentInModalActionRow } from '../channel.ts';
|
||||
import type {
|
||||
APIActionRowComponent,
|
||||
APIComponentInModalActionRow,
|
||||
APILabelComponent,
|
||||
APITextDisplayComponent,
|
||||
} from '../message.ts';
|
||||
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
|
||||
|
||||
/**
|
||||
@@ -126,6 +131,11 @@ export interface APICommandAutocompleteInteractionResponseCallbackData {
|
||||
choices?: APIApplicationCommandOptionChoice[];
|
||||
}
|
||||
|
||||
export type APIModalInteractionResponseCallbackComponent =
|
||||
| APIActionRowComponent<APIComponentInModalActionRow>
|
||||
| APILabelComponent
|
||||
| APITextDisplayComponent;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal}
|
||||
*/
|
||||
@@ -140,6 +150,8 @@ export interface APIModalInteractionResponseCallbackData {
|
||||
title: string;
|
||||
/**
|
||||
* Between 1 and 5 (inclusive) components that make up the modal
|
||||
*
|
||||
* @remarks Using action rows inside modals is deprecated.
|
||||
*/
|
||||
components: APIActionRowComponent<APIComponentInModalActionRow>[];
|
||||
components: APIModalInteractionResponseCallbackComponent[];
|
||||
}
|
||||
|
||||
74
deno/payloads/v9/application.ts
generated
74
deno/payloads/v9/application.ts
generated
@@ -111,9 +111,13 @@ export interface APIApplication {
|
||||
*/
|
||||
approximate_guild_count?: number;
|
||||
/**
|
||||
* Approximate count of users that have installed the app
|
||||
* Approximate count of users that have installed the app (authorized with `application.commands` as a scope)
|
||||
*/
|
||||
approximate_user_install_count?: number;
|
||||
/**
|
||||
* Approximate count of users that have OAuth2 authorizations for the app
|
||||
*/
|
||||
approximate_user_authorization_count?: number;
|
||||
/**
|
||||
* Array of redirect URIs for the application
|
||||
*/
|
||||
@@ -150,7 +154,7 @@ export interface APIApplication {
|
||||
/**
|
||||
* If webhook events are enabled for the app
|
||||
*/
|
||||
event_webhooks_status: ApplicationWebhookEventStatus;
|
||||
event_webhooks_status?: ApplicationWebhookEventStatus;
|
||||
/**
|
||||
* List of webhook event types the app subscribes to
|
||||
*/
|
||||
@@ -227,11 +231,11 @@ export enum ApplicationFlags {
|
||||
*/
|
||||
Embedded = 1 << 17,
|
||||
/**
|
||||
* Intent required for bots in 100 or more servers to receive {@link https://support-dev.discord.com/hc/en-us/articles/4404772028055 | message content}
|
||||
* Intent required for bots in 100 or more servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content}
|
||||
*/
|
||||
GatewayMessageContent = 1 << 18,
|
||||
/**
|
||||
* Intent required for bots in under 100 servers to receive {@link https://support-dev.discord.com/hc/en-us/articles/4404772028055 | message content},
|
||||
* Intent required for bots in under 100 servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content},
|
||||
* found in Bot Settings
|
||||
*/
|
||||
GatewayMessageContentLimited = 1 << 19,
|
||||
@@ -313,6 +317,68 @@ export enum ApplicationRoleConnectionMetadataType {
|
||||
BooleanNotEqual,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-kind-enum}
|
||||
*/
|
||||
export enum ActivityLocationKind {
|
||||
/**
|
||||
* Location is a guild channel
|
||||
*/
|
||||
GuildChannel = 'gc',
|
||||
/**
|
||||
* Location is a private channel, such as a DM or GDM
|
||||
*/
|
||||
PrivateChannel = 'pc',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-object}
|
||||
*/
|
||||
export interface APIActivityLocation {
|
||||
/**
|
||||
* Unique identifier for the location
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Enum describing kind of location
|
||||
*/
|
||||
kind: ActivityLocationKind;
|
||||
/**
|
||||
* ID of the channel
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
/**
|
||||
* ID of the guild
|
||||
*/
|
||||
guild_id?: Snowflake | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-instance-object}
|
||||
*/
|
||||
export interface APIActivityInstance {
|
||||
/**
|
||||
* Application ID
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Activity instance ID
|
||||
*/
|
||||
instance_id: string;
|
||||
/**
|
||||
* Unique identifier for the launch
|
||||
*/
|
||||
launch_id: Snowflake;
|
||||
/**
|
||||
* Location the instance is running in
|
||||
*/
|
||||
location: APIActivityLocation;
|
||||
/**
|
||||
* IDs of the users currently connected to the instance
|
||||
*/
|
||||
users: Snowflake[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status}
|
||||
*/
|
||||
|
||||
34
deno/payloads/v9/auditLog.ts
generated
34
deno/payloads/v9/auditLog.ts
generated
@@ -10,7 +10,13 @@ import type {
|
||||
AutoModerationRuleEventType,
|
||||
AutoModerationRuleTriggerType,
|
||||
} from './autoModeration.ts';
|
||||
import type { APIChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIOverwrite } from './channel.ts';
|
||||
import type {
|
||||
APIChannel,
|
||||
APIGuildForumDefaultReactionEmoji,
|
||||
APIGuildForumTag,
|
||||
APIOverwrite,
|
||||
VideoQualityMode,
|
||||
} from './channel.ts';
|
||||
import type {
|
||||
APIGuildIntegration,
|
||||
APIGuildIntegrationType,
|
||||
@@ -207,6 +213,7 @@ export enum AuditLogEvent {
|
||||
AutoModerationBlockMessage,
|
||||
AutoModerationFlagToChannel,
|
||||
AutoModerationUserCommunicationDisabled,
|
||||
AutoModerationQuarantineUser,
|
||||
|
||||
CreatorMonetizationRequestCreated = 150,
|
||||
CreatorMonetizationTermsAccepted,
|
||||
@@ -232,6 +239,7 @@ export interface APIAuditLogOptions {
|
||||
* - AUTO_MODERATION_BLOCK_MESSAGE
|
||||
* - AUTO_MODERATION_FLAG_TO_CHANNEL
|
||||
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
|
||||
* - AUTO_MODERATION_QUARANTINE_USER
|
||||
*/
|
||||
auto_moderation_rule_name?: string;
|
||||
/**
|
||||
@@ -241,6 +249,7 @@ export interface APIAuditLogOptions {
|
||||
* - AUTO_MODERATION_BLOCK_MESSAGE
|
||||
* - AUTO_MODERATION_FLAG_TO_CHANNEL
|
||||
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
|
||||
* - AUTO_MODERATION_QUARANTINE_USER
|
||||
*/
|
||||
auto_moderation_rule_trigger_type?: AuditLogRuleTriggerType;
|
||||
/**
|
||||
@@ -272,6 +281,7 @@ export interface APIAuditLogOptions {
|
||||
* - AUTO_MODERATION_BLOCK_MESSAGE
|
||||
* - AUTO_MODERATION_FLAG_TO_CHANNEL
|
||||
* - AUTO_MODERATION_USER_COMMUNICATION_DISABLED
|
||||
* - AUTO_MODERATION_QUARANTINE_USER
|
||||
*/
|
||||
channel_id?: Snowflake;
|
||||
|
||||
@@ -325,7 +335,7 @@ export interface APIAuditLogOptions {
|
||||
* - CHANNEL_OVERWRITE_UPDATE
|
||||
* - CHANNEL_OVERWRITE_DELETE
|
||||
*
|
||||
* **Present only if the {@link APIAuditLogOptions.type | entry type} is "0"**
|
||||
* **Present only if the {@link APIAuditLogOptions."type" | entry type} is "0"**
|
||||
*/
|
||||
role_name?: string;
|
||||
|
||||
@@ -337,6 +347,13 @@ export interface APIAuditLogOptions {
|
||||
* - MEMBER_ROLE_UPDATE
|
||||
*/
|
||||
integration_type?: APIGuildIntegrationType;
|
||||
/**
|
||||
* ID of the app whose permissions were targeted
|
||||
*
|
||||
* Present from:
|
||||
* - APPLICATION_COMMAND_PERMISSION_UPDATE
|
||||
*/
|
||||
application_id?: Snowflake;
|
||||
}
|
||||
|
||||
export enum AuditLogOptionsType {
|
||||
@@ -418,7 +435,9 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyRateLimitPerUser
|
||||
| APIAuditLogChangeKeyRecurrenceRule
|
||||
| APIAuditLogChangeKeyRegion
|
||||
| APIAuditLogChangeKeyRTCRegion
|
||||
| APIAuditLogChangeKeyRulesChannelId
|
||||
| APIAuditLogChangeKeySafetyAlertsChannelId
|
||||
| APIAuditLogChangeKeySoundId
|
||||
| APIAuditLogChangeKeySplashHash
|
||||
| APIAuditLogChangeKeyStatus
|
||||
@@ -435,6 +454,7 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyUses
|
||||
| APIAuditLogChangeKeyVanityURLCode
|
||||
| APIAuditLogChangeKeyVerificationLevel
|
||||
| APIAuditLogChangeKeyVideoQualityMode
|
||||
| APIAuditLogChangeKeyVolume
|
||||
| APIAuditLogChangeKeyWidgetChannelId
|
||||
| APIAuditLogChangeKeyWidgetEnabled;
|
||||
@@ -484,6 +504,11 @@ export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snow
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's rtc_region is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRTCRegion = APIAuditLogChangeData<'rtc_region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's preferred_locale is changed
|
||||
*/
|
||||
@@ -524,6 +549,11 @@ export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', Gu
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's video_quality_mode is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVideoQualityMode = APIAuditLogChangeData<'video_quality_mode', VideoQualityMode>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's explicit_content_filter is changed
|
||||
*/
|
||||
|
||||
1565
deno/payloads/v9/channel.ts
generated
1565
deno/payloads/v9/channel.ts
generated
File diff suppressed because it is too large
Load Diff
31
deno/payloads/v9/emoji.ts
generated
31
deno/payloads/v9/emoji.ts
generated
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { _NonNullableFields } from '../../utils/internals.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
@@ -49,3 +50,33 @@ export interface APIEmoji extends APIPartialEmoji {
|
||||
*/
|
||||
available?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-applicationowned-emoji}
|
||||
*/
|
||||
export type APIApplicationEmoji = _NonNullableFields<Required<Pick<APIEmoji, 'animated' | 'id' | 'name' | 'user'>>> & {
|
||||
/**
|
||||
* Roles allowed to use this emoji.
|
||||
*
|
||||
* @remarks Always empty.
|
||||
*/
|
||||
roles: [];
|
||||
/**
|
||||
* Whether this emoji must be wrapped in colons.
|
||||
*
|
||||
* @remarks Always `true`.
|
||||
*/
|
||||
require_colons: true;
|
||||
/**
|
||||
* Whether this emoji is managed.
|
||||
*
|
||||
* @remarks Always `false`.
|
||||
*/
|
||||
managed: false;
|
||||
/**
|
||||
* Whether this emoji is available.
|
||||
*
|
||||
* @remarks Always `true`.
|
||||
*/
|
||||
available: true;
|
||||
};
|
||||
|
||||
103
deno/payloads/v9/gateway.ts
generated
103
deno/payloads/v9/gateway.ts
generated
@@ -60,9 +60,9 @@ export interface APIGatewaySessionStartLimit {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields}
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence}
|
||||
*/
|
||||
export interface GatewayPresenceUpdate {
|
||||
export interface GatewayGuildMembersChunkPresence {
|
||||
/**
|
||||
* The user presence is being updated for
|
||||
*
|
||||
@@ -72,10 +72,6 @@ export interface GatewayPresenceUpdate {
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
user: Partial<APIUser> & Pick<APIUser, 'id'>;
|
||||
/**
|
||||
* ID of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* Either "idle", "dnd", "online", or "offline"
|
||||
*/
|
||||
@@ -94,6 +90,16 @@ export interface GatewayPresenceUpdate {
|
||||
client_status?: GatewayPresenceClientStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields}
|
||||
*/
|
||||
export interface GatewayPresenceUpdate extends GatewayGuildMembersChunkPresence {
|
||||
/**
|
||||
* ID of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types}
|
||||
*/
|
||||
@@ -167,14 +173,28 @@ export interface GatewayActivity {
|
||||
* Application id for the game
|
||||
*/
|
||||
application_id?: Snowflake;
|
||||
/**
|
||||
* Controls which field is displayed in the user's status text in the member list
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
|
||||
*/
|
||||
status_display_type?: StatusDisplayType | null;
|
||||
/**
|
||||
* What the player is currently doing
|
||||
*/
|
||||
details?: string | null;
|
||||
/**
|
||||
* URL that is linked when clicking on the details text
|
||||
*/
|
||||
details_url?: string | null;
|
||||
/**
|
||||
* The user's current party status, or the text used for a custom status
|
||||
*/
|
||||
state?: string | null;
|
||||
/**
|
||||
* URL that is linked when clicking on the state text
|
||||
*/
|
||||
state_url?: string | null;
|
||||
/**
|
||||
* The emoji used for a custom status
|
||||
*
|
||||
@@ -262,6 +282,26 @@ export enum ActivityType {
|
||||
Competing,
|
||||
}
|
||||
|
||||
/**
|
||||
* Controls which field is used in the user's status message
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
|
||||
*/
|
||||
export enum StatusDisplayType {
|
||||
/**
|
||||
* Playing \{name\}
|
||||
*/
|
||||
Name,
|
||||
/**
|
||||
* Playing \{state\}
|
||||
*/
|
||||
State,
|
||||
/**
|
||||
* Playing \{details\}
|
||||
*/
|
||||
Details,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps}
|
||||
*/
|
||||
@@ -298,14 +338,57 @@ export interface GatewayActivityParty {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
|
||||
*/
|
||||
export type GatewayActivityAssets = Partial<
|
||||
Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>
|
||||
>;
|
||||
export interface GatewayActivityAssets {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
|
||||
*/
|
||||
large_image?: string;
|
||||
/**
|
||||
* Text displayed when hovering over the large image of the activity
|
||||
*/
|
||||
large_text?: string;
|
||||
/**
|
||||
* URL that is opened when clicking on the large image
|
||||
*/
|
||||
large_url?: string;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
|
||||
*/
|
||||
small_image?: string;
|
||||
/**
|
||||
* Text displayed when hovering over the small image of the activity
|
||||
*/
|
||||
small_text?: string;
|
||||
/**
|
||||
* URL that is opened when clicking on the small image
|
||||
*/
|
||||
small_url?: string;
|
||||
/**
|
||||
* Displayed as a banner on a Game Invite.
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image | Activity Asset Image}
|
||||
* @see {@link https://discord.com/developers/docs/discord-social-sdk/development-guides/managing-game-invites | Game Invite}
|
||||
*/
|
||||
invite_cover_image?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
|
||||
*/
|
||||
export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>;
|
||||
export interface GatewayActivitySecrets {
|
||||
/**
|
||||
* The secret for joining a party
|
||||
*/
|
||||
join?: string;
|
||||
/**
|
||||
* The secret for spectating a game
|
||||
*/
|
||||
spectate?: string;
|
||||
/**
|
||||
* The secret for a specific instance of a match
|
||||
*/
|
||||
match?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}
|
||||
|
||||
194
deno/payloads/v9/guild.ts
generated
194
deno/payloads/v9/guild.ts
generated
@@ -9,16 +9,19 @@ import type { PresenceUpdateReceiveStatus } from './gateway.ts';
|
||||
import type { OAuth2Scopes } from './oauth2.ts';
|
||||
import type { APIRole } from './permissions.ts';
|
||||
import type { APISticker } from './sticker.ts';
|
||||
import type { APIAvatarDecorationData, APIUser } from './user.ts';
|
||||
import type { APIAvatarDecorationData, APICollectibles, APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#unavailable-guild-object}
|
||||
*/
|
||||
export interface APIUnavailableGuild {
|
||||
export interface APIBaseGuild {
|
||||
/**
|
||||
* Guild id
|
||||
*/
|
||||
id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#unavailable-guild-object}
|
||||
*/
|
||||
export interface APIUnavailableGuild extends APIBaseGuild {
|
||||
/**
|
||||
* `true` if this guild is unavailable due to an outage
|
||||
*/
|
||||
@@ -28,7 +31,7 @@ export interface APIUnavailableGuild {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure}
|
||||
*/
|
||||
export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'>, Pick<APIGuild, 'welcome_screen'> {
|
||||
export interface APIPartialGuild extends APIBaseGuild {
|
||||
/**
|
||||
* Guild name (2-100 characters, excluding trailing and leading whitespace)
|
||||
*/
|
||||
@@ -71,8 +74,19 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
|
||||
* The vanity url code for the guild
|
||||
*/
|
||||
vanity_url_code?: string | null;
|
||||
/**
|
||||
* The welcome screen of a Community guild, shown to new members
|
||||
*
|
||||
* Returned in the invite object
|
||||
*/
|
||||
welcome_screen?: APIGuildWelcomeScreen;
|
||||
}
|
||||
|
||||
/**
|
||||
* Source guild of channel follower webhooks.
|
||||
*/
|
||||
export type APIWebhookSourceGuild = Pick<APIPartialGuild, 'icon' | 'id' | 'name'>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure}
|
||||
*/
|
||||
@@ -113,7 +127,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
|
||||
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
|
||||
*/
|
||||
region: string;
|
||||
region?: string | null;
|
||||
/**
|
||||
* ID of afk channel
|
||||
*/
|
||||
@@ -223,7 +237,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
*/
|
||||
premium_subscription_count?: number;
|
||||
/**
|
||||
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
|
||||
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
|
||||
*
|
||||
* @defaultValue `"en-US"`
|
||||
*/
|
||||
@@ -250,12 +264,6 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`
|
||||
*/
|
||||
approximate_presence_count?: number;
|
||||
/**
|
||||
* The welcome screen of a Community guild, shown to new members
|
||||
*
|
||||
* Returned in the invite object
|
||||
*/
|
||||
welcome_screen?: APIGuildWelcomeScreen;
|
||||
/**
|
||||
* The nsfw level of the guild
|
||||
*
|
||||
@@ -267,7 +275,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
|
||||
*/
|
||||
stickers: APISticker[];
|
||||
stickers?: APISticker[];
|
||||
/**
|
||||
* Whether the guild has the boost progress bar enabled.
|
||||
*/
|
||||
@@ -291,7 +299,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
*/
|
||||
export interface APIPartialInteractionGuild extends Pick<APIGuild, 'features' | 'id'> {
|
||||
/**
|
||||
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
|
||||
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
|
||||
*
|
||||
* @unstable https://github.com/discord/discord-api-docs/issues/6938
|
||||
* @defaultValue `"en-US"`
|
||||
@@ -549,6 +557,24 @@ export enum GuildFeature {
|
||||
* Guild has enabled the welcome screen
|
||||
*/
|
||||
WelcomeScreenEnabled = 'WELCOME_SCREEN_ENABLED',
|
||||
/**
|
||||
* Guild has access to set guild tags
|
||||
*/
|
||||
GuildTags = 'GUILD_TAGS',
|
||||
/**
|
||||
* Guild is able to set gradient colors to roles
|
||||
*/
|
||||
EnhancedRoleColors = 'ENHANCED_ROLE_COLORS',
|
||||
/**
|
||||
* Guild has access to guest invites
|
||||
*/
|
||||
GuestsEnabled = 'GUESTS_ENABLED',
|
||||
/**
|
||||
* Guild has migrated to the new pin messages permission
|
||||
*
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
PinPermissionMigrationComplete = 'PIN_PERMISSION_MIGRATION_COMPLETE',
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -604,7 +630,7 @@ export interface APIGuildPreview {
|
||||
/**
|
||||
* The description for the guild
|
||||
*/
|
||||
description: string;
|
||||
description: string | null;
|
||||
/**
|
||||
* Custom guild stickers
|
||||
*/
|
||||
@@ -628,55 +654,23 @@ export interface APIGuildWidgetSettings {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMember {
|
||||
/**
|
||||
* The user this guild member represents
|
||||
*
|
||||
* **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.**
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
user: APIUser;
|
||||
export interface APIBaseGuildMember {
|
||||
/**
|
||||
* This users guild nickname
|
||||
*/
|
||||
nick?: string | null;
|
||||
/**
|
||||
* The member's guild avatar hash
|
||||
*/
|
||||
avatar?: string | null;
|
||||
/**
|
||||
* The member's guild banner hash
|
||||
*/
|
||||
banner?: string | null;
|
||||
/**
|
||||
* Array of role object ids
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object}
|
||||
*/
|
||||
roles: Snowflake[];
|
||||
/**
|
||||
* When the user joined the guild
|
||||
*/
|
||||
joined_at: string;
|
||||
/**
|
||||
* When the user started boosting the guild
|
||||
*
|
||||
* @see {@link https://support.discord.com/hc/articles/360028038352}
|
||||
*/
|
||||
premium_since?: string | null;
|
||||
/**
|
||||
* Whether the user is deafened in voice channels
|
||||
*/
|
||||
deaf: boolean;
|
||||
/**
|
||||
* Whether the user is muted in voice channels
|
||||
*/
|
||||
mute: boolean;
|
||||
/**
|
||||
* Guild member flags represented as a bit set, defaults to `0`
|
||||
*/
|
||||
flags: GuildMemberFlags;
|
||||
/**
|
||||
* Whether the user has not yet passed the guild's Membership Screening requirements
|
||||
*
|
||||
@@ -693,8 +687,90 @@ export interface APIGuildMember {
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
|
||||
*/
|
||||
avatar_decoration_data?: APIAvatarDecorationData | null;
|
||||
/**
|
||||
* The data for the member's collectibles
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
|
||||
*/
|
||||
collectibles?: APICollectibles | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIFlaggedGuildMember {
|
||||
/**
|
||||
* Guild member flags represented as a bit set
|
||||
*
|
||||
* @defaultValue `0`
|
||||
*/
|
||||
flags: GuildMemberFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMemberJoined {
|
||||
/**
|
||||
* When the user joined the guild
|
||||
*/
|
||||
joined_at: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMemberAvatar {
|
||||
/**
|
||||
* The member's guild avatar hash
|
||||
*/
|
||||
avatar?: string | null;
|
||||
/**
|
||||
* The member's guild banner hash
|
||||
*/
|
||||
banner?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIBaseVoiceGuildMember {
|
||||
/**
|
||||
* Whether the user is deafened in voice channels
|
||||
*/
|
||||
deaf: boolean;
|
||||
/**
|
||||
* Whether the user is muted in voice channels
|
||||
*/
|
||||
mute: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMemberUser {
|
||||
/**
|
||||
* The user this guild member represents
|
||||
*
|
||||
* **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.**
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMember
|
||||
extends
|
||||
APIBaseGuildMember,
|
||||
APIBaseVoiceGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
APIGuildMemberJoined,
|
||||
APIGuildMemberUser {}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
|
||||
*/
|
||||
@@ -740,6 +816,10 @@ export enum GuildMemberFlags {
|
||||
* Member has dismissed the DM settings upsell
|
||||
*/
|
||||
DmSettingsUpsellAcknowledged = 1 << 9,
|
||||
/**
|
||||
* Member's guild tag is blocked by AutoMod
|
||||
*/
|
||||
AutoModQuarantinedGuildTag = 1 << 10,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -999,6 +1079,9 @@ export interface APIGuildWelcomeScreenChannel {
|
||||
emoji_name: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable https://github.com/discord/discord-api-docs/pull/2547
|
||||
*/
|
||||
export interface APIGuildMembershipScreening {
|
||||
/**
|
||||
* When the fields were last updated
|
||||
@@ -1014,8 +1097,9 @@ export interface APIGuildMembershipScreening {
|
||||
description: string | null;
|
||||
}
|
||||
|
||||
// TODO: make this a union based on the type in the future, when new types are added
|
||||
|
||||
/**
|
||||
* @unstable https://github.com/discord/discord-api-docs/pull/2547
|
||||
*/
|
||||
export interface APIGuildMembershipScreeningField {
|
||||
/**
|
||||
* The type of field
|
||||
@@ -1035,6 +1119,9 @@ export interface APIGuildMembershipScreeningField {
|
||||
required: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable https://github.com/discord/discord-api-docs/pull/2547
|
||||
*/
|
||||
export enum MembershipScreeningFieldType {
|
||||
/**
|
||||
* Server Rules
|
||||
@@ -1155,6 +1242,9 @@ export enum GuildOnboardingPromptType {
|
||||
Dropdown,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#incidents-data-object}
|
||||
*/
|
||||
export interface APIIncidentsData {
|
||||
/**
|
||||
* When invites get enabled again
|
||||
|
||||
6
deno/payloads/v9/guildScheduledEvent.ts
generated
6
deno/payloads/v9/guildScheduledEvent.ts
generated
@@ -181,8 +181,7 @@ export interface APIGuildScheduledEventRecurrenceRuleNWeekday {
|
||||
*/
|
||||
export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday;
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
@@ -192,8 +191,7 @@ export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
export interface APIExternalGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
channel_id: null;
|
||||
entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
|
||||
}
|
||||
|
||||
10
deno/payloads/v9/interactions.ts
generated
10
deno/payloads/v9/interactions.ts
generated
@@ -21,11 +21,11 @@ import type {
|
||||
import type { APIPingInteraction } from './_interactions/ping.ts';
|
||||
|
||||
export * from './_interactions/applicationCommands.ts';
|
||||
export * from './_interactions/autocomplete.ts';
|
||||
export * from './_interactions/base.ts';
|
||||
export * from './_interactions/messageComponents.ts';
|
||||
export * from './_interactions/modalSubmit.ts';
|
||||
export * from './_interactions/ping.ts';
|
||||
export type * from './_interactions/autocomplete.ts';
|
||||
export type * from './_interactions/base.ts';
|
||||
export type * from './_interactions/messageComponents.ts';
|
||||
export type * from './_interactions/modalSubmit.ts';
|
||||
export type * from './_interactions/ping.ts';
|
||||
export * from './_interactions/responses.ts';
|
||||
|
||||
/**
|
||||
|
||||
26
deno/payloads/v9/invite.ts
generated
26
deno/payloads/v9/invite.ts
generated
@@ -3,10 +3,9 @@
|
||||
*/
|
||||
|
||||
import type { APIApplication } from './application.ts';
|
||||
import type { APIPartialChannel } from './channel.ts';
|
||||
import type { APIInviteChannel } from './channel.ts';
|
||||
import type { APIGuild } from './guild.ts';
|
||||
import type { APIGuildScheduledEvent } from './guildScheduledEvent.ts';
|
||||
import type { APIInviteStageInstance } from './stageInstance.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
export type APIInviteGuild = Pick<
|
||||
@@ -43,7 +42,7 @@ export interface APIInvite {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object}
|
||||
*/
|
||||
channel: Required<APIPartialChannel> | null;
|
||||
channel: APIInviteChannel | null;
|
||||
/**
|
||||
* The user who created the invite
|
||||
*
|
||||
@@ -77,16 +76,16 @@ export interface APIInvite {
|
||||
*/
|
||||
approximate_member_count?: number;
|
||||
/**
|
||||
* The expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true`
|
||||
* The expiration date of this invite
|
||||
*/
|
||||
expires_at?: string | null;
|
||||
expires_at: string | null;
|
||||
/**
|
||||
* The stage instance data if there is a public stage instance in the stage channel this invite is for
|
||||
*
|
||||
* @deprecated
|
||||
* {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479}
|
||||
* @deprecated This has been removed from the documentation.
|
||||
* {@link https://github.com/discord/discord-api-docs/pull/7779 | discord-api-docs#7779}
|
||||
*/
|
||||
stage_instance?: APIInviteStageInstance;
|
||||
stage_instance?: never;
|
||||
/**
|
||||
* The guild scheduled event data, returned from the `GET /invites/<code>` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id
|
||||
*/
|
||||
@@ -95,6 +94,17 @@ export interface APIInvite {
|
||||
* The invite type
|
||||
*/
|
||||
type: InviteType;
|
||||
/**
|
||||
* The flags of the invite
|
||||
*/
|
||||
flags?: InviteFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object-guild-invite-flags}
|
||||
*/
|
||||
export enum InviteFlags {
|
||||
IsGuestInvite = 1 << 0,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
2343
deno/payloads/v9/message.ts
generated
Normal file
2343
deno/payloads/v9/message.ts
generated
Normal file
File diff suppressed because it is too large
Load Diff
9
deno/payloads/v9/mod.ts
generated
9
deno/payloads/v9/mod.ts
generated
@@ -3,21 +3,22 @@ export * from './application.ts';
|
||||
export * from './auditLog.ts';
|
||||
export * from './autoModeration.ts';
|
||||
export * from './channel.ts';
|
||||
export * from './emoji.ts';
|
||||
export type * from './emoji.ts';
|
||||
export * from './gateway.ts';
|
||||
export * from './guild.ts';
|
||||
export * from './guildScheduledEvent.ts';
|
||||
export * from './interactions.ts';
|
||||
export * from './invite.ts';
|
||||
export * from './message.ts';
|
||||
export * from './monetization.ts';
|
||||
export * from './oauth2.ts';
|
||||
export * from './permissions.ts';
|
||||
export * from './poll.ts';
|
||||
export * from './soundboard.ts';
|
||||
export type * from './soundboard.ts';
|
||||
export * from './stageInstance.ts';
|
||||
export * from './sticker.ts';
|
||||
export * from './teams.ts';
|
||||
export * from './template.ts';
|
||||
export type * from './template.ts';
|
||||
export * from './user.ts';
|
||||
export * from './voice.ts';
|
||||
export type * from './voice.ts';
|
||||
export * from './webhook.ts';
|
||||
|
||||
27
deno/payloads/v9/permissions.ts
generated
27
deno/payloads/v9/permissions.ts
generated
@@ -18,8 +18,15 @@ export interface APIRole {
|
||||
name: string;
|
||||
/**
|
||||
* Integer representation of hexadecimal color code
|
||||
*
|
||||
* @deprecated Use `colors` instead.
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color: number;
|
||||
/**
|
||||
* The role's colors
|
||||
*/
|
||||
colors: APIRoleColors;
|
||||
/**
|
||||
* If this role is pinned in the user listing
|
||||
*/
|
||||
@@ -99,3 +106,23 @@ export enum RoleFlags {
|
||||
*/
|
||||
InPrompt = 1 << 0,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions#role-colors-object}
|
||||
*/
|
||||
export interface APIRoleColors {
|
||||
/**
|
||||
* The primary color for the role
|
||||
*/
|
||||
primary_color: number;
|
||||
/**
|
||||
* The secondary color for the role, this will make the role a gradient between the other provided colors
|
||||
*/
|
||||
secondary_color: number | null;
|
||||
/**
|
||||
* The tertiary color for the role, this will turn the gradient into a holographic style
|
||||
*
|
||||
* @remarks When sending `tertiary_color` the API enforces the role color to be a holographic style with values of `primary_color = 11127295`, `secondary_color = 16759788`, and `tertiary_color = 16761760`.
|
||||
*/
|
||||
tertiary_color: number | null;
|
||||
}
|
||||
|
||||
49
deno/payloads/v9/poll.ts
generated
49
deno/payloads/v9/poll.ts
generated
@@ -4,22 +4,14 @@
|
||||
|
||||
import type { APIPartialEmoji } from './emoji.ts';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure}
|
||||
*/
|
||||
export interface APIPoll {
|
||||
export interface APIBasePoll {
|
||||
/**
|
||||
* The question of the poll
|
||||
*/
|
||||
question: APIPollMedia;
|
||||
/**
|
||||
* Each of the answers available in the poll, up to 10
|
||||
*/
|
||||
answers: APIPollAnswer[];
|
||||
/**
|
||||
* The time when the poll ends (IS08601 timestamp)
|
||||
*/
|
||||
expiry: string;
|
||||
}
|
||||
|
||||
export interface APIPollDefaults {
|
||||
/**
|
||||
* Whether a user can select multiple answers
|
||||
*
|
||||
@@ -32,6 +24,20 @@ export interface APIPoll {
|
||||
* @defaultValue `PollLayoutType.Default`
|
||||
*/
|
||||
layout_type: PollLayoutType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure}
|
||||
*/
|
||||
export interface APIPoll extends APIBasePoll, APIPollDefaults {
|
||||
/**
|
||||
* Each of the answers available in the poll, up to 10
|
||||
*/
|
||||
answers: APIPollAnswer[];
|
||||
/**
|
||||
* The time when the poll ends (IS08601 timestamp)
|
||||
*/
|
||||
expiry: string | null;
|
||||
/**
|
||||
* The results of the poll
|
||||
*/
|
||||
@@ -64,20 +70,23 @@ export interface APIPollMedia {
|
||||
emoji?: APIPartialEmoji;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure}
|
||||
*/
|
||||
export interface APIPollAnswer {
|
||||
/**
|
||||
* The ID of the answer. Starts at `1` for the first answer and goes up sequentially
|
||||
*/
|
||||
answer_id: number;
|
||||
export interface APIBasePollAnswer {
|
||||
/**
|
||||
* The data of the answer
|
||||
*/
|
||||
poll_media: APIPollMedia;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure}
|
||||
*/
|
||||
export interface APIPollAnswer extends APIBasePollAnswer {
|
||||
/**
|
||||
* The ID of the answer. Starts at `1` for the first answer and goes up sequentially
|
||||
*/
|
||||
answer_id: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/poll#poll-results-object-poll-results-object-structure}
|
||||
*/
|
||||
|
||||
94
deno/payloads/v9/user.ts
generated
94
deno/payloads/v9/user.ts
generated
@@ -22,7 +22,7 @@ export interface APIUser {
|
||||
*/
|
||||
discriminator: string;
|
||||
/**
|
||||
* The user's display name, if it is set. For bots, this is the application name
|
||||
* The user's display name, if it is set
|
||||
*/
|
||||
global_name: string | null;
|
||||
/**
|
||||
@@ -96,6 +96,18 @@ export interface APIUser {
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
|
||||
*/
|
||||
avatar_decoration_data?: APIAvatarDecorationData | null;
|
||||
/**
|
||||
* The data for the user's collectibles
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
|
||||
*/
|
||||
collectibles?: APICollectibles | null;
|
||||
/**
|
||||
* The user's primary guild
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
|
||||
*/
|
||||
primary_guild?: APIUserPrimaryGuild | null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -182,6 +194,8 @@ export enum UserFlags {
|
||||
DisablePremium = 1 << 21,
|
||||
/**
|
||||
* User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer}
|
||||
*
|
||||
* @deprecated This user flag is no longer available. See {@link https://support-dev.discord.com/hc/articles/10113997751447-Active-Developer-Badge} for more information.
|
||||
*/
|
||||
ActiveDeveloper = 1 << 22,
|
||||
/**
|
||||
@@ -348,3 +362,81 @@ export interface APIAvatarDecorationData {
|
||||
*/
|
||||
sku_id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* The collectibles the user has, excluding Avatar Decorations and Profile Effects.
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#collectibles}
|
||||
*/
|
||||
export interface APICollectibles {
|
||||
/**
|
||||
* Object mapping of {@link APINameplateData}
|
||||
*/
|
||||
nameplate?: APINameplateData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#nameplate}
|
||||
*/
|
||||
export interface APINameplateData {
|
||||
/**
|
||||
* ID of the nameplate SKU
|
||||
*/
|
||||
sku_id: Snowflake;
|
||||
/**
|
||||
* Path to the nameplate asset
|
||||
*
|
||||
* @example `nameplates/nameplates/twilight/`
|
||||
*/
|
||||
asset: string;
|
||||
/**
|
||||
* The label of this nameplate. Currently unused
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Background color of the nameplate
|
||||
*/
|
||||
palette: NameplatePalette;
|
||||
}
|
||||
|
||||
/**
|
||||
* Background color of a nameplate.
|
||||
*/
|
||||
export enum NameplatePalette {
|
||||
Berry = 'berry',
|
||||
BubbleGum = 'bubble_gum',
|
||||
Clover = 'clover',
|
||||
Cobalt = 'cobalt',
|
||||
Crimson = 'crimson',
|
||||
Forest = 'forest',
|
||||
Lemon = 'lemon',
|
||||
Sky = 'sky',
|
||||
Teal = 'teal',
|
||||
Violet = 'violet',
|
||||
White = 'white',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild}
|
||||
*/
|
||||
export interface APIUserPrimaryGuild {
|
||||
/**
|
||||
* The id of the user's primary guild
|
||||
*/
|
||||
identity_guild_id: Snowflake | null;
|
||||
/**
|
||||
* Whether the user is displaying the primary guild's server tag.
|
||||
* This can be `null` if the system clears the identity, e.g. because the server no longer supports tags
|
||||
*/
|
||||
identity_enabled: boolean | null;
|
||||
/**
|
||||
* The text of the user's server tag. Limited to 4 characters
|
||||
*/
|
||||
tag: string | null;
|
||||
/**
|
||||
* The server tag badge hash
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
badge: string | null;
|
||||
}
|
||||
|
||||
20
deno/payloads/v9/voice.ts
generated
20
deno/payloads/v9/voice.ts
generated
@@ -11,14 +11,7 @@ import type { APIGuildMember } from './guild.ts';
|
||||
*/
|
||||
export type GatewayVoiceState = APIVoiceState;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
|
||||
*/
|
||||
export interface APIVoiceState {
|
||||
/**
|
||||
* The guild id this voice state is for
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
export interface APIBaseVoiceState {
|
||||
/**
|
||||
* The channel id this user is connected to
|
||||
*/
|
||||
@@ -30,6 +23,7 @@ export interface APIVoiceState {
|
||||
/**
|
||||
* The guild member this voice state is for
|
||||
*
|
||||
* @remarks The member field will have `joined_at` set to `null` if the member was invited as a guest.
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
member?: APIGuildMember;
|
||||
@@ -71,6 +65,16 @@ export interface APIVoiceState {
|
||||
request_to_speak_timestamp: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
|
||||
*/
|
||||
export interface APIVoiceState extends APIBaseVoiceState {
|
||||
/**
|
||||
* The guild id this voice state is for
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
|
||||
*/
|
||||
|
||||
41
deno/payloads/v9/webhook.ts
generated
41
deno/payloads/v9/webhook.ts
generated
@@ -6,11 +6,11 @@ import type { Snowflake } from '../../globals.ts';
|
||||
import type {
|
||||
APIEntitlement,
|
||||
APIGuild,
|
||||
APIPartialChannel,
|
||||
APIPartialGuild,
|
||||
APIUser,
|
||||
APIWebhookSourceGuild,
|
||||
ApplicationIntegrationType,
|
||||
OAuth2Scopes,
|
||||
APIWebhookSourceChannel,
|
||||
} from './mod.ts';
|
||||
|
||||
/**
|
||||
@@ -30,11 +30,11 @@ export interface APIWebhook {
|
||||
/**
|
||||
* The guild id this webhook is for
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
guild_id?: Snowflake | null;
|
||||
/**
|
||||
* The channel id this webhook is for
|
||||
*/
|
||||
channel_id: Snowflake;
|
||||
channel_id: Snowflake | null;
|
||||
/**
|
||||
* The user this webhook was created by (not returned when getting a webhook with its token)
|
||||
*
|
||||
@@ -60,11 +60,11 @@ export interface APIWebhook {
|
||||
/**
|
||||
* The guild of the channel that this webhook is following (returned for Channel Follower Webhooks)
|
||||
*/
|
||||
source_guild?: APIPartialGuild;
|
||||
source_guild?: APIWebhookSourceGuild;
|
||||
/**
|
||||
* The channel that this webhook is following (returned for Channel Follower Webhooks)
|
||||
*/
|
||||
source_channel?: APIPartialChannel;
|
||||
source_channel?: APIWebhookSourceChannel;
|
||||
/**
|
||||
* The url used for executing the webhook (returned by the webhooks OAuth2 flow)
|
||||
*/
|
||||
@@ -86,7 +86,13 @@ export type APIWebhookEventBody =
|
||||
ApplicationWebhookEventType.ApplicationAuthorized,
|
||||
APIWebhookEventApplicationAuthorizedData
|
||||
>
|
||||
| APIWebhookEventEventBase<
|
||||
ApplicationWebhookEventType.ApplicationDeauthorized,
|
||||
APIWebhookEventApplicationDeauthorizedData
|
||||
>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementCreate, APIWebhookEventEntitlementCreateData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementDelete, APIWebhookEventEntitlementDeleteData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementUpdate, APIWebhookEventEntitlementUpdateData>
|
||||
| APIWebhookEventEventBase<ApplicationWebhookEventType.QuestUserEnrollment, APIWebhookEventQuestUserEnrollmentData>;
|
||||
|
||||
export interface APIWebhookEventApplicationAuthorizedData {
|
||||
@@ -108,8 +114,19 @@ export interface APIWebhookEventApplicationAuthorizedData {
|
||||
guild?: APIGuild;
|
||||
}
|
||||
|
||||
export interface APIWebhookEventApplicationDeauthorizedData {
|
||||
/**
|
||||
* User who deauthorized the app
|
||||
*/
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventQuestUserEnrollmentData = never;
|
||||
|
||||
export interface APIWebhookEventBase<Type extends ApplicationWebhookType, Event> {
|
||||
@@ -168,10 +185,22 @@ export enum ApplicationWebhookEventType {
|
||||
* Sent when an app was authorized by a user to a server or their account
|
||||
*/
|
||||
ApplicationAuthorized = 'APPLICATION_AUTHORIZED',
|
||||
/**
|
||||
* Sent when an app was deauthorized by a user
|
||||
*/
|
||||
ApplicationDeauthorized = 'APPLICATION_DEAUTHORIZED',
|
||||
/**
|
||||
* Entitlement was created
|
||||
*/
|
||||
EntitlementCreate = 'ENTITLEMENT_CREATE',
|
||||
/**
|
||||
* Entitlement was updated
|
||||
*/
|
||||
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
|
||||
/**
|
||||
* Entitlement was deleted
|
||||
*/
|
||||
EntitlementDelete = 'ENTITLEMENT_DELETE',
|
||||
/**
|
||||
* User was added to a Quest (currently unavailable)
|
||||
*/
|
||||
|
||||
53
deno/rest/common.ts
generated
53
deno/rest/common.ts
generated
@@ -75,8 +75,16 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
UnderMinimumAge = 20_024,
|
||||
|
||||
ChannelSendRateLimit = 20_028,
|
||||
ServerSendRateLimit,
|
||||
ChannelWriteRateLimit = 20_028,
|
||||
/**
|
||||
* @deprecated Use {@link RESTJSONErrorCodes.ChannelWriteRateLimit} instead
|
||||
*/
|
||||
ChannelSendRateLimit = ChannelWriteRateLimit,
|
||||
ServerWriteRateLimit = 20_029,
|
||||
/**
|
||||
* @deprecated Use {@link RESTJSONErrorCodes.ServerWriteRateLimit} instead
|
||||
*/
|
||||
ServerSendRateLimit = ServerWriteRateLimit,
|
||||
|
||||
StageTopicServerNameServerDescriptionOrChannelNamesContainDisallowedWords = 20_031,
|
||||
|
||||
@@ -173,6 +181,9 @@ export enum RESTJSONErrorCodes {
|
||||
GuildWidgetDisabled,
|
||||
CannotEditMessageAuthoredByAnotherUser,
|
||||
CannotSendAnEmptyMessage,
|
||||
/**
|
||||
* @see {@link RESTJSONErrorCodes.CannotSendMessagesToThisUserDueToHavingNoMutualGuilds} for a similar error code
|
||||
*/
|
||||
CannotSendMessagesToThisUser,
|
||||
CannotSendMessagesInNonTextChannel,
|
||||
ChannelVerificationLevelTooHighForYouToGainAccess,
|
||||
@@ -246,7 +257,11 @@ export enum RESTJSONErrorCodes {
|
||||
OwnerCannotBePendingMember = 50_131,
|
||||
OwnershipCannotBeMovedToABotUser,
|
||||
|
||||
FailedToResizeAssetBelowTheMinimumSize = 50_138,
|
||||
FailedToResizeAssetBelowTheMaximumSize = 50_138,
|
||||
/**
|
||||
* @deprecated This name is incorrect. Use {@link RESTJSONErrorCodes.FailedToResizeAssetBelowTheMaximumSize} instead
|
||||
*/
|
||||
FailedToResizeAssetBelowTheMinimumSize = FailedToResizeAssetBelowTheMaximumSize,
|
||||
|
||||
CannotMixSubscriptionAndNonSubscriptionRolesForAnEmoji = 50_144,
|
||||
CannotConvertBetweenPremiumEmojiAndNormalEmoji,
|
||||
@@ -266,6 +281,11 @@ export enum RESTJSONErrorCodes {
|
||||
|
||||
ProvidedFileDoesNotHaveAValidDuration = 50_192,
|
||||
|
||||
/**
|
||||
* @see {@link RESTJSONErrorCodes.CannotSendMessagesToThisUser} for a similar error code
|
||||
*/
|
||||
CannotSendMessagesToThisUserDueToHavingNoMutualGuilds = 50_278,
|
||||
|
||||
YouDoNotHavePermissionToSendThisSticker = 50_600,
|
||||
|
||||
TwoFactorAuthenticationIsRequired = 60_003,
|
||||
@@ -275,7 +295,8 @@ export enum RESTJSONErrorCodes {
|
||||
ReactionWasBlocked = 90_001,
|
||||
UserCannotUseBurstReactions,
|
||||
|
||||
ApplicationNotYetAvailable = 110_001,
|
||||
IndexNotYetAvailable = 110_000,
|
||||
ApplicationNotYetAvailable,
|
||||
|
||||
APIResourceOverloaded = 130_000,
|
||||
|
||||
@@ -288,6 +309,8 @@ export enum RESTJSONErrorCodes {
|
||||
MaximumActiveThreads,
|
||||
MaximumActiveAnnouncementThreads,
|
||||
|
||||
CannotForwardMessageWithUnreadableContent = 160_014,
|
||||
|
||||
InvalidJSONForUploadedLottieFile = 170_001,
|
||||
UploadedLottiesCannotContainRasterizedImages,
|
||||
StickerMaximumFramerateExceeded,
|
||||
@@ -313,6 +336,8 @@ export enum RESTJSONErrorCodes {
|
||||
CannotEnableOnboardingRequirementsAreNotMet = 350_000,
|
||||
CannotUpdateOnboardingWhileBelowRequirements,
|
||||
|
||||
AccessToFileUploadsHasBeenLimitedForThisGuild = 400_001,
|
||||
|
||||
FailedToBanUsers = 500_000,
|
||||
|
||||
PollVotingBlocked = 520_000,
|
||||
@@ -322,8 +347,28 @@ export enum RESTJSONErrorCodes {
|
||||
CannotUseAnEmojiIncludedWithThePoll,
|
||||
|
||||
CannotExpireANonPollMessage = 520_006,
|
||||
|
||||
ProvisionalAccountsPermissionNotGranted = 530_000,
|
||||
IdTokenJWTExpired,
|
||||
IdTokenJWTIssuerMismatch,
|
||||
IdTokenJWTAudienceMismatch,
|
||||
IdTokenJWTIssuedTooLongAgo,
|
||||
|
||||
FailedToGenerateUniqueUsername = 530_006,
|
||||
InvalidClientSecret,
|
||||
}
|
||||
|
||||
/**
|
||||
* JSON Error Codes that represent "Cannot send messages to this user".
|
||||
* Discord uses two different error codes for this error:
|
||||
* - {@link RESTJSONErrorCodes.CannotSendMessagesToThisUser} (50_007)
|
||||
* - {@link RESTJSONErrorCodes.CannotSendMessagesToThisUserDueToHavingNoMutualGuilds} (50_278)
|
||||
*/
|
||||
export const CannotSendMessagesToThisUserErrorCodes = [
|
||||
RESTJSONErrorCodes.CannotSendMessagesToThisUser,
|
||||
RESTJSONErrorCodes.CannotSendMessagesToThisUserDueToHavingNoMutualGuilds,
|
||||
] as const;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/reference#locales}
|
||||
*/
|
||||
|
||||
15
deno/rest/v10/application.ts
generated
15
deno/rest/v10/application.ts
generated
@@ -1,4 +1,8 @@
|
||||
import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v10/application.ts';
|
||||
import type {
|
||||
APIActivityInstance,
|
||||
APIApplication,
|
||||
APIApplicationRoleConnectionMetadata,
|
||||
} from '../../payloads/v10/application.ts';
|
||||
import type { _Nullable, _StrictPartial } from '../../utils/internals.ts';
|
||||
|
||||
/**
|
||||
@@ -25,11 +29,13 @@ export type RESTGetCurrentApplicationResult = APIApplication;
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<
|
||||
_Nullable<Pick<APIApplication, 'cover_image' | 'icon'>> &
|
||||
_Nullable<Pick<APIApplication, 'cover_image' | 'event_webhooks_url' | 'icon'>> &
|
||||
Pick<
|
||||
APIApplication,
|
||||
| 'custom_install_url'
|
||||
| 'description'
|
||||
| 'event_webhooks_status'
|
||||
| 'event_webhooks_types'
|
||||
| 'flags'
|
||||
| 'install_params'
|
||||
| 'integration_types_config'
|
||||
@@ -43,3 +49,8 @@ export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationResult = APIApplication;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#get-application-activity-instance}
|
||||
*/
|
||||
export type RESTGetAPIApplicationActivityInstanceResult = APIActivityInstance;
|
||||
|
||||
97
deno/rest/v10/channel.ts
generated
97
deno/rest/v10/channel.ts
generated
@@ -7,6 +7,7 @@ import type {
|
||||
APIFollowedChannel,
|
||||
APIMessage,
|
||||
APIMessageReference,
|
||||
APIMessageSharedClientTheme,
|
||||
APIThreadList,
|
||||
APIThreadMember,
|
||||
APIUser,
|
||||
@@ -24,6 +25,10 @@ import type {
|
||||
ChannelFlags,
|
||||
APIAttachment,
|
||||
APIMessageTopLevelComponent,
|
||||
APIMessagePin,
|
||||
APIAnnouncementThreadChannel,
|
||||
APIPrivateThreadChannel,
|
||||
APIPublicThreadChannel,
|
||||
} from '../../payloads/v10/mod.ts';
|
||||
import type { _AddUndefinedToPossiblyUndefinedPropertiesOfInterface, _StrictPartial } from '../../utils/internals.ts';
|
||||
import type { RESTAPIPoll } from './poll.ts';
|
||||
@@ -80,8 +85,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
nsfw?: boolean | null | undefined;
|
||||
/**
|
||||
* Amount of seconds a user has to wait before sending another message (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
|
||||
* are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* Channel types: text, newsThread, publicThread, privateThread, forum, media
|
||||
*/
|
||||
@@ -145,7 +149,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: text, news, forum, media
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | null | undefined;
|
||||
/**
|
||||
* Channel flags combined as a bit field.
|
||||
*/
|
||||
@@ -167,7 +171,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined;
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | null | undefined;
|
||||
/**
|
||||
* The initial `rate_limit_per_user` to set on newly created threads in a channel.
|
||||
* This field is copied to the thread at creation time and does not live update
|
||||
@@ -308,7 +312,7 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
/**
|
||||
* The components to include with the message
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/interactions/message-components#component-object}
|
||||
* @see {@link https://discord.com/developers/docs/components/reference}
|
||||
*/
|
||||
components?: APIMessageTopLevelComponent[] | undefined;
|
||||
/**
|
||||
@@ -334,6 +338,10 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
* A poll!
|
||||
*/
|
||||
poll?: RESTAPIPoll | undefined;
|
||||
/**
|
||||
* The custom client-side theme to share via the message
|
||||
*/
|
||||
shared_client_theme?: APIMessageSharedClientTheme | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -403,7 +411,13 @@ export interface RESTGetAPIChannelMessageReactionUsersQuery {
|
||||
*/
|
||||
export enum ReactionType {
|
||||
Normal,
|
||||
Super,
|
||||
Burst,
|
||||
// eslint-disable @typescript-eslint/no-duplicate-enum-values
|
||||
/**
|
||||
* @deprecated Use {@link ReactionType.Burst} instead
|
||||
*/
|
||||
Super = Burst,
|
||||
// eslint-enable @typescript-eslint/no-duplicate-enum-values
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -461,7 +475,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
|
||||
/**
|
||||
* The components to include with the message
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/interactions/message-components#component-object}
|
||||
* @see {@link https://discord.com/developers/docs/components/reference}
|
||||
*/
|
||||
components?: APIMessageTopLevelComponent[] | null | undefined;
|
||||
}
|
||||
@@ -617,17 +631,60 @@ export type RESTPostAPIChannelFollowersResult = APIFollowedChannel;
|
||||
export type RESTPostAPIChannelTypingResult = never;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages}
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#get-channel-pins}
|
||||
*/
|
||||
export interface RESTGetAPIChannelMessagesPinsQuery {
|
||||
/**
|
||||
* Get messages pinned before this timestamp
|
||||
*/
|
||||
before?: string;
|
||||
/**
|
||||
* Maximum number of pins to return (1-50).
|
||||
*
|
||||
* @defaultValue `50`
|
||||
*/
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#get-channel-pins}
|
||||
*/
|
||||
export interface RESTGetAPIChannelMessagesPinsResult {
|
||||
/**
|
||||
* Array of pinned messages
|
||||
*/
|
||||
items: APIMessagePin[];
|
||||
/**
|
||||
* Whether there are more items available
|
||||
*/
|
||||
has_more: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#pin-message}
|
||||
*/
|
||||
export type RESTPutAPIChannelMessagesPinResult = never;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#unpin-message}
|
||||
*/
|
||||
export type RESTDeleteAPIChannelMessagesPinResult = never;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#get-pinned-messages-deprecated}
|
||||
* @deprecated
|
||||
*/
|
||||
export type RESTGetAPIChannelPinsResult = APIMessage[];
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#pin-message}
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#pin-message-deprecated}
|
||||
* @deprecated
|
||||
*/
|
||||
export type RESTPutAPIChannelPinResult = never;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#unpin-message}
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#unpin-message-deprecated}
|
||||
* @deprecated
|
||||
*/
|
||||
export type RESTDeleteAPIChannelPinResult = never;
|
||||
|
||||
@@ -695,6 +752,10 @@ export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessage
|
||||
* The initial message of the thread
|
||||
*/
|
||||
message: string;
|
||||
/**
|
||||
* The IDs of the set of tags to apply to the thread; limited to 5
|
||||
*/
|
||||
applied_tags?: Snowflake[] | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -709,11 +770,9 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
|
||||
/**
|
||||
* The type of thread to create
|
||||
*
|
||||
* In API v9 and v10, `type` defaults to `PRIVATE_THREAD`.
|
||||
* In a future API version this will be changed to be a required field, with no default.
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types}
|
||||
* @defaultValue `ChannelType.PrivateThread`
|
||||
* @defaultValue `ChannelType.PrivateThread` in API v9 and v10.
|
||||
* In a future API version this will be changed to be a required field, with no default.
|
||||
*/
|
||||
type?: ThreadChannelType | undefined;
|
||||
/**
|
||||
@@ -725,7 +784,10 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}
|
||||
*/
|
||||
export type RESTPostAPIChannelThreadsResult = APIChannel;
|
||||
export type RESTPostAPIChannelThreadsResult =
|
||||
| APIAnnouncementThreadChannel
|
||||
| APIPrivateThreadChannel
|
||||
| APIPublicThreadChannel;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#join-thread}
|
||||
@@ -765,7 +827,9 @@ export interface RESTGetAPIChannelThreadMembersQuery {
|
||||
*/
|
||||
after?: Snowflake;
|
||||
/**
|
||||
* Max number of thread members to return (1-100). Defaults to 100
|
||||
* Max number of thread members to return (1-100)
|
||||
*
|
||||
* @defaultValue `100`
|
||||
*/
|
||||
limit?: number;
|
||||
}
|
||||
@@ -782,6 +846,7 @@ export interface RESTGetAPIChannelThreadsArchivedQuery {
|
||||
/**
|
||||
* Get threads before this id or ISO8601 timestamp
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents
|
||||
before?: Snowflake | string;
|
||||
/**
|
||||
* Max number of thread to return
|
||||
|
||||
10
deno/rest/v10/emoji.ts
generated
10
deno/rest/v10/emoji.ts
generated
@@ -1,5 +1,5 @@
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIEmoji } from '../../payloads/v10/mod.ts';
|
||||
import type { APIApplicationEmoji, APIEmoji } from '../../payloads/v10/mod.ts';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}
|
||||
@@ -64,13 +64,13 @@ export type RESTDeleteAPIGuildEmojiResult = never;
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#list-application-emojis}
|
||||
*/
|
||||
export interface RESTGetAPIApplicationEmojisResult {
|
||||
items: APIEmoji[];
|
||||
items: APIApplicationEmoji[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#get-application-emoji}
|
||||
*/
|
||||
export type RESTGetAPIApplicationEmojiResult = APIEmoji;
|
||||
export type RESTGetAPIApplicationEmojiResult = APIApplicationEmoji;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji-json-params}
|
||||
@@ -80,7 +80,7 @@ export type RESTPostAPIApplicationEmojiJSONBody = Pick<RESTPostAPIGuildEmojiJSON
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#create-application-emoji}
|
||||
*/
|
||||
export type RESTPostAPIApplicationEmojiResult = APIEmoji;
|
||||
export type RESTPostAPIApplicationEmojiResult = APIApplicationEmoji;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
|
||||
@@ -90,7 +90,7 @@ export type RESTPatchAPIApplicationEmojiJSONBody = Pick<RESTPatchAPIGuildEmojiJS
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#modify-application-emoji}
|
||||
*/
|
||||
export type RESTPatchAPIApplicationEmojiResult = APIEmoji;
|
||||
export type RESTPatchAPIApplicationEmojiResult = APIApplicationEmoji;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#delete-application-emoji}
|
||||
|
||||
300
deno/rest/v10/guild.ts
generated
300
deno/rest/v10/guild.ts
generated
@@ -20,12 +20,22 @@ import type {
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildFeature,
|
||||
GuildMemberFlags,
|
||||
GuildMFALevel,
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
GuildWidgetStyle,
|
||||
APIGuildOnboardingPrompt,
|
||||
APIGuildOnboardingPromptOption,
|
||||
APIRoleColors,
|
||||
APIIncidentsData,
|
||||
APIGuildChannel,
|
||||
APIMessageSearchIndexNotReadyResponse,
|
||||
APIMessageSearchResult,
|
||||
MessageSearchAuthorType,
|
||||
MessageSearchEmbedType,
|
||||
MessageSearchHasType,
|
||||
MessageSearchSortMode,
|
||||
} from '../../payloads/v10/mod.ts';
|
||||
import type {
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
|
||||
@@ -96,7 +106,8 @@ export interface RESTAPIGuildCreateRole extends RESTPostAPIGuildRoleJSONBody {
|
||||
export type APIGuildCreateRole = RESTAPIGuildCreateRole;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
|
||||
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
|
||||
* @deprecated
|
||||
*/
|
||||
export interface RESTPostAPIGuildsJSONBody {
|
||||
/**
|
||||
@@ -184,12 +195,14 @@ export interface RESTPostAPIGuildsJSONBody {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
|
||||
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
|
||||
* @deprecated
|
||||
*/
|
||||
export type RESTPostAPIGuildsResult = APIGuild;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level}
|
||||
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
|
||||
* @deprecated
|
||||
*/
|
||||
export interface RESTPostAPIGuildsMFAJSONBody {
|
||||
/**
|
||||
@@ -201,7 +214,8 @@ export interface RESTPostAPIGuildsMFAJSONBody {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level}
|
||||
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
|
||||
* @deprecated
|
||||
*/
|
||||
export type RESTPostAPIGuildsMFAResult = RESTPostAPIGuildsMFAJSONBody;
|
||||
|
||||
@@ -275,6 +289,8 @@ export interface RESTPatchAPIGuildJSONBody {
|
||||
icon?: string | null | undefined;
|
||||
/**
|
||||
* User id to transfer guild ownership to (must be owner)
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
owner_id?: Snowflake | undefined;
|
||||
/**
|
||||
@@ -310,7 +326,7 @@ export interface RESTPatchAPIGuildJSONBody {
|
||||
*/
|
||||
public_updates_channel_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* The preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US"
|
||||
* The preferred locale of a Community guild used in server discovery and notices from Discord
|
||||
*
|
||||
* @defaultValue `"en-US"` (if the value is set to `null`)
|
||||
*/
|
||||
@@ -341,14 +357,15 @@ export interface RESTPatchAPIGuildJSONBody {
|
||||
export type RESTPatchAPIGuildResult = APIGuild;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#delete-guild}
|
||||
* @see {@link https://discord.com/developers/docs/change-log#guild-create-deprecation}
|
||||
* @deprecated
|
||||
*/
|
||||
export type RESTDeleteAPIGuildResult = never;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}
|
||||
*/
|
||||
export type RESTGetAPIGuildChannelsResult = APIChannel[];
|
||||
export type RESTGetAPIGuildChannelsResult = APIGuildChannel[];
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}
|
||||
@@ -371,11 +388,11 @@ export type RESTPatchAPIGuildChannelPositionsJSONBody = {
|
||||
/**
|
||||
* Sorting position of the channel
|
||||
*/
|
||||
position: number;
|
||||
position?: number | null | undefined;
|
||||
/**
|
||||
* Sync channel overwrites with the new parent, when moving to a new `parent_id`
|
||||
*/
|
||||
lock_permissions?: boolean | undefined;
|
||||
lock_permissions?: boolean | null | undefined;
|
||||
/**
|
||||
* The new parent id of this channel
|
||||
*/
|
||||
@@ -512,6 +529,12 @@ export interface RESTPatchAPIGuildMemberJSONBody {
|
||||
* Timestamp of when the time out will be removed; until then, they cannot interact with the guild
|
||||
*/
|
||||
communication_disabled_until?: string | null | undefined;
|
||||
/**
|
||||
* Guild member flags (only {@link GuildMemberFlags.BypassesVerification} can be set)
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
|
||||
*/
|
||||
flags?: GuildMemberFlags | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -519,6 +542,151 @@ export interface RESTPatchAPIGuildMemberJSONBody {
|
||||
*/
|
||||
export type RESTPatchAPIGuildMemberResult = APIGuildMember;
|
||||
|
||||
/**
|
||||
* Returns a list of messages without the `reactions` key that match a search query in the guild. Requires the `READ_MESSAGE_HISTORY` permission.
|
||||
*
|
||||
* @remarks The Search Guild Messages endpoint is restricted according to whether the `MESSAGE_CONTENT` Privileged Intent is enabled for your application.
|
||||
*
|
||||
* If the entity you are searching is not yet indexed, the endpoint will return a 202 accepted response. The response body will not contain any search results, and will look similar to an error response:
|
||||
* ```json
|
||||
* {
|
||||
* "message": "Index not yet available. Try again later",
|
||||
* "code": 110000,
|
||||
* "documents_indexed": 0,
|
||||
* "retry_after": 2
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* Due to speed optimizations, search may return slightly fewer results than the limit specified when messages have not been accessed for a long time.
|
||||
* Clients should not rely on the length of the `messages` array to paginate results.
|
||||
*
|
||||
* Additionally, when messages are actively being created or deleted, the `total_results` field may not be accurate.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
|
||||
*/
|
||||
export interface RESTGetAPIGuildMessagesSearchQuery {
|
||||
/**
|
||||
* Max number of messages to return (1-25)
|
||||
*
|
||||
* @defaultValue `25`
|
||||
*/
|
||||
limit?: number;
|
||||
/**
|
||||
* Number to offset the returned messages by (max 9975)
|
||||
*/
|
||||
offset?: number;
|
||||
/**
|
||||
* Get messages before this message ID
|
||||
*/
|
||||
max_id?: Snowflake;
|
||||
/**
|
||||
* Get messages after this message ID
|
||||
*/
|
||||
min_id?: Snowflake;
|
||||
/**
|
||||
* Max number of words to skip between matching tokens in the search `content` (max 100)
|
||||
*
|
||||
* @defaultValue `2`
|
||||
*/
|
||||
slop?: number;
|
||||
/**
|
||||
* Filter messages by content (max 1024 characters)
|
||||
*/
|
||||
content?: string;
|
||||
/**
|
||||
* Filter messages by these channels (max 500)
|
||||
*/
|
||||
channel_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages by author type
|
||||
*
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-author-types}
|
||||
*/
|
||||
author_type?: MessageSearchAuthorType[];
|
||||
/**
|
||||
* Filter messages by these authors (max 100)
|
||||
*/
|
||||
author_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that mention these users (max 100)
|
||||
*/
|
||||
mentions?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that mention these roles (max 100)
|
||||
*/
|
||||
mentions_role_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that do or do not mention `@everyone`
|
||||
*/
|
||||
mention_everyone?: boolean;
|
||||
/**
|
||||
* Filter messages that reply to these users (max 100)
|
||||
*/
|
||||
replied_to_user_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages that reply to these messages (max 100)
|
||||
*/
|
||||
replied_to_message_id?: Snowflake[];
|
||||
/**
|
||||
* Filter messages by whether they are or are not pinned
|
||||
*/
|
||||
pinned?: boolean;
|
||||
/**
|
||||
* Filter messages by whether or not they have specific things
|
||||
*
|
||||
* @remarks All types can be negated by prefixing them with `-`, which means results will not include messages that match the type.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types}
|
||||
*/
|
||||
has?: MessageSearchHasType[];
|
||||
/**
|
||||
* Filter messages by embed type
|
||||
*
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types}
|
||||
*/
|
||||
embed_type?: MessageSearchEmbedType[];
|
||||
/**
|
||||
* Filter messages by embed provider (case-sensitive, e.g. `Tenor`) (max 256 characters, max 100)
|
||||
*/
|
||||
embed_provider?: string[];
|
||||
/**
|
||||
* Filter messages by link hostname (e.g. `discordapp.com`) (max 256 characters, max 100)
|
||||
*/
|
||||
link_hostname?: string[];
|
||||
/**
|
||||
* Filter messages by attachment filename (max 1024 characters, max 100)
|
||||
*/
|
||||
attachment_filename?: string[];
|
||||
/**
|
||||
* Filter messages by attachment extension (e.g. `txt`) (max 256 characters, max 100)
|
||||
*/
|
||||
attachment_extension?: string[];
|
||||
/**
|
||||
* The sorting algorithm to use
|
||||
*
|
||||
* @remarks Sort order is not respected when sorting by relevance.
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes}
|
||||
*/
|
||||
sort_by?: MessageSearchSortMode;
|
||||
/**
|
||||
* The direction to sort (`asc` or `desc`)
|
||||
*
|
||||
* @defaultValue `'desc'`
|
||||
* @remarks Sort order is not respected when sorting by relevance.
|
||||
*/
|
||||
sort_order?: 'asc' | 'desc';
|
||||
/**
|
||||
* Whether to include results from age-restricted channels
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
include_nsfw?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages-response-body}
|
||||
*/
|
||||
export type RESTGetAPIGuildMessagesSearchResult = APIMessageSearchIndexNotReadyResponse | APIMessageSearchResult;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
|
||||
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
|
||||
@@ -532,6 +700,13 @@ export interface RESTPatchAPICurrentGuildMemberNicknameJSONBody {
|
||||
nick?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
|
||||
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
|
||||
*/
|
||||
export type RESTPatchAPICurrentGuildMemberNicknameResult =
|
||||
_StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
|
||||
*/
|
||||
@@ -542,14 +717,24 @@ export interface RESTPatchAPICurrentGuildMemberJSONBody {
|
||||
* Requires `CHANGE_NICKNAME` permission
|
||||
*/
|
||||
nick?: string | null | undefined;
|
||||
/**
|
||||
* Data URI base64 encoded banner image
|
||||
*/
|
||||
banner?: string | null | undefined;
|
||||
/**
|
||||
* Data URI base64 encoded avatar image
|
||||
*/
|
||||
avatar?: string | null | undefined;
|
||||
/**
|
||||
* Guild member bio
|
||||
*/
|
||||
bio?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-nick}
|
||||
* @deprecated Use {@link https://discord.com/developers/docs/resources/guild#modify-current-member | Modify Current Member} instead.
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}
|
||||
*/
|
||||
export type RESTPatchAPICurrentGuildMemberNicknameResult =
|
||||
_StrictRequired<RESTPatchAPICurrentGuildMemberNicknameJSONBody>;
|
||||
export type RESTPatchAPICurrentGuildMemberResult = APIGuildMember;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member-role}
|
||||
@@ -676,8 +861,15 @@ export interface RESTPostAPIGuildRoleJSONBody {
|
||||
* RGB color value
|
||||
*
|
||||
* @defaultValue `0`
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color?: number | null | undefined;
|
||||
/**
|
||||
* The role's colors
|
||||
*
|
||||
* @defaultValue `{ "primary_color": 0, "secondary_color": null, "tertiary_color": null }`
|
||||
*/
|
||||
colors?: APIRoleColors | undefined;
|
||||
/**
|
||||
* Whether the role should be displayed separately in the sidebar
|
||||
*
|
||||
@@ -738,8 +930,14 @@ export interface RESTPatchAPIGuildRoleJSONBody {
|
||||
permissions?: Permissions | null | undefined;
|
||||
/**
|
||||
* RGB color value
|
||||
*
|
||||
* @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests.
|
||||
*/
|
||||
color?: number | null | undefined;
|
||||
/**
|
||||
* The role's colors
|
||||
*/
|
||||
colors?: APIRoleColors | undefined;
|
||||
/**
|
||||
* Whether the role should be displayed separately in the sidebar
|
||||
*/
|
||||
@@ -773,6 +971,14 @@ export type RESTPatchAPIGuildRoleResult = APIRole;
|
||||
*/
|
||||
export type RESTDeleteAPIGuildRoleResult = never;
|
||||
|
||||
/**
|
||||
* A record mapping role IDs to the number of members that have that role.
|
||||
*
|
||||
* @remarks This does not include the `@everyone` role.
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role-member-counts}
|
||||
*/
|
||||
export type RESTGetAPIGuildRoleMemberCountsResult = Record<Snowflake, number>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
|
||||
*/
|
||||
@@ -898,6 +1104,9 @@ export type RESTGetAPIGuildWidgetImageResult = ArrayBuffer;
|
||||
|
||||
export type RESTGetAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
|
||||
|
||||
/**
|
||||
* @unstable https://github.com/discord/discord-api-docs/pull/2547
|
||||
*/
|
||||
export interface RESTPatchAPIGuildMemberVerificationJSONBody {
|
||||
/**
|
||||
* Whether Membership Screening is enabled
|
||||
@@ -913,6 +1122,9 @@ export interface RESTPatchAPIGuildMemberVerificationJSONBody {
|
||||
description?: string | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable https://github.com/discord/discord-api-docs/pull/2547
|
||||
*/
|
||||
export type RESTPatchAPIGuildMemberVerificationResult = APIGuildMembershipScreening;
|
||||
|
||||
/**
|
||||
@@ -952,38 +1164,42 @@ export type RESTPutAPIGuildOnboardingJSONBody = _AddUndefinedToPossiblyUndefined
|
||||
prompts?: RESTAPIGuildOnboardingPrompt[] | undefined;
|
||||
};
|
||||
|
||||
export type RESTAPIGuildOnboardingPrompt = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPrompt, 'guild_id' | 'id' | 'options' | 'title'>>
|
||||
> &
|
||||
Pick<APIGuildOnboardingPrompt, 'id' | 'title'> & {
|
||||
/**
|
||||
* Options available within the prompt
|
||||
*/
|
||||
options: RESTAPIGuildOnboardingPromptOption[];
|
||||
};
|
||||
export interface RESTAPIGuildOnboardingPrompt
|
||||
extends
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPrompt, 'guild_id' | 'id' | 'options' | 'title'>>
|
||||
>,
|
||||
Pick<APIGuildOnboardingPrompt, 'id' | 'title'> {
|
||||
/**
|
||||
* Options available within the prompt
|
||||
*/
|
||||
options: RESTAPIGuildOnboardingPromptOption[];
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildOnboardingPrompt} instead.
|
||||
*/
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt;
|
||||
|
||||
export type RESTAPIGuildOnboardingPromptOption = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPromptOption, 'emoji' | 'guild_id' | 'title'>>
|
||||
> &
|
||||
Pick<APIGuildOnboardingPromptOption, 'title'> & {
|
||||
/**
|
||||
* Emoji id
|
||||
*/
|
||||
emoji_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* Emoji name
|
||||
*/
|
||||
emoji_name?: string | null | undefined;
|
||||
/**
|
||||
* Whether this emoji is animated
|
||||
*/
|
||||
emoji_animated?: boolean | null | undefined;
|
||||
};
|
||||
export interface RESTAPIGuildOnboardingPromptOption
|
||||
extends
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPromptOption, 'emoji' | 'guild_id' | 'title'>>
|
||||
>,
|
||||
Pick<APIGuildOnboardingPromptOption, 'title'> {
|
||||
/**
|
||||
* Emoji id
|
||||
*/
|
||||
emoji_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* Emoji name
|
||||
*/
|
||||
emoji_name?: string | null | undefined;
|
||||
/**
|
||||
* Whether this emoji is animated
|
||||
*/
|
||||
emoji_animated?: boolean | null | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link RESTAPIGuildOnboardingPromptOption} instead.
|
||||
@@ -1002,9 +1218,11 @@ export interface RESTPutAPIGuildIncidentActionsJSONBody {
|
||||
/**
|
||||
* When invites will be enabled again
|
||||
*/
|
||||
invites_disabled_until?: string | undefined;
|
||||
invites_disabled_until?: string | null | undefined;
|
||||
/**
|
||||
* When direct messages will be enabled again
|
||||
*/
|
||||
dms_disabled_until?: string | undefined;
|
||||
dms_disabled_until?: string | null | undefined;
|
||||
}
|
||||
|
||||
export type RESTPutAPIGuildIncidentActionsResult = APIIncidentsData;
|
||||
|
||||
28
deno/rest/v10/guildScheduledEvent.ts
generated
28
deno/rest/v10/guildScheduledEvent.ts
generated
@@ -56,7 +56,7 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
|
||||
/**
|
||||
* The scheduled entity type of the guild event
|
||||
*/
|
||||
entity_type?: GuildScheduledEventEntityType | undefined;
|
||||
entity_type: GuildScheduledEventEntityType;
|
||||
/**
|
||||
* The entity metadata of the scheduled event
|
||||
*/
|
||||
@@ -94,17 +94,21 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}
|
||||
*/
|
||||
export type RESTPatchAPIGuildScheduledEventJSONBody = _Nullable<
|
||||
Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
> &
|
||||
_StrictPartial<
|
||||
Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
> & {
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
status?: GuildScheduledEventStatus | undefined;
|
||||
};
|
||||
export interface RESTPatchAPIGuildScheduledEventJSONBody
|
||||
extends
|
||||
_Nullable<Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>>,
|
||||
_StrictPartial<
|
||||
Omit<
|
||||
RESTPostAPIGuildScheduledEventJSONBody,
|
||||
'channel_id' | 'description' | 'entity_metadata' | 'recurrence_rule'
|
||||
>
|
||||
> {
|
||||
channel_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
status?: GuildScheduledEventStatus | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}
|
||||
|
||||
47
deno/rest/v10/interactions.ts
generated
47
deno/rest/v10/interactions.ts
generated
@@ -47,26 +47,30 @@ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[];
|
||||
*/
|
||||
export type RESTGetAPIApplicationCommandResult = APIApplicationCommand;
|
||||
|
||||
export type RESTPostAPIBaseApplicationCommandsJSONBody = _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Omit<
|
||||
APIApplicationCommand,
|
||||
| 'application_id'
|
||||
| 'contexts'
|
||||
| 'default_member_permissions'
|
||||
| 'description_localized'
|
||||
| 'description'
|
||||
| 'guild_id'
|
||||
| 'id'
|
||||
| 'integration_types'
|
||||
| 'name_localized'
|
||||
| 'type'
|
||||
| 'version'
|
||||
> &
|
||||
Partial<
|
||||
_NonNullableFields<Pick<APIApplicationCommand, 'contexts'>> &
|
||||
Pick<APIApplicationCommand, 'default_member_permissions' | 'integration_types'>
|
||||
>
|
||||
>;
|
||||
export interface RESTPostAPIBaseApplicationCommandsJSONBody
|
||||
extends
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Omit<
|
||||
APIApplicationCommand,
|
||||
| 'application_id'
|
||||
| 'contexts'
|
||||
| 'default_member_permissions'
|
||||
| 'description_localized'
|
||||
| 'description'
|
||||
| 'guild_id'
|
||||
| 'id'
|
||||
| 'integration_types'
|
||||
| 'name_localized'
|
||||
| 'type'
|
||||
| 'version'
|
||||
>
|
||||
>,
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<
|
||||
_NonNullableFields<Pick<APIApplicationCommand, 'contexts'>> &
|
||||
Pick<APIApplicationCommand, 'default_member_permissions' | 'integration_types'>
|
||||
>
|
||||
> {}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
|
||||
@@ -86,8 +90,7 @@ export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTP
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
|
||||
*/
|
||||
export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody
|
||||
extends RESTPostAPIBaseApplicationCommandsJSONBody {
|
||||
export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody {
|
||||
type: ApplicationCommandType.PrimaryEntryPoint;
|
||||
}
|
||||
|
||||
|
||||
3
deno/rest/v10/invite.ts
generated
3
deno/rest/v10/invite.ts
generated
@@ -11,6 +11,9 @@ export interface RESTGetAPIInviteQuery {
|
||||
with_counts?: boolean;
|
||||
/**
|
||||
* Whether the invite should contain the expiration date
|
||||
*
|
||||
* @deprecated The expiration date is always returned, regardless of this query parameter.
|
||||
* @see {@link https://github.com/discord/discord-api-docs/pull/7424}
|
||||
*/
|
||||
with_expiration?: boolean;
|
||||
/**
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user