mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-21 19:00:32 +00:00
Compare commits
545 Commits
0.37.88
...
fix/intera
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83df57b45a | ||
|
|
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 | ||
|
|
771745c424 | ||
|
|
d3ef6c9fd8 | ||
|
|
a50d6f4fd3 | ||
|
|
a2c1eccc68 | ||
|
|
ebd9814412 | ||
|
|
527ac2fe0f | ||
|
|
aa68bd5336 | ||
|
|
bf3a9f3c35 | ||
|
|
0799b367db | ||
|
|
8f675f6a95 | ||
|
|
f0918bbdef | ||
|
|
e981f95482 | ||
|
|
65a0e8a12d | ||
|
|
b66c4af72a | ||
|
|
9f769c319e | ||
|
|
076e7b8f7b | ||
|
|
048772d1f1 | ||
|
|
5b6f0d43a4 | ||
|
|
cfac62e44a | ||
|
|
def67dbe90 | ||
|
|
ac4d59d17e | ||
|
|
d12dcb103c | ||
|
|
699c3df1ec | ||
|
|
78d6acfdb8 | ||
|
|
19a8371695 | ||
|
|
d5cdb37a8f | ||
|
|
2023a0ab2a | ||
|
|
8fe9c072b3 | ||
|
|
d446be5ecd | ||
|
|
27840d1086 | ||
|
|
1fc2a6ece8 | ||
|
|
f90b47c95c | ||
|
|
cf076b868b | ||
|
|
470f340e75 | ||
|
|
d9b6935b01 | ||
|
|
907c1685a3 | ||
|
|
3f61ce43e9 | ||
|
|
92d0ef46d9 | ||
|
|
b648c89b5e | ||
|
|
6ace234311 | ||
|
|
a9ba1e18bc | ||
|
|
ee53ef7306 | ||
|
|
cddd038a8b | ||
|
|
fc4e7bebc5 | ||
|
|
a81f31178f | ||
|
|
5c6e5ca7bb | ||
|
|
6c13d341a6 | ||
|
|
a7d019eab9 | ||
|
|
936a03982b | ||
|
|
6d8fd9f3d8 | ||
|
|
d222c61e0a | ||
|
|
9f327dd999 | ||
|
|
5d472cbfba | ||
|
|
bcb13de75b | ||
|
|
61592d6a85 | ||
|
|
b3e818fd33 | ||
|
|
3faaf75970 | ||
|
|
fb7c6b8903 | ||
|
|
20f44ac7d9 | ||
|
|
68e19d38e4 | ||
|
|
534dc2f1be | ||
|
|
5c48554c8d | ||
|
|
c69bb52384 | ||
|
|
92b1ce2fae | ||
|
|
4a47ef8c83 | ||
|
|
c52a3f6721 | ||
|
|
079fcd6c00 | ||
|
|
566ae49c74 | ||
|
|
2d22f2fcef | ||
|
|
9b47ba562f | ||
|
|
2e6ad68151 | ||
|
|
9f1fa8c722 | ||
|
|
ace02e2b9b | ||
|
|
e7f0caabaa | ||
|
|
5350806773 | ||
|
|
ced86e4b42 | ||
|
|
8659ac8b8d | ||
|
|
029002b171 | ||
|
|
68273caf10 | ||
|
|
f65246f8fd | ||
|
|
1ba3472938 | ||
|
|
00954701e8 | ||
|
|
7debb55f03 | ||
|
|
f5ebb2088b | ||
|
|
999e48fae0 | ||
|
|
b3b4eb66c0 | ||
|
|
408165e96f | ||
|
|
3f489f18dc | ||
|
|
df0d390303 | ||
|
|
7fa0e159d0 | ||
|
|
f6984045f1 | ||
|
|
092cf01f45 | ||
|
|
3512262194 | ||
|
|
8ada51ac6d | ||
|
|
6813c62e9e | ||
|
|
88d8bed1ca | ||
|
|
736479cab3 | ||
|
|
d673e5f9bb | ||
|
|
7af532c383 | ||
|
|
76b393a7e4 | ||
|
|
daacd2d1b5 | ||
|
|
756658ba85 | ||
|
|
cc6121c2c0 | ||
|
|
bfeaaae9a8 | ||
|
|
82d02a487f | ||
|
|
76fc8f035b | ||
|
|
0fe6059753 | ||
|
|
122ddcb6b1 | ||
|
|
32cabcfcb3 | ||
|
|
6962103023 | ||
|
|
4746e8d486 | ||
|
|
ecf1a17b73 | ||
|
|
a0b7487a09 | ||
|
|
8d46830046 | ||
|
|
ec9819bb2d | ||
|
|
21e9732d85 | ||
|
|
240226f3d2 | ||
|
|
57ee8db3b1 | ||
|
|
2b653a00b3 | ||
|
|
2ae232477a | ||
|
|
5d95d970cf | ||
|
|
2cc5730d32 | ||
|
|
b30a016db3 | ||
|
|
a620bb9f70 | ||
|
|
087d682c3b | ||
|
|
29944fee29 | ||
|
|
a47eca9cb5 | ||
|
|
7fe434114e | ||
|
|
258fb72f38 | ||
|
|
93e649a20d | ||
|
|
d3b5187c77 | ||
|
|
344274b56c | ||
|
|
f770290717 | ||
|
|
b4b70d8bdc | ||
|
|
3de4ca8933 | ||
|
|
8f781909f1 | ||
|
|
3f3fe21e15 | ||
|
|
011d439971 | ||
|
|
0938b664ce | ||
|
|
d1e64eea8d | ||
|
|
557c534b67 | ||
|
|
8054f50230 | ||
|
|
74d80b1e77 | ||
|
|
a9c6985d63 | ||
|
|
4b64f84ddf | ||
|
|
2803e8df2f | ||
|
|
58848bed54 | ||
|
|
f019f0fe97 | ||
|
|
e09ded64b3 | ||
|
|
3aee5c4a0d | ||
|
|
3455ed4cce | ||
|
|
4ef182d009 | ||
|
|
86a9f965dd | ||
|
|
b90fddc285 | ||
|
|
f67043b3f4 | ||
|
|
19d2aeb4a8 | ||
|
|
31b3766b19 | ||
|
|
1b1a865efe | ||
|
|
a85521aa8b | ||
|
|
8b00031c51 | ||
|
|
147e459a16 | ||
|
|
fbfbc6b23f | ||
|
|
906dd8e241 | ||
|
|
25efb9c403 | ||
|
|
822956fe78 | ||
|
|
d5047639e6 | ||
|
|
cbd8d108ee | ||
|
|
d816bf31ab | ||
|
|
71602b5c49 | ||
|
|
6ead98b782 | ||
|
|
ea1a6c3c86 | ||
|
|
a59f9f002f | ||
|
|
ace41f38e4 | ||
|
|
25a6f5330f | ||
|
|
4409fc24c1 | ||
|
|
1178c23389 | ||
|
|
34b0ddd105 | ||
|
|
9c1fc9bdee | ||
|
|
472fe5f837 | ||
|
|
588140c0a9 | ||
|
|
799044d3f0 | ||
|
|
eb7b3d90dd | ||
|
|
2c1ff0ea34 | ||
|
|
5f22a6baca | ||
|
|
cbcd51d093 | ||
|
|
4f66b4dd04 | ||
|
|
da9496f291 | ||
|
|
b1e1c60a07 | ||
|
|
4fdc6db296 | ||
|
|
608f0fa8cd | ||
|
|
0e8b624c3e | ||
|
|
1301b3417c | ||
|
|
e098870a08 | ||
|
|
2049dde09a | ||
|
|
ea7cafaafa | ||
|
|
c05998de27 | ||
|
|
f50ae60ea9 | ||
|
|
0ebf2afb58 | ||
|
|
ee09eafb76 | ||
|
|
a7fac3dc04 | ||
|
|
1fd407f481 | ||
|
|
aa8e307f4d | ||
|
|
897fd90bf2 | ||
|
|
666f0e79bc | ||
|
|
c9117a7bcc | ||
|
|
fe7ba16e3c | ||
|
|
643bf747be | ||
|
|
0340b3c3a1 | ||
|
|
45ef182b79 | ||
|
|
17c19750ae | ||
|
|
088dbe016f | ||
|
|
e3eb86936e | ||
|
|
d201436233 | ||
|
|
d63bea7dfc |
@@ -1,135 +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;
|
||||
|
||||
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: [] }],
|
||||
}),
|
||||
},
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"declaration": false,
|
||||
"declarationMap": false,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": ["./index.ts"]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
deno/
|
||||
@@ -1,21 +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"
|
||||
}
|
||||
}
|
||||
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
deno/** linguist-generated
|
||||
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
|
||||
|
||||
26
.github/CODE_OF_CONDUCT.md
vendored
26
.github/CODE_OF_CONDUCT.md
vendored
@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
|
||||
6
.github/COMMIT_CONVENTION.md
vendored
6
.github/COMMIT_CONVENTION.md
vendored
@@ -74,9 +74,9 @@ The scope could be anything specifying the place of the commit change. For examp
|
||||
|
||||
The subject contains a succinct description of the change:
|
||||
|
||||
- use the imperative, present tense: "change" not "changed" nor "changes"
|
||||
- don't capitalize the first letter
|
||||
- no dot (.) at the end
|
||||
- use the imperative, present tense: "change" not "changed" nor "changes"
|
||||
- don't capitalize the first letter
|
||||
- no dot (.) at the end
|
||||
|
||||
### Body
|
||||
|
||||
|
||||
42
.github/CONTRIBUTING.md
vendored
42
.github/CONTRIBUTING.md
vendored
@@ -1,24 +1,18 @@
|
||||
# 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)
|
||||
- [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)
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
- Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch.
|
||||
- Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch.
|
||||
|
||||
- If adding a new feature:
|
||||
- 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.
|
||||
|
||||
- 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.
|
||||
- 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.
|
||||
|
||||
```
|
||||
fix(Guild): handle events correctly
|
||||
@@ -26,28 +20,28 @@
|
||||
close #28
|
||||
```
|
||||
|
||||
- Provide a detailed description of the bug in the PR. Live demo preferred.
|
||||
- Provide a detailed description of the bug in the PR. Live demo preferred.
|
||||
|
||||
- It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging.
|
||||
- It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging.
|
||||
|
||||
- Make sure tests pass!
|
||||
- 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)).
|
||||
- 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:
|
||||
|
||||
- [TypeScript](https://www.typescriptlang.org/) as the development language
|
||||
- [ESLint](https://eslint.org/) for code-style
|
||||
- [Prettier](https://prettier.io/) for code formatting
|
||||
- [TypeScript](https://www.typescriptlang.org/) as the development language
|
||||
- [ESLint](https://eslint.org/) for code-style
|
||||
- [Prettier](https://prettier.io/) for code formatting
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -1,6 +1,6 @@
|
||||
name: Feature request
|
||||
description: Request a feature for the discord-api-types library (we accept documented features of the official Discord developer API only!)
|
||||
labels: [discussion]
|
||||
labels: [feature request]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
|
||||
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 }}
|
||||
48
.github/workflows/cicd.yml
vendored
48
.github/workflows/cicd.yml
vendored
@@ -12,45 +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/
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Check lint on discord-api-types
|
||||
run: npm run test:lint
|
||||
|
||||
- name: Run TSC
|
||||
run: npm run build:ci
|
||||
|
||||
tsd:
|
||||
name: TSD checks
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: testing
|
||||
if: needs.testing.result == 'success'
|
||||
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js v20
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'yarn'
|
||||
node-version-file: package.json
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
run: yarn
|
||||
|
||||
- name: Run TSD
|
||||
run: npm run test:types
|
||||
- name: Check lint on discord-api-types
|
||||
run: yarn test:lint
|
||||
|
||||
- name: Run TSC
|
||||
run: yarn build:ci
|
||||
|
||||
- name: Run Type Tests
|
||||
run: yarn test:types
|
||||
|
||||
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@v4.3.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 }}
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Create PR for new releases and publish new version
|
||||
name: Release flows
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -10,6 +10,49 @@ on:
|
||||
- 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
|
||||
@@ -17,18 +60,18 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Node v20
|
||||
uses: actions/setup-node@v4
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
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: Install website dependencies
|
||||
run: pushd website && npm ci --ignore-scripts && popd
|
||||
@@ -41,14 +84,14 @@ jobs:
|
||||
- name: Bump version
|
||||
run: node ./scripts/bump-version.mjs
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.USER_PAT }}
|
||||
|
||||
- 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
|
||||
yarn ci:pr
|
||||
|
||||
# Add all changes, commit and push
|
||||
git add --all .
|
||||
@@ -60,7 +103,7 @@ jobs:
|
||||
- name: Create Pull Request
|
||||
run: node ./scripts/actions/create-pr.mjs
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.USER_PAT }}
|
||||
|
||||
create_release:
|
||||
name: Create release and publish
|
||||
@@ -73,25 +116,24 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install Node v20
|
||||
uses: actions/setup-node@v4
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
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: Publish release to npm
|
||||
run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
||||
run: |
|
||||
yarn npm publish
|
||||
|
||||
- name: Create GitHub release
|
||||
run: node ./scripts/actions/create-release.mjs
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.USER_PAT }}
|
||||
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,14 +13,30 @@ website/build
|
||||
|
||||
# Don't format build outputs
|
||||
*.js
|
||||
!eslint.config.js
|
||||
*.d.ts
|
||||
*.mjs
|
||||
|
||||
# Miscellaneous
|
||||
CODEOWNERS
|
||||
renovate.json
|
||||
CHANGELOG.md
|
||||
|
||||
# Format all of scripts
|
||||
!scripts/**/*
|
||||
!.prettierrc.mjs
|
||||
|
||||
# Deprecated versions
|
||||
gateway/v6/*
|
||||
payloads/v6/*
|
||||
rest/v6/*
|
||||
v6.ts
|
||||
|
||||
gateway/v8/*
|
||||
payloads/v8/*
|
||||
rest/v8/*
|
||||
utils/v8.ts
|
||||
v8.ts
|
||||
|
||||
.yarn/*
|
||||
djs/*
|
||||
_generated_
|
||||
|
||||
7
.vscode/settings.json
vendored
7
.vscode/settings.json
vendored
@@ -6,5 +6,10 @@
|
||||
"source.fixAll": "explicit",
|
||||
"source.fixAll.eslint": "explicit"
|
||||
},
|
||||
"cSpell.enableFiletypes": ["mdx"]
|
||||
"cSpell.enableFiletypes": ["mdx"],
|
||||
"search.exclude": {
|
||||
"**/v6": true,
|
||||
"**/v8": true,
|
||||
"deno": true
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}),
|
||||
};
|
||||
942
.yarn/releases/yarn-4.12.0.cjs
vendored
Executable file
942
.yarn/releases/yarn-4.12.0.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.12.0.cjs
|
||||
|
||||
plugins:
|
||||
- path: ./.yarn/plugins/postinstallDev.cjs
|
||||
731
CHANGELOG.md
731
CHANGELOG.md
@@ -1,3 +1,734 @@
|
||||
## [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)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* components v2 ([9f769c3](https://github.com/discordjs/discord-api-types/commit/9f769c319eed0cb3d26d5a5c0cb06f8f4a78c071))
|
||||
* **CDNQuery:** add ImageSize type ([527ac2f](https://github.com/discordjs/discord-api-types/commit/527ac2fe0f80d88e62c025bcdab48d251ac171d6))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* Certain Component alias types have been renamed (for example APIMessageActionRowComponent is now APIComponentInMessageActionRow
|
||||
|
||||
|
||||
|
||||
## [0.37.120](https://github.com/discordjs/discord-api-types/compare/0.37.119...0.37.120) (2025-04-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Ensure autocomplete option values resolve to string for numerical types ([#1198](https://github.com/discordjs/discord-api-types/issues/1198)) ([cfac62e](https://github.com/discordjs/discord-api-types/commit/cfac62e44a02a535b8ed412dae263b8c31475c4a))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APIBaseInteraction:** add `attachment_size_limit` ([#1214](https://github.com/discordjs/discord-api-types/issues/1214)) ([5b6f0d4](https://github.com/discordjs/discord-api-types/commit/5b6f0d43a4e4886a924af840b388c3f482b79f5e))
|
||||
* **RPC:** types ([#1200](https://github.com/discordjs/discord-api-types/issues/1200)) ([ac4d59d](https://github.com/discordjs/discord-api-types/commit/ac4d59d17edfa77cf28c644f8797204035508a0a))
|
||||
* **webhook:** add `with_components` query param ([#1208](https://github.com/discordjs/discord-api-types/issues/1208)) ([def67db](https://github.com/discordjs/discord-api-types/commit/def67dbe90206a2a5c7d08ce734a2db6a9175ca3))
|
||||
|
||||
|
||||
|
||||
## [0.37.119](https://github.com/discordjs/discord-api-types/compare/0.37.118...0.37.119) (2025-02-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* route escaping round three ([d5cdb37](https://github.com/discordjs/discord-api-types/commit/d5cdb37a8f06128e472f1ef13ec4d7823f956e7d))
|
||||
|
||||
|
||||
|
||||
## [0.37.118](https://github.com/discordjs/discord-api-types/compare/0.37.117...0.37.118) (2025-01-27)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APIGuild:** add `incidents_data` ([#822](https://github.com/discordjs/discord-api-types/issues/822)) ([8fe9c07](https://github.com/discordjs/discord-api-types/commit/8fe9c072b3188c51bb3713dae640ba227a266438))
|
||||
* **MessageFlags:** add HasSnapshot ([#1141](https://github.com/discordjs/discord-api-types/issues/1141)) ([d446be5](https://github.com/discordjs/discord-api-types/commit/d446be5ecdcc3889e30a8af1ce2ac598ffe1b49d))
|
||||
|
||||
|
||||
|
||||
## [0.37.117](https://github.com/discordjs/discord-api-types/compare/0.37.116...0.37.117) (2025-01-20)
|
||||
|
||||
|
||||
|
||||
## [0.37.116](https://github.com/discordjs/discord-api-types/compare/0.37.115...0.37.116) (2025-01-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **VoiceCloseCodes:** add `BadRequest` ([#1191](https://github.com/discordjs/discord-api-types/issues/1191)) ([d9b6935](https://github.com/discordjs/discord-api-types/commit/d9b6935b01665db70ddf8971be5ee42c96f12706))
|
||||
|
||||
|
||||
|
||||
## [0.37.115](https://github.com/discordjs/discord-api-types/compare/0.37.114...0.37.115) (2025-01-02)
|
||||
|
||||
|
||||
|
||||
## [0.37.114](https://github.com/discordjs/discord-api-types/compare/0.37.113...0.37.114) (2024-12-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* reset pattern index after testing an input ([ee53ef7](https://github.com/discordjs/discord-api-types/commit/ee53ef7306e73d6b9bf341503231186ef27403fb)), closes [/github.com/discordjs/discord-api-types/issues/1181#issuecomment-2558971449](https://github.com//github.com/discordjs/discord-api-types/issues/1181/issues/issuecomment-2558971449)
|
||||
|
||||
|
||||
|
||||
## [0.37.113](https://github.com/discordjs/discord-api-types/compare/0.37.112...0.37.113) (2024-12-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* skip encoded url parts from re-encoding ([fc4e7be](https://github.com/discordjs/discord-api-types/commit/fc4e7bebc50fe67a0aa5c49a95793e53d3ff0da9))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **ConnectionService:** `Bluesky` and `Mastodon` ([#1174](https://github.com/discordjs/discord-api-types/issues/1174)) ([61592d6](https://github.com/discordjs/discord-api-types/commit/61592d6a85232a6d675a6faeddc096ae3467df6a))
|
||||
* **payloads:** add entrypoint command payloads ([#1166](https://github.com/discordjs/discord-api-types/issues/1166)) ([bcb13de](https://github.com/discordjs/discord-api-types/commit/bcb13de75b6b45e2a5c1ebde5fa77719123b7993))
|
||||
|
||||
|
||||
|
||||
## [0.37.112](https://github.com/discordjs/discord-api-types/compare/0.37.111...0.37.112) (2024-12-19)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APISubscription:** add `renewal_sku_ids` ([#1172](https://github.com/discordjs/discord-api-types/issues/1172)) ([fb7c6b8](https://github.com/discordjs/discord-api-types/commit/fb7c6b8903bded49c379ba61a520818ba5ab15ba))
|
||||
|
||||
|
||||
|
||||
## [0.37.111](https://github.com/discordjs/discord-api-types/compare/0.37.110...0.37.111) (2024-12-09)
|
||||
|
||||
|
||||
|
||||
## [0.37.110](https://github.com/discordjs/discord-api-types/compare/0.37.109...0.37.110) (2024-11-28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add Chrunchyroll ([#1159](https://github.com/discordjs/discord-api-types/issues/1159)) ([92b1ce2](https://github.com/discordjs/discord-api-types/commit/92b1ce2faee4c4b43bfe524e78cfde1fbbfa5792))
|
||||
|
||||
|
||||
|
||||
## [0.37.109](https://github.com/discordjs/discord-api-types/compare/0.37.108...0.37.109) (2024-11-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* New entitlement endpoint behaviour ([#1145](https://github.com/discordjs/discord-api-types/issues/1145)) ([079fcd6](https://github.com/discordjs/discord-api-types/commit/079fcd6c006759193ea0b4b97d0d5a34c0459041))
|
||||
|
||||
|
||||
|
||||
## [0.37.108](https://github.com/discordjs/discord-api-types/compare/0.37.107...0.37.108) (2024-11-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* webhook events ([#1128](https://github.com/discordjs/discord-api-types/issues/1128)) ([ced86e4](https://github.com/discordjs/discord-api-types/commit/ced86e4b42c170c855ee148fb9bdb699ddf1a15b))
|
||||
|
||||
|
||||
|
||||
## [0.37.107](https://github.com/discordjs/discord-api-types/compare/0.37.106...0.37.107) (2024-11-21)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **security:** escape path parameters ([1ba3472](https://github.com/discordjs/discord-api-types/commit/1ba34729386c9b9dece237e761114f6d1ef11143))
|
||||
|
||||
|
||||
|
||||
## [0.37.106](https://github.com/discordjs/discord-api-types/compare/0.37.105...0.37.106) (2024-11-21)
|
||||
|
||||
|
||||
|
||||
## [0.37.105](https://github.com/discordjs/discord-api-types/compare/0.37.104...0.37.105) (2024-11-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **_interactions:** Support partial guild objects ([#1142](https://github.com/discordjs/discord-api-types/issues/1142)) ([408165e](https://github.com/discordjs/discord-api-types/commit/408165e96fdd08d56183cf3c5348ee08e8aec056))
|
||||
* full message object on message update ([#1140](https://github.com/discordjs/discord-api-types/issues/1140)) ([3512262](https://github.com/discordjs/discord-api-types/commit/35122621946ab797d4c0b83cecdec1c3df05b6e0))
|
||||
* guild member banners ([#1057](https://github.com/discordjs/discord-api-types/issues/1057)) ([3f489f1](https://github.com/discordjs/discord-api-types/commit/3f489f18dccf5efe9e4983e66606998fafffc4dd))
|
||||
|
||||
|
||||
|
||||
## [0.37.104](https://github.com/discordjs/discord-api-types/compare/0.37.103...0.37.104) (2024-11-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add missing soundboard types ([#1134](https://github.com/discordjs/discord-api-types/issues/1134)) ([88d8bed](https://github.com/discordjs/discord-api-types/commit/88d8bed1caa88b604fec8f60ae1450f556c26c8e))
|
||||
* **isInteractionButton:** handle `ButtonStyle.Premium` ([#1135](https://github.com/discordjs/discord-api-types/issues/1135)) ([736479c](https://github.com/discordjs/discord-api-types/commit/736479cab3332f6be122965963d37c8d4c99fc7f))
|
||||
|
||||
|
||||
|
||||
## [0.37.103](https://github.com/discordjs/discord-api-types/compare/0.37.102...0.37.103) (2024-10-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* audit log change key for boost bar ([#1120](https://github.com/discordjs/discord-api-types/issues/1120)) ([0fe6059](https://github.com/discordjs/discord-api-types/commit/0fe605975312829702df02b6432fce6d58a00e1f))
|
||||
* soundboard audit log events ([#1122](https://github.com/discordjs/discord-api-types/issues/1122)) ([76fc8f0](https://github.com/discordjs/discord-api-types/commit/76fc8f035b4c92329896eb8110eaa8d640bf8ec8))
|
||||
|
||||
|
||||
|
||||
## [0.37.102](https://github.com/discordjs/discord-api-types/compare/0.37.101...0.37.102) (2024-10-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* recurrence rule change key on audit logs ([#1112](https://github.com/discordjs/discord-api-types/issues/1112)) ([4746e8d](https://github.com/discordjs/discord-api-types/commit/4746e8d48600edf905037a9cb9507884876d9508))
|
||||
* soundboard ([#1113](https://github.com/discordjs/discord-api-types/issues/1113)) ([8d46830](https://github.com/discordjs/discord-api-types/commit/8d468300467db1c0a1726b4dfc6e92018e40e800))
|
||||
|
||||
|
||||
|
||||
## [0.37.101](https://github.com/discordjs/discord-api-types/compare/0.37.100...0.37.101) (2024-09-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **rest/oauth2:** correct string literal types containing bot scope ([#1101](https://github.com/discordjs/discord-api-types/issues/1101)) ([2ae2324](https://github.com/discordjs/discord-api-types/commit/2ae232477a1362eb0bd5c4aeee4a97bfbca7b2a2))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add `VoiceChannelEffectSend` event ([#739](https://github.com/discordjs/discord-api-types/issues/739)) ([240226f](https://github.com/discordjs/discord-api-types/commit/240226f3d2d32df378400671a6bf31ceb2468a3c))
|
||||
* missing subscription dispatch types ([#1105](https://github.com/discordjs/discord-api-types/issues/1105)) ([2b653a0](https://github.com/discordjs/discord-api-types/commit/2b653a00b3acb04979b7656142f3d8ef986fd561))
|
||||
|
||||
|
||||
|
||||
## [0.37.100](https://github.com/discordjs/discord-api-types/compare/0.37.99...0.37.100) (2024-09-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **APIMessageSnapshot:** mark `guild_id` as deprecated ([#1084](https://github.com/discordjs/discord-api-types/issues/1084)) ([3f3fe21](https://github.com/discordjs/discord-api-types/commit/3f3fe21e153f2fbe6c76ba1cc916367551b175b6))
|
||||
* **GatewayGuildDeleteDispatchData:** make `unavailable` optional ([#1092](https://github.com/discordjs/discord-api-types/issues/1092)) ([258fb72](https://github.com/discordjs/discord-api-types/commit/258fb72f38c0513030dc5e1ae60e34fc3f83006d))
|
||||
* replace deprecated `RESTAPIPollCreate` with `RESTAPIPoll` ([#1091](https://github.com/discordjs/discord-api-types/issues/1091)) ([d3b5187](https://github.com/discordjs/discord-api-types/commit/d3b5187c77f845eba29ab56de41408bcea7e9cb4))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add subscriptions ([#1078](https://github.com/discordjs/discord-api-types/issues/1078)) ([8f78190](https://github.com/discordjs/discord-api-types/commit/8f781909f1f5a0d1db8c3e134f4e9e1e22837277))
|
||||
* **APIMessageSnapshotFields:** add more fields ([#1085](https://github.com/discordjs/discord-api-types/issues/1085)) ([3de4ca8](https://github.com/discordjs/discord-api-types/commit/3de4ca8933be23ac05bf780957aea99e4a70c2fe))
|
||||
* **ConnectionService:** add Amazon Music connection ([#1074](https://github.com/discordjs/discord-api-types/issues/1074)) ([011d439](https://github.com/discordjs/discord-api-types/commit/011d439971e1f5ee11ba7caea5ed10131cafd6a6))
|
||||
* entry point commands and interaction callback response ([#1077](https://github.com/discordjs/discord-api-types/issues/1077)) ([b4b70d8](https://github.com/discordjs/discord-api-types/commit/b4b70d8bdcdbc175497366e6bb74dd3bc22c6738))
|
||||
* **FormattingPatterns:** `GuildNavigation` and `LinkedRole` ([#1089](https://github.com/discordjs/discord-api-types/issues/1089)) ([0938b66](https://github.com/discordjs/discord-api-types/commit/0938b664cef8fd3758506a2f689bb20ead616bb4))
|
||||
* **MessageType:** `PurchaseNotification` and `PollResult` ([#1040](https://github.com/discordjs/discord-api-types/issues/1040)) ([344274b](https://github.com/discordjs/discord-api-types/commit/344274b56c25b9a35a64fc61b170c177ee702e95))
|
||||
* **RESTJSONErrorCodes:** add `40018`, `40019`, and `40094` ([#1056](https://github.com/discordjs/discord-api-types/issues/1056)) ([93e649a](https://github.com/discordjs/discord-api-types/commit/93e649a20de0fda31b3276f8affb3cf6890ea693))
|
||||
* **RESTPatchAPIWebhookWithTokenMessageJSONBody:** `poll` ([#1067](https://github.com/discordjs/discord-api-types/issues/1067)) ([f770290](https://github.com/discordjs/discord-api-types/commit/f7702907172f84b57175b6f6c80eb2de210f6a7b))
|
||||
|
||||
|
||||
|
||||
## [0.37.99](https://github.com/discordjs/discord-api-types/compare/0.37.98...0.37.99) (2024-09-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **GuildMemberFlags:** `IsGuest` and `DmSettingsUpsellAcknowledged` ([#1079](https://github.com/discordjs/discord-api-types/issues/1079)) ([2803e8d](https://github.com/discordjs/discord-api-types/commit/2803e8df2f2105099a1dc6e04193355a926718b9))
|
||||
* remove unstable from stable fields ([#1086](https://github.com/discordjs/discord-api-types/issues/1086)) ([4b64f84](https://github.com/discordjs/discord-api-types/commit/4b64f84ddf0390f0a8979f57623c5f8c9051484d))
|
||||
|
||||
|
||||
|
||||
## [0.37.98](https://github.com/discordjs/discord-api-types/compare/0.37.97...0.37.98) (2024-08-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **RESTAPIAttachment:** add more properties ([#1073](https://github.com/discordjs/discord-api-types/issues/1073)) ([f019f0f](https://github.com/discordjs/discord-api-types/commit/f019f0fe97ad47471dd6656e5fb148dc5761e1e0))
|
||||
|
||||
|
||||
|
||||
## [0.37.97](https://github.com/discordjs/discord-api-types/compare/0.37.96...0.37.97) (2024-08-22)
|
||||
|
||||
|
||||
|
||||
## [0.37.96](https://github.com/discordjs/discord-api-types/compare/0.37.95...0.37.96) (2024-08-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* nullable `recurrence_rule` on patch ([#1063](https://github.com/discordjs/discord-api-types/issues/1063)) ([19d2aeb](https://github.com/discordjs/discord-api-types/commit/19d2aeb4a82dc781558240a674c36eadce270abf))
|
||||
* nullable fields for scheduled event editing ([#1064](https://github.com/discordjs/discord-api-types/issues/1064)) ([f67043b](https://github.com/discordjs/discord-api-types/commit/f67043b3f46eea7286e959d223b78d140deac318))
|
||||
|
||||
|
||||
|
||||
## [0.37.95](https://github.com/discordjs/discord-api-types/compare/0.37.94...0.37.95) (2024-08-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* interface name ([#1059](https://github.com/discordjs/discord-api-types/issues/1059)) ([147e459](https://github.com/discordjs/discord-api-types/commit/147e459a16c8b0e15a0dd50f75d62c6dd9098815))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* recurring scheduled events ([#1058](https://github.com/discordjs/discord-api-types/issues/1058)) ([fbfbc6b](https://github.com/discordjs/discord-api-types/commit/fbfbc6b23f2696f6db5fad8ea1543327d5b3cf07))
|
||||
* **RESTJSONErrorCodes:** `UnknownStickerPack` ([#1055](https://github.com/discordjs/discord-api-types/issues/1055)) ([906dd8e](https://github.com/discordjs/discord-api-types/commit/906dd8e241be6acdf4d6d7b10ce4e7c139b0fd8b))
|
||||
* **Routes:** voice state endpoint ([#1046](https://github.com/discordjs/discord-api-types/issues/1046)) ([1b1a865](https://github.com/discordjs/discord-api-types/commit/1b1a865efe4d95b34055616ed18dc3613b58f317))
|
||||
|
||||
|
||||
|
||||
## [0.37.94](https://github.com/discordjs/discord-api-types/compare/0.37.93...0.37.94) (2024-08-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add Get Sticker Pack endpoint ([#1053](https://github.com/discordjs/discord-api-types/issues/1053)) ([822956f](https://github.com/discordjs/discord-api-types/commit/822956fe788f8eeda5da683189973bd6667cbc96))
|
||||
* **APIApplication:** `approximate_user_install_count` ([#1052](https://github.com/discordjs/discord-api-types/issues/1052)) ([d504763](https://github.com/discordjs/discord-api-types/commit/d5047639e691cc26e865cc6c06a312e09f0fb4c7))
|
||||
* **RESTOAuth2:** add RESTPostOAuth2TokenRevocationQuery ([#1050](https://github.com/discordjs/discord-api-types/issues/1050)) ([6ead98b](https://github.com/discordjs/discord-api-types/commit/6ead98b78218830fee308a0425d9078957a662b2))
|
||||
* **Routes:** get method on role endpoint ([#1051](https://github.com/discordjs/discord-api-types/issues/1051)) ([ea1a6c3](https://github.com/discordjs/discord-api-types/commit/ea1a6c3c86ec0d4c663e2191a488a3716ecdd7cc))
|
||||
|
||||
|
||||
|
||||
## [0.37.93](https://github.com/discordjs/discord-api-types/compare/0.37.92...0.37.93) (2024-07-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **CDNRoutes:** inconsistency in route and wrong JSDoc ([#1033](https://github.com/discordjs/discord-api-types/issues/1033)) ([eb7b3d9](https://github.com/discordjs/discord-api-types/commit/eb7b3d90dd6a847b80d051006a597e77d70caab2))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add support for message forwarding ([#971](https://github.com/discordjs/discord-api-types/issues/971)) ([2c1ff0e](https://github.com/discordjs/discord-api-types/commit/2c1ff0ea3443fb500315d6c69674a875a11addf6))
|
||||
* application emojis ([#1036](https://github.com/discordjs/discord-api-types/issues/1036)) ([5f22a6b](https://github.com/discordjs/discord-api-types/commit/5f22a6bacabef6b11e170a6f67694359bb3180e8))
|
||||
* **ConnectionService:** add `Roblox` ([#1032](https://github.com/discordjs/discord-api-types/issues/1032)) ([4f66b4d](https://github.com/discordjs/discord-api-types/commit/4f66b4dd049d2ace638374c09a06272bd517ad3a))
|
||||
* **RESTAPIPartialCurrentUserGuild:** add `banner` ([#1028](https://github.com/discordjs/discord-api-types/issues/1028)) ([da9496f](https://github.com/discordjs/discord-api-types/commit/da9496f291fff364b8d35b02363b93933c19823a))
|
||||
|
||||
|
||||
|
||||
## [0.37.92](https://github.com/discordjs/discord-api-types/compare/0.37.91...0.37.92) (2024-07-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **RESTAPIPollCreate:** optional properties ([#1022](https://github.com/discordjs/discord-api-types/issues/1022)) ([c05998d](https://github.com/discordjs/discord-api-types/commit/c05998de274ef7a8d570db9d23c9ad9c228eeccc))
|
||||
|
||||
|
||||
|
||||
## [0.37.91](https://github.com/discordjs/discord-api-types/compare/0.37.90...0.37.91) (2024-06-27)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APIAttachment:** add `title` ([#1015](https://github.com/discordjs/discord-api-types/issues/1015)) ([897fd90](https://github.com/discordjs/discord-api-types/commit/897fd90bf2705d6ff5eebbb21fa8e735fc1e1e22))
|
||||
|
||||
|
||||
|
||||
## [0.37.90](https://github.com/discordjs/discord-api-types/compare/0.37.89...0.37.90) (2024-06-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add premium buttons ([#1010](https://github.com/discordjs/discord-api-types/issues/1010)) ([088dbe0](https://github.com/discordjs/discord-api-types/commit/088dbe016fdb72fb751931938bf7240c34fa64c0))
|
||||
|
||||
|
||||
|
||||
## [0.37.89](https://github.com/discordjs/discord-api-types/compare/0.37.88...0.37.89) (2024-06-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add use external apps permission ([#999](https://github.com/discordjs/discord-api-types/issues/999)) ([d63bea7](https://github.com/discordjs/discord-api-types/commit/d63bea7dfc748472b2e5ed4e2d45752acc1a3d2a))
|
||||
|
||||
|
||||
|
||||
## [0.37.88](https://github.com/discordjs/discord-api-types/compare/0.37.87...0.37.88) (2024-06-10)
|
||||
|
||||
|
||||
|
||||
23
README.md
23
README.md
@@ -77,25 +77,22 @@ import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v10?dts';
|
||||
|
||||
The exports of each API version is split into three main parts:
|
||||
|
||||
- Everything exported with the `API` prefix represents a payload you may get from the REST API _or_ the Gateway.
|
||||
- Everything exported with the `API` prefix represents a payload you may get from the REST API _or_ the Gateway.
|
||||
|
||||
- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway.
|
||||
- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway.
|
||||
|
||||
- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
|
||||
- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
|
||||
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
|
||||
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
|
||||
|
||||
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
|
||||
- Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2`
|
||||
|
||||
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
|
||||
- If a type ends with `Result`, then it represents the expected result by calling its accompanying route.
|
||||
- Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors.
|
||||
|
||||
- Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2`
|
||||
- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).
|
||||
|
||||
- If a type ends with `Result`, then it represents the expected result by calling its accompanying route.
|
||||
|
||||
- Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors.
|
||||
|
||||
- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).
|
||||
|
||||
- There may be types exported that are identical for all versions. These will be exported as is and can be found in the `globals` file. They will still be prefixed accordingly as described above.
|
||||
- There may be types exported that are identical for all versions. These will be exported as is and can be found in the `globals` file. They will still be prefixed accordingly as described above.
|
||||
|
||||
**A note about how types are documented**: This package will add types only for known and documented properties that are present in Discord's [API Documentation repository](https://github.com/discord/discord-api-docs),
|
||||
that are mentioned in an open pull request, or known through other means _and have received the green light to be used_.
|
||||
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
731
deno/CHANGELOG.md
generated
731
deno/CHANGELOG.md
generated
@@ -1,3 +1,734 @@
|
||||
## [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)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* components v2 ([9f769c3](https://github.com/discordjs/discord-api-types/commit/9f769c319eed0cb3d26d5a5c0cb06f8f4a78c071))
|
||||
* **CDNQuery:** add ImageSize type ([527ac2f](https://github.com/discordjs/discord-api-types/commit/527ac2fe0f80d88e62c025bcdab48d251ac171d6))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* Certain Component alias types have been renamed (for example APIMessageActionRowComponent is now APIComponentInMessageActionRow
|
||||
|
||||
|
||||
|
||||
## [0.37.120](https://github.com/discordjs/discord-api-types/compare/0.37.119...0.37.120) (2025-04-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Ensure autocomplete option values resolve to string for numerical types ([#1198](https://github.com/discordjs/discord-api-types/issues/1198)) ([cfac62e](https://github.com/discordjs/discord-api-types/commit/cfac62e44a02a535b8ed412dae263b8c31475c4a))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APIBaseInteraction:** add `attachment_size_limit` ([#1214](https://github.com/discordjs/discord-api-types/issues/1214)) ([5b6f0d4](https://github.com/discordjs/discord-api-types/commit/5b6f0d43a4e4886a924af840b388c3f482b79f5e))
|
||||
* **RPC:** types ([#1200](https://github.com/discordjs/discord-api-types/issues/1200)) ([ac4d59d](https://github.com/discordjs/discord-api-types/commit/ac4d59d17edfa77cf28c644f8797204035508a0a))
|
||||
* **webhook:** add `with_components` query param ([#1208](https://github.com/discordjs/discord-api-types/issues/1208)) ([def67db](https://github.com/discordjs/discord-api-types/commit/def67dbe90206a2a5c7d08ce734a2db6a9175ca3))
|
||||
|
||||
|
||||
|
||||
## [0.37.119](https://github.com/discordjs/discord-api-types/compare/0.37.118...0.37.119) (2025-02-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* route escaping round three ([d5cdb37](https://github.com/discordjs/discord-api-types/commit/d5cdb37a8f06128e472f1ef13ec4d7823f956e7d))
|
||||
|
||||
|
||||
|
||||
## [0.37.118](https://github.com/discordjs/discord-api-types/compare/0.37.117...0.37.118) (2025-01-27)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APIGuild:** add `incidents_data` ([#822](https://github.com/discordjs/discord-api-types/issues/822)) ([8fe9c07](https://github.com/discordjs/discord-api-types/commit/8fe9c072b3188c51bb3713dae640ba227a266438))
|
||||
* **MessageFlags:** add HasSnapshot ([#1141](https://github.com/discordjs/discord-api-types/issues/1141)) ([d446be5](https://github.com/discordjs/discord-api-types/commit/d446be5ecdcc3889e30a8af1ce2ac598ffe1b49d))
|
||||
|
||||
|
||||
|
||||
## [0.37.117](https://github.com/discordjs/discord-api-types/compare/0.37.116...0.37.117) (2025-01-20)
|
||||
|
||||
|
||||
|
||||
## [0.37.116](https://github.com/discordjs/discord-api-types/compare/0.37.115...0.37.116) (2025-01-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **VoiceCloseCodes:** add `BadRequest` ([#1191](https://github.com/discordjs/discord-api-types/issues/1191)) ([d9b6935](https://github.com/discordjs/discord-api-types/commit/d9b6935b01665db70ddf8971be5ee42c96f12706))
|
||||
|
||||
|
||||
|
||||
## [0.37.115](https://github.com/discordjs/discord-api-types/compare/0.37.114...0.37.115) (2025-01-02)
|
||||
|
||||
|
||||
|
||||
## [0.37.114](https://github.com/discordjs/discord-api-types/compare/0.37.113...0.37.114) (2024-12-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* reset pattern index after testing an input ([ee53ef7](https://github.com/discordjs/discord-api-types/commit/ee53ef7306e73d6b9bf341503231186ef27403fb)), closes [/github.com/discordjs/discord-api-types/issues/1181#issuecomment-2558971449](https://github.com//github.com/discordjs/discord-api-types/issues/1181/issues/issuecomment-2558971449)
|
||||
|
||||
|
||||
|
||||
## [0.37.113](https://github.com/discordjs/discord-api-types/compare/0.37.112...0.37.113) (2024-12-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* skip encoded url parts from re-encoding ([fc4e7be](https://github.com/discordjs/discord-api-types/commit/fc4e7bebc50fe67a0aa5c49a95793e53d3ff0da9))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **ConnectionService:** `Bluesky` and `Mastodon` ([#1174](https://github.com/discordjs/discord-api-types/issues/1174)) ([61592d6](https://github.com/discordjs/discord-api-types/commit/61592d6a85232a6d675a6faeddc096ae3467df6a))
|
||||
* **payloads:** add entrypoint command payloads ([#1166](https://github.com/discordjs/discord-api-types/issues/1166)) ([bcb13de](https://github.com/discordjs/discord-api-types/commit/bcb13de75b6b45e2a5c1ebde5fa77719123b7993))
|
||||
|
||||
|
||||
|
||||
## [0.37.112](https://github.com/discordjs/discord-api-types/compare/0.37.111...0.37.112) (2024-12-19)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APISubscription:** add `renewal_sku_ids` ([#1172](https://github.com/discordjs/discord-api-types/issues/1172)) ([fb7c6b8](https://github.com/discordjs/discord-api-types/commit/fb7c6b8903bded49c379ba61a520818ba5ab15ba))
|
||||
|
||||
|
||||
|
||||
## [0.37.111](https://github.com/discordjs/discord-api-types/compare/0.37.110...0.37.111) (2024-12-09)
|
||||
|
||||
|
||||
|
||||
## [0.37.110](https://github.com/discordjs/discord-api-types/compare/0.37.109...0.37.110) (2024-11-28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add Chrunchyroll ([#1159](https://github.com/discordjs/discord-api-types/issues/1159)) ([92b1ce2](https://github.com/discordjs/discord-api-types/commit/92b1ce2faee4c4b43bfe524e78cfde1fbbfa5792))
|
||||
|
||||
|
||||
|
||||
## [0.37.109](https://github.com/discordjs/discord-api-types/compare/0.37.108...0.37.109) (2024-11-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* New entitlement endpoint behaviour ([#1145](https://github.com/discordjs/discord-api-types/issues/1145)) ([079fcd6](https://github.com/discordjs/discord-api-types/commit/079fcd6c006759193ea0b4b97d0d5a34c0459041))
|
||||
|
||||
|
||||
|
||||
## [0.37.108](https://github.com/discordjs/discord-api-types/compare/0.37.107...0.37.108) (2024-11-25)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* webhook events ([#1128](https://github.com/discordjs/discord-api-types/issues/1128)) ([ced86e4](https://github.com/discordjs/discord-api-types/commit/ced86e4b42c170c855ee148fb9bdb699ddf1a15b))
|
||||
|
||||
|
||||
|
||||
## [0.37.107](https://github.com/discordjs/discord-api-types/compare/0.37.106...0.37.107) (2024-11-21)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **security:** escape path parameters ([1ba3472](https://github.com/discordjs/discord-api-types/commit/1ba34729386c9b9dece237e761114f6d1ef11143))
|
||||
|
||||
|
||||
|
||||
## [0.37.106](https://github.com/discordjs/discord-api-types/compare/0.37.105...0.37.106) (2024-11-21)
|
||||
|
||||
|
||||
|
||||
## [0.37.105](https://github.com/discordjs/discord-api-types/compare/0.37.104...0.37.105) (2024-11-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **_interactions:** Support partial guild objects ([#1142](https://github.com/discordjs/discord-api-types/issues/1142)) ([408165e](https://github.com/discordjs/discord-api-types/commit/408165e96fdd08d56183cf3c5348ee08e8aec056))
|
||||
* full message object on message update ([#1140](https://github.com/discordjs/discord-api-types/issues/1140)) ([3512262](https://github.com/discordjs/discord-api-types/commit/35122621946ab797d4c0b83cecdec1c3df05b6e0))
|
||||
* guild member banners ([#1057](https://github.com/discordjs/discord-api-types/issues/1057)) ([3f489f1](https://github.com/discordjs/discord-api-types/commit/3f489f18dccf5efe9e4983e66606998fafffc4dd))
|
||||
|
||||
|
||||
|
||||
## [0.37.104](https://github.com/discordjs/discord-api-types/compare/0.37.103...0.37.104) (2024-11-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add missing soundboard types ([#1134](https://github.com/discordjs/discord-api-types/issues/1134)) ([88d8bed](https://github.com/discordjs/discord-api-types/commit/88d8bed1caa88b604fec8f60ae1450f556c26c8e))
|
||||
* **isInteractionButton:** handle `ButtonStyle.Premium` ([#1135](https://github.com/discordjs/discord-api-types/issues/1135)) ([736479c](https://github.com/discordjs/discord-api-types/commit/736479cab3332f6be122965963d37c8d4c99fc7f))
|
||||
|
||||
|
||||
|
||||
## [0.37.103](https://github.com/discordjs/discord-api-types/compare/0.37.102...0.37.103) (2024-10-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* audit log change key for boost bar ([#1120](https://github.com/discordjs/discord-api-types/issues/1120)) ([0fe6059](https://github.com/discordjs/discord-api-types/commit/0fe605975312829702df02b6432fce6d58a00e1f))
|
||||
* soundboard audit log events ([#1122](https://github.com/discordjs/discord-api-types/issues/1122)) ([76fc8f0](https://github.com/discordjs/discord-api-types/commit/76fc8f035b4c92329896eb8110eaa8d640bf8ec8))
|
||||
|
||||
|
||||
|
||||
## [0.37.102](https://github.com/discordjs/discord-api-types/compare/0.37.101...0.37.102) (2024-10-14)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* recurrence rule change key on audit logs ([#1112](https://github.com/discordjs/discord-api-types/issues/1112)) ([4746e8d](https://github.com/discordjs/discord-api-types/commit/4746e8d48600edf905037a9cb9507884876d9508))
|
||||
* soundboard ([#1113](https://github.com/discordjs/discord-api-types/issues/1113)) ([8d46830](https://github.com/discordjs/discord-api-types/commit/8d468300467db1c0a1726b4dfc6e92018e40e800))
|
||||
|
||||
|
||||
|
||||
## [0.37.101](https://github.com/discordjs/discord-api-types/compare/0.37.100...0.37.101) (2024-09-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **rest/oauth2:** correct string literal types containing bot scope ([#1101](https://github.com/discordjs/discord-api-types/issues/1101)) ([2ae2324](https://github.com/discordjs/discord-api-types/commit/2ae232477a1362eb0bd5c4aeee4a97bfbca7b2a2))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add `VoiceChannelEffectSend` event ([#739](https://github.com/discordjs/discord-api-types/issues/739)) ([240226f](https://github.com/discordjs/discord-api-types/commit/240226f3d2d32df378400671a6bf31ceb2468a3c))
|
||||
* missing subscription dispatch types ([#1105](https://github.com/discordjs/discord-api-types/issues/1105)) ([2b653a0](https://github.com/discordjs/discord-api-types/commit/2b653a00b3acb04979b7656142f3d8ef986fd561))
|
||||
|
||||
|
||||
|
||||
## [0.37.100](https://github.com/discordjs/discord-api-types/compare/0.37.99...0.37.100) (2024-09-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **APIMessageSnapshot:** mark `guild_id` as deprecated ([#1084](https://github.com/discordjs/discord-api-types/issues/1084)) ([3f3fe21](https://github.com/discordjs/discord-api-types/commit/3f3fe21e153f2fbe6c76ba1cc916367551b175b6))
|
||||
* **GatewayGuildDeleteDispatchData:** make `unavailable` optional ([#1092](https://github.com/discordjs/discord-api-types/issues/1092)) ([258fb72](https://github.com/discordjs/discord-api-types/commit/258fb72f38c0513030dc5e1ae60e34fc3f83006d))
|
||||
* replace deprecated `RESTAPIPollCreate` with `RESTAPIPoll` ([#1091](https://github.com/discordjs/discord-api-types/issues/1091)) ([d3b5187](https://github.com/discordjs/discord-api-types/commit/d3b5187c77f845eba29ab56de41408bcea7e9cb4))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add subscriptions ([#1078](https://github.com/discordjs/discord-api-types/issues/1078)) ([8f78190](https://github.com/discordjs/discord-api-types/commit/8f781909f1f5a0d1db8c3e134f4e9e1e22837277))
|
||||
* **APIMessageSnapshotFields:** add more fields ([#1085](https://github.com/discordjs/discord-api-types/issues/1085)) ([3de4ca8](https://github.com/discordjs/discord-api-types/commit/3de4ca8933be23ac05bf780957aea99e4a70c2fe))
|
||||
* **ConnectionService:** add Amazon Music connection ([#1074](https://github.com/discordjs/discord-api-types/issues/1074)) ([011d439](https://github.com/discordjs/discord-api-types/commit/011d439971e1f5ee11ba7caea5ed10131cafd6a6))
|
||||
* entry point commands and interaction callback response ([#1077](https://github.com/discordjs/discord-api-types/issues/1077)) ([b4b70d8](https://github.com/discordjs/discord-api-types/commit/b4b70d8bdcdbc175497366e6bb74dd3bc22c6738))
|
||||
* **FormattingPatterns:** `GuildNavigation` and `LinkedRole` ([#1089](https://github.com/discordjs/discord-api-types/issues/1089)) ([0938b66](https://github.com/discordjs/discord-api-types/commit/0938b664cef8fd3758506a2f689bb20ead616bb4))
|
||||
* **MessageType:** `PurchaseNotification` and `PollResult` ([#1040](https://github.com/discordjs/discord-api-types/issues/1040)) ([344274b](https://github.com/discordjs/discord-api-types/commit/344274b56c25b9a35a64fc61b170c177ee702e95))
|
||||
* **RESTJSONErrorCodes:** add `40018`, `40019`, and `40094` ([#1056](https://github.com/discordjs/discord-api-types/issues/1056)) ([93e649a](https://github.com/discordjs/discord-api-types/commit/93e649a20de0fda31b3276f8affb3cf6890ea693))
|
||||
* **RESTPatchAPIWebhookWithTokenMessageJSONBody:** `poll` ([#1067](https://github.com/discordjs/discord-api-types/issues/1067)) ([f770290](https://github.com/discordjs/discord-api-types/commit/f7702907172f84b57175b6f6c80eb2de210f6a7b))
|
||||
|
||||
|
||||
|
||||
## [0.37.99](https://github.com/discordjs/discord-api-types/compare/0.37.98...0.37.99) (2024-09-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **GuildMemberFlags:** `IsGuest` and `DmSettingsUpsellAcknowledged` ([#1079](https://github.com/discordjs/discord-api-types/issues/1079)) ([2803e8d](https://github.com/discordjs/discord-api-types/commit/2803e8df2f2105099a1dc6e04193355a926718b9))
|
||||
* remove unstable from stable fields ([#1086](https://github.com/discordjs/discord-api-types/issues/1086)) ([4b64f84](https://github.com/discordjs/discord-api-types/commit/4b64f84ddf0390f0a8979f57623c5f8c9051484d))
|
||||
|
||||
|
||||
|
||||
## [0.37.98](https://github.com/discordjs/discord-api-types/compare/0.37.97...0.37.98) (2024-08-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **RESTAPIAttachment:** add more properties ([#1073](https://github.com/discordjs/discord-api-types/issues/1073)) ([f019f0f](https://github.com/discordjs/discord-api-types/commit/f019f0fe97ad47471dd6656e5fb148dc5761e1e0))
|
||||
|
||||
|
||||
|
||||
## [0.37.97](https://github.com/discordjs/discord-api-types/compare/0.37.96...0.37.97) (2024-08-22)
|
||||
|
||||
|
||||
|
||||
## [0.37.96](https://github.com/discordjs/discord-api-types/compare/0.37.95...0.37.96) (2024-08-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* nullable `recurrence_rule` on patch ([#1063](https://github.com/discordjs/discord-api-types/issues/1063)) ([19d2aeb](https://github.com/discordjs/discord-api-types/commit/19d2aeb4a82dc781558240a674c36eadce270abf))
|
||||
* nullable fields for scheduled event editing ([#1064](https://github.com/discordjs/discord-api-types/issues/1064)) ([f67043b](https://github.com/discordjs/discord-api-types/commit/f67043b3f46eea7286e959d223b78d140deac318))
|
||||
|
||||
|
||||
|
||||
## [0.37.95](https://github.com/discordjs/discord-api-types/compare/0.37.94...0.37.95) (2024-08-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* interface name ([#1059](https://github.com/discordjs/discord-api-types/issues/1059)) ([147e459](https://github.com/discordjs/discord-api-types/commit/147e459a16c8b0e15a0dd50f75d62c6dd9098815))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* recurring scheduled events ([#1058](https://github.com/discordjs/discord-api-types/issues/1058)) ([fbfbc6b](https://github.com/discordjs/discord-api-types/commit/fbfbc6b23f2696f6db5fad8ea1543327d5b3cf07))
|
||||
* **RESTJSONErrorCodes:** `UnknownStickerPack` ([#1055](https://github.com/discordjs/discord-api-types/issues/1055)) ([906dd8e](https://github.com/discordjs/discord-api-types/commit/906dd8e241be6acdf4d6d7b10ce4e7c139b0fd8b))
|
||||
* **Routes:** voice state endpoint ([#1046](https://github.com/discordjs/discord-api-types/issues/1046)) ([1b1a865](https://github.com/discordjs/discord-api-types/commit/1b1a865efe4d95b34055616ed18dc3613b58f317))
|
||||
|
||||
|
||||
|
||||
## [0.37.94](https://github.com/discordjs/discord-api-types/compare/0.37.93...0.37.94) (2024-08-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add Get Sticker Pack endpoint ([#1053](https://github.com/discordjs/discord-api-types/issues/1053)) ([822956f](https://github.com/discordjs/discord-api-types/commit/822956fe788f8eeda5da683189973bd6667cbc96))
|
||||
* **APIApplication:** `approximate_user_install_count` ([#1052](https://github.com/discordjs/discord-api-types/issues/1052)) ([d504763](https://github.com/discordjs/discord-api-types/commit/d5047639e691cc26e865cc6c06a312e09f0fb4c7))
|
||||
* **RESTOAuth2:** add RESTPostOAuth2TokenRevocationQuery ([#1050](https://github.com/discordjs/discord-api-types/issues/1050)) ([6ead98b](https://github.com/discordjs/discord-api-types/commit/6ead98b78218830fee308a0425d9078957a662b2))
|
||||
* **Routes:** get method on role endpoint ([#1051](https://github.com/discordjs/discord-api-types/issues/1051)) ([ea1a6c3](https://github.com/discordjs/discord-api-types/commit/ea1a6c3c86ec0d4c663e2191a488a3716ecdd7cc))
|
||||
|
||||
|
||||
|
||||
## [0.37.93](https://github.com/discordjs/discord-api-types/compare/0.37.92...0.37.93) (2024-07-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **CDNRoutes:** inconsistency in route and wrong JSDoc ([#1033](https://github.com/discordjs/discord-api-types/issues/1033)) ([eb7b3d9](https://github.com/discordjs/discord-api-types/commit/eb7b3d90dd6a847b80d051006a597e77d70caab2))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add support for message forwarding ([#971](https://github.com/discordjs/discord-api-types/issues/971)) ([2c1ff0e](https://github.com/discordjs/discord-api-types/commit/2c1ff0ea3443fb500315d6c69674a875a11addf6))
|
||||
* application emojis ([#1036](https://github.com/discordjs/discord-api-types/issues/1036)) ([5f22a6b](https://github.com/discordjs/discord-api-types/commit/5f22a6bacabef6b11e170a6f67694359bb3180e8))
|
||||
* **ConnectionService:** add `Roblox` ([#1032](https://github.com/discordjs/discord-api-types/issues/1032)) ([4f66b4d](https://github.com/discordjs/discord-api-types/commit/4f66b4dd049d2ace638374c09a06272bd517ad3a))
|
||||
* **RESTAPIPartialCurrentUserGuild:** add `banner` ([#1028](https://github.com/discordjs/discord-api-types/issues/1028)) ([da9496f](https://github.com/discordjs/discord-api-types/commit/da9496f291fff364b8d35b02363b93933c19823a))
|
||||
|
||||
|
||||
|
||||
## [0.37.92](https://github.com/discordjs/discord-api-types/compare/0.37.91...0.37.92) (2024-07-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **RESTAPIPollCreate:** optional properties ([#1022](https://github.com/discordjs/discord-api-types/issues/1022)) ([c05998d](https://github.com/discordjs/discord-api-types/commit/c05998de274ef7a8d570db9d23c9ad9c228eeccc))
|
||||
|
||||
|
||||
|
||||
## [0.37.91](https://github.com/discordjs/discord-api-types/compare/0.37.90...0.37.91) (2024-06-27)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **APIAttachment:** add `title` ([#1015](https://github.com/discordjs/discord-api-types/issues/1015)) ([897fd90](https://github.com/discordjs/discord-api-types/commit/897fd90bf2705d6ff5eebbb21fa8e735fc1e1e22))
|
||||
|
||||
|
||||
|
||||
## [0.37.90](https://github.com/discordjs/discord-api-types/compare/0.37.89...0.37.90) (2024-06-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add premium buttons ([#1010](https://github.com/discordjs/discord-api-types/issues/1010)) ([088dbe0](https://github.com/discordjs/discord-api-types/commit/088dbe016fdb72fb751931938bf7240c34fa64c0))
|
||||
|
||||
|
||||
|
||||
## [0.37.89](https://github.com/discordjs/discord-api-types/compare/0.37.88...0.37.89) (2024-06-13)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Add use external apps permission ([#999](https://github.com/discordjs/discord-api-types/issues/999)) ([d63bea7](https://github.com/discordjs/discord-api-types/commit/d63bea7dfc748472b2e5ed4e2d45752acc1a3d2a))
|
||||
|
||||
|
||||
|
||||
## [0.37.88](https://github.com/discordjs/discord-api-types/compare/0.37.87...0.37.88) (2024-06-10)
|
||||
|
||||
|
||||
|
||||
23
deno/README.md
generated
23
deno/README.md
generated
@@ -77,25 +77,22 @@ import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v10?dts';
|
||||
|
||||
The exports of each API version is split into three main parts:
|
||||
|
||||
- Everything exported with the `API` prefix represents a payload you may get from the REST API _or_ the Gateway.
|
||||
- Everything exported with the `API` prefix represents a payload you may get from the REST API _or_ the Gateway.
|
||||
|
||||
- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway.
|
||||
- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway.
|
||||
|
||||
- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
|
||||
- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API.
|
||||
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
|
||||
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
|
||||
|
||||
- For endpoint options, they will follow the following structure: `REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result>` where the type represents what it will return.
|
||||
- Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2`
|
||||
|
||||
- For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`.
|
||||
- If a type ends with `Result`, then it represents the expected result by calling its accompanying route.
|
||||
- Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors.
|
||||
|
||||
- Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `REST<HTTP Method>OAuth2`
|
||||
- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).
|
||||
|
||||
- If a type ends with `Result`, then it represents the expected result by calling its accompanying route.
|
||||
|
||||
- Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors.
|
||||
|
||||
- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object).
|
||||
|
||||
- There may be types exported that are identical for all versions. These will be exported as is and can be found in the `globals` file. They will still be prefixed accordingly as described above.
|
||||
- There may be types exported that are identical for all versions. These will be exported as is and can be found in the `globals` file. They will still be prefixed accordingly as described above.
|
||||
|
||||
**A note about how types are documented**: This package will add types only for known and documented properties that are present in Discord's [API Documentation repository](https://github.com/discord/discord-api-docs),
|
||||
that are mentioned in an open pull request, or known through other means _and have received the green light to be used_.
|
||||
|
||||
4
deno/gateway/common.ts
generated
4
deno/gateway/common.ts
generated
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#connecting-gateway-url-query-string-params
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway#connecting-gateway-url-query-string-params}
|
||||
*/
|
||||
export interface GatewayURLQuery {
|
||||
v: string;
|
||||
encoding: 'etf' | 'json';
|
||||
compress?: 'zlib-stream';
|
||||
compress?: 'zlib-stream' | 'zstd-stream';
|
||||
}
|
||||
|
||||
1372
deno/gateway/v10.ts
generated
1372
deno/gateway/v10.ts
generated
File diff suppressed because it is too large
Load Diff
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.
|
||||
|
||||
6
deno/gateway/v8.ts
generated
6
deno/gateway/v8.ts
generated
@@ -24,9 +24,9 @@ import type {
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
} from '../payloads/v8/mod.ts';
|
||||
import type { Nullable } from '../utils/internals.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.
|
||||
@@ -805,7 +805,7 @@ export type GatewayGuildMemberUpdateDispatch = DataPayload<
|
||||
*
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export type GatewayGuildMemberUpdateDispatchData = Nullable<Pick<APIGuildMember, 'joined_at'>> &
|
||||
export type GatewayGuildMemberUpdateDispatchData = _Nullable<Pick<APIGuildMember, 'joined_at'>> &
|
||||
Omit<APIGuildMember, 'deaf' | 'joined_at' | 'mute' | 'user'> &
|
||||
Partial<Pick<APIGuildMember, 'deaf' | 'mute'>> &
|
||||
Required<Pick<APIGuildMember, 'user'>> & {
|
||||
|
||||
1374
deno/gateway/v9.ts
generated
1374
deno/gateway/v9.ts
generated
File diff suppressed because it is too large
Load Diff
31
deno/globals.ts
generated
31
deno/globals.ts
generated
@@ -1,17 +1,18 @@
|
||||
/**
|
||||
* https://discord.com/developers/docs/reference#snowflakes
|
||||
* @see {@link https://discord.com/developers/docs/reference#snowflakes}
|
||||
*/
|
||||
export type Snowflake = string;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions
|
||||
*
|
||||
* @internal
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions}
|
||||
*/
|
||||
export type Permissions = string;
|
||||
|
||||
const timestampStyles = 'DFRSTdfst';
|
||||
const timestampLength = 13;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/reference#message-formatting-formats
|
||||
* @see {@link https://discord.com/developers/docs/reference#message-formatting-formats}
|
||||
*/
|
||||
export const FormattingPatterns = {
|
||||
/**
|
||||
@@ -54,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
|
||||
@@ -79,20 +79,31 @@ 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
|
||||
*
|
||||
* The `type` group property is present on the `exec` result of this expression
|
||||
*/
|
||||
GuildNavigation: /<id:(?<type>customize|browse|guide|linked-roles)>/,
|
||||
/**
|
||||
* Regular expression for matching a linked role mention
|
||||
*
|
||||
* The `id` group property is present on the `exec` result of this expression
|
||||
*/
|
||||
LinkedRole: /<id:linked-roles:(?<id>\d{17,20})>/,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
|
||||
37
deno/payloads/common.ts
generated
37
deno/payloads/common.ts
generated
@@ -1,7 +1,7 @@
|
||||
import type { LocaleString } from '../rest/common.ts';
|
||||
import type { Locale } from '../rest/common.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags}
|
||||
*
|
||||
* These flags are exported as `BigInt`s and NOT numbers. Wrapping them in `Number()`
|
||||
* may cause issues, try to use BigInts as much as possible or modules that can
|
||||
@@ -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
|
||||
*/
|
||||
@@ -178,7 +177,7 @@ export const PermissionFlagsBits = {
|
||||
/**
|
||||
* Allows management and editing of emojis, stickers, and soundboard sounds
|
||||
*
|
||||
* @deprecated This is the old name for {@apilink PermissionFlagsBits#ManageGuildExpressions}
|
||||
* @deprecated This is the old name for {@link PermissionFlagsBits.ManageGuildExpressions}
|
||||
*/
|
||||
ManageEmojisAndStickers: 1n << 30n,
|
||||
/**
|
||||
@@ -234,9 +233,9 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
SendMessagesInThreads: 1n << 38n,
|
||||
/**
|
||||
* Allows for using Activities (applications with the {@apilink ApplicationFlags.Embedded} flag) in a voice channel
|
||||
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag)
|
||||
*
|
||||
* Applies to channel types: Voice
|
||||
* Applies to channel types: Text, Voice
|
||||
*/
|
||||
UseEmbeddedActivities: 1n << 39n,
|
||||
/**
|
||||
@@ -282,6 +281,24 @@ export const PermissionFlagsBits = {
|
||||
* Applies to channel types: Text, Voice, Stage
|
||||
*/
|
||||
SendPolls: 1n << 49n,
|
||||
/**
|
||||
* Allows user-installed apps to send public responses. When disabled, users will still be allowed to use their apps but the responses will be ephemeral. This only applies to apps not also installed to the server
|
||||
*
|
||||
* Applies to channel types: Text, Voice, Stage
|
||||
*/
|
||||
UseExternalApps: 1n << 50n,
|
||||
/**
|
||||
* Allows pinning and unpinning messages
|
||||
*
|
||||
* Applies to channel types: Text
|
||||
*/
|
||||
PinMessages: 1n << 51n,
|
||||
/**
|
||||
* Allows bypassing slowmode restrictions
|
||||
*
|
||||
* Applies to channel types: Text, Voice, Stage
|
||||
*/
|
||||
BypassSlowmode: 1n << 52n,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
@@ -291,10 +308,10 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
Object.freeze(PermissionFlagsBits);
|
||||
|
||||
export type LocalizationMap = Partial<Record<LocaleString, string | null>>;
|
||||
export type LocalizationMap = Partial<Record<Locale, string | null>>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#json
|
||||
* @see {@link https://discord.com/developers/docs/topics/opcodes-and-status-codes#json}
|
||||
*/
|
||||
export interface RESTError {
|
||||
code: number;
|
||||
@@ -314,7 +331,7 @@ export interface RESTErrorGroupWrapper {
|
||||
export type RESTErrorData = RESTErrorFieldInformation | RESTErrorGroupWrapper | string | { [k: string]: RESTErrorData };
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/rate-limits#exceeding-a-rate-limit-rate-limit-response-structure
|
||||
* @see {@link https://discord.com/developers/docs/topics/rate-limits#exceeding-a-rate-limit-rate-limit-response-structure}
|
||||
*/
|
||||
export interface RESTRateLimit {
|
||||
/**
|
||||
|
||||
@@ -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<
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { InteractionType } from '../../responses.ts';
|
||||
import type {
|
||||
APIApplicationCommandOptionBase,
|
||||
APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper,
|
||||
@@ -5,8 +6,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
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.
|
||||
*/
|
||||
@@ -22,7 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Integer, number> {
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Integer,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { InteractionType } from '../../responses.ts';
|
||||
import type {
|
||||
APIApplicationCommandOptionBase,
|
||||
APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper,
|
||||
@@ -5,8 +6,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
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.
|
||||
*/
|
||||
@@ -22,7 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataNumberOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Number, number> {
|
||||
export interface APIApplicationCommandInteractionDataNumberOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Number,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { LocalizationMap } from '../../../../../v10.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type}
|
||||
*/
|
||||
export enum ApplicationCommandOptionType {
|
||||
Subcommand = 1,
|
||||
@@ -18,7 +18,7 @@ export enum ApplicationCommandOptionType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure}
|
||||
*/
|
||||
export interface APIApplicationCommandOptionChoice<ValueType = number | string> {
|
||||
name: string;
|
||||
|
||||
@@ -5,8 +5,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import type { InteractionType } from '../../responses.ts';
|
||||
import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput.ts';
|
||||
import type { APIApplicationCommandOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandSubcommandOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
options?: APIApplicationCommandBasicOption[];
|
||||
}
|
||||
|
||||
export interface APIApplicationCommandInteractionDataSubcommandOption {
|
||||
export interface APIApplicationCommandInteractionDataSubcommandOption<Type extends InteractionType = InteractionType> {
|
||||
name: string;
|
||||
type: ApplicationCommandOptionType.Subcommand;
|
||||
options?: APIApplicationCommandInteractionDataBasicOption[];
|
||||
options?: APIApplicationCommandInteractionDataBasicOption<Type>[];
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { InteractionType } from '../../responses.ts';
|
||||
import type { APIApplicationCommandOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
import type {
|
||||
@@ -5,13 +6,14 @@ import type {
|
||||
APIApplicationCommandSubcommandOption,
|
||||
} from './subcommand.ts';
|
||||
|
||||
export interface APIApplicationCommandSubcommandGroupOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
options?: APIApplicationCommandSubcommandOption[];
|
||||
}
|
||||
|
||||
export interface APIApplicationCommandInteractionDataSubcommandGroupOption {
|
||||
export interface APIApplicationCommandInteractionDataSubcommandGroupOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> {
|
||||
name: string;
|
||||
type: ApplicationCommandOptionType.SubcommandGroup;
|
||||
options: APIApplicationCommandInteractionDataSubcommandOption[];
|
||||
options: APIApplicationCommandInteractionDataSubcommandOption<Type>[];
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { APIInteractionDataResolved } from '../../mod.ts';
|
||||
import type { APIInteractionDataResolved, InteractionType } from '../../mod.ts';
|
||||
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
|
||||
import type {
|
||||
@@ -47,22 +47,22 @@ 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';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure}
|
||||
*/
|
||||
export type APIApplicationCommandBasicOption =
|
||||
| APIApplicationCommandAttachmentOption
|
||||
@@ -76,7 +76,7 @@ export type APIApplicationCommandBasicOption =
|
||||
| APIApplicationCommandUserOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure}
|
||||
*/
|
||||
export type APIApplicationCommandOption =
|
||||
| APIApplicationCommandBasicOption
|
||||
@@ -84,47 +84,54 @@ export type APIApplicationCommandOption =
|
||||
| APIApplicationCommandSubcommandOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure}
|
||||
*/
|
||||
export type APIApplicationCommandInteractionDataOption =
|
||||
| APIApplicationCommandInteractionDataBasicOption
|
||||
| APIApplicationCommandInteractionDataSubcommandGroupOption
|
||||
| APIApplicationCommandInteractionDataSubcommandOption;
|
||||
export type APIApplicationCommandInteractionDataOption<Type extends InteractionType = InteractionType> =
|
||||
| APIApplicationCommandInteractionDataBasicOption<Type>
|
||||
| APIApplicationCommandInteractionDataSubcommandGroupOption<Type>
|
||||
| APIApplicationCommandInteractionDataSubcommandOption<Type>;
|
||||
|
||||
export type APIApplicationCommandInteractionDataBasicOption =
|
||||
export type APIApplicationCommandInteractionDataBasicOption<Type extends InteractionType = InteractionType> =
|
||||
| APIApplicationCommandInteractionDataAttachmentOption
|
||||
| APIApplicationCommandInteractionDataBooleanOption
|
||||
| APIApplicationCommandInteractionDataChannelOption
|
||||
| APIApplicationCommandInteractionDataIntegerOption
|
||||
| APIApplicationCommandInteractionDataIntegerOption<Type>
|
||||
| APIApplicationCommandInteractionDataMentionableOption
|
||||
| APIApplicationCommandInteractionDataNumberOption
|
||||
| APIApplicationCommandInteractionDataNumberOption<Type>
|
||||
| APIApplicationCommandInteractionDataRoleOption
|
||||
| APIApplicationCommandInteractionDataStringOption
|
||||
| APIApplicationCommandInteractionDataUserOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIChatInputApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption[];
|
||||
export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIChatInputApplicationCommandInteraction =
|
||||
APIApplicationCommandInteractionWrapper<APIChatInputApplicationCommandInteractionData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIChatInputApplicationCommandDMInteraction =
|
||||
APIDMInteractionWrapper<APIChatInputApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIChatInputApplicationCommandGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIChatInputApplicationCommandInteraction>;
|
||||
|
||||
@@ -1,90 +1,88 @@
|
||||
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';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIUserApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
target_id: Snowflake;
|
||||
resolved: APIUserInteractionDataResolved;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIMessageApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
target_id: Snowflake;
|
||||
resolved: APIMessageApplicationCommandInteractionDataResolved;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
|
||||
*/
|
||||
export interface APIMessageApplicationCommandInteractionDataResolved {
|
||||
messages: Record<Snowflake, APIMessage>;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export type APIContextMenuInteractionData =
|
||||
| APIMessageApplicationCommandInteractionData
|
||||
| APIUserApplicationCommandInteractionData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIUserApplicationCommandInteraction =
|
||||
APIApplicationCommandInteractionWrapper<APIUserApplicationCommandInteractionData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIUserApplicationCommandDMInteraction = APIDMInteractionWrapper<APIUserApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIUserApplicationCommandGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIUserApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIMessageApplicationCommandInteraction =
|
||||
APIApplicationCommandInteractionWrapper<APIMessageApplicationCommandInteractionData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIMessageApplicationCommandDMInteraction =
|
||||
APIDMInteractionWrapper<APIMessageApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIMessageApplicationCommandGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIMessageApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIContextMenuInteraction = APIMessageApplicationCommandInteraction | APIUserApplicationCommandInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIContextMenuDMInteraction =
|
||||
| APIMessageApplicationCommandDMInteraction
|
||||
| APIUserApplicationCommandDMInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIContextMenuGuildInteraction =
|
||||
| APIMessageApplicationCommandGuildInteraction
|
||||
|
||||
26
deno/payloads/v10/_interactions/_applicationCommands/entryPoint.ts
generated
Normal file
26
deno/payloads/v10/_interactions/_applicationCommands/entryPoint.ts
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
|
||||
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export type APIPrimaryEntryPointCommandInteractionData =
|
||||
APIBaseApplicationCommandInteractionData<ApplicationCommandType.PrimaryEntryPoint>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIPrimaryEntryPointCommandInteraction =
|
||||
APIApplicationCommandInteractionWrapper<APIPrimaryEntryPointCommandInteractionData>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIPrimaryEntryPointCommandDMInteraction = APIDMInteractionWrapper<APIPrimaryEntryPointCommandInteraction>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIPrimaryEntryPointCommandGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIPrimaryEntryPointCommandInteraction>;
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Snowflake } from '../../../../globals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure}
|
||||
*/
|
||||
export interface APIGuildApplicationCommandPermissions {
|
||||
/**
|
||||
@@ -23,7 +23,7 @@ export interface APIGuildApplicationCommandPermissions {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure}
|
||||
*/
|
||||
export interface APIApplicationCommandPermission {
|
||||
/**
|
||||
@@ -41,7 +41,7 @@ export interface APIApplicationCommandPermission {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type}
|
||||
*/
|
||||
export enum ApplicationCommandPermissionType {
|
||||
Role = 1,
|
||||
@@ -50,7 +50,7 @@ export enum ApplicationCommandPermissionType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants}
|
||||
*/
|
||||
export const APIApplicationCommandPermissionsConstant = {
|
||||
// eslint-disable-next-line unicorn/prefer-native-coercion-functions
|
||||
|
||||
103
deno/payloads/v10/_interactions/applicationCommands.ts
generated
103
deno/payloads/v10/_interactions/applicationCommands.ts
generated
@@ -13,15 +13,23 @@ import type {
|
||||
APIContextMenuInteraction,
|
||||
APIContextMenuInteractionData,
|
||||
} from './_applicationCommands/contextMenu.ts';
|
||||
import type {
|
||||
APIPrimaryEntryPointCommandDMInteraction,
|
||||
APIPrimaryEntryPointCommandGuildInteraction,
|
||||
APIPrimaryEntryPointCommandInteraction,
|
||||
APIPrimaryEntryPointCommandInteractionData,
|
||||
} from './_applicationCommands/entryPoint.ts';
|
||||
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 type * from './_applicationCommands/entryPoint.ts';
|
||||
export type * from './_applicationCommands/internals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object}
|
||||
*/
|
||||
export interface APIApplicationCommand {
|
||||
/**
|
||||
@@ -75,7 +83,7 @@ export interface APIApplicationCommand {
|
||||
/**
|
||||
* Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible
|
||||
*
|
||||
* @deprecated Use `contexts` instead
|
||||
* @deprecated Use {@link APIApplicationCommand.contexts} instead
|
||||
*/
|
||||
dm_permission?: boolean;
|
||||
/**
|
||||
@@ -83,81 +91,119 @@ export interface APIApplicationCommand {
|
||||
*
|
||||
* If missing, this property should be assumed as `true`
|
||||
*
|
||||
* @deprecated Use `dm_permission` and/or `default_member_permissions` instead
|
||||
* @deprecated Use {@link APIApplicationCommand.dm_permission} and/or {@link APIApplicationCommand.default_member_permissions} instead
|
||||
*/
|
||||
default_permission?: boolean;
|
||||
/**
|
||||
* Indicates whether the command is age-restricted, defaults to `false`
|
||||
* Indicates whether the command is age-restricted
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
nsfw?: boolean;
|
||||
/**
|
||||
* Installation context(s) where the command is available, only for globally-scoped commands. Defaults to `GUILD_INSTALL ([0])`
|
||||
* Installation context(s) where the command is available, only for globally-scoped commands
|
||||
*
|
||||
* @unstable
|
||||
* @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
|
||||
*
|
||||
* @unstable
|
||||
* @defaultValue `[InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel]`
|
||||
*/
|
||||
contexts?: InteractionContextType[] | null;
|
||||
/**
|
||||
* Autoincrementing version identifier updated during substantial record changes
|
||||
*/
|
||||
version: Snowflake;
|
||||
/**
|
||||
* Determines whether the interaction is handled by the app's interactions handler or by Discord
|
||||
*
|
||||
* @remarks
|
||||
* This is only available for {@link ApplicationCommandType.PrimaryEntryPoint} commands
|
||||
*/
|
||||
handler?: EntryPointCommandHandlerType;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types}
|
||||
*/
|
||||
export enum ApplicationCommandType {
|
||||
/**
|
||||
* Slash commands; a text-based command that shows up when a user types `/`
|
||||
*/
|
||||
ChatInput = 1,
|
||||
/**
|
||||
* A UI-based command that shows up when you right click or tap on a user
|
||||
*/
|
||||
User,
|
||||
/**
|
||||
* A UI-based command that shows up when you right click or tap on a message
|
||||
*/
|
||||
Message,
|
||||
/**
|
||||
* A UI-based command that represents the primary way to invoke an app's Activity
|
||||
*/
|
||||
PrimaryEntryPoint,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#application-object-application-integration-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-integration-types}
|
||||
*/
|
||||
export enum ApplicationIntegrationType {
|
||||
/**
|
||||
* App is installable to servers
|
||||
*/
|
||||
GuildInstall = 0,
|
||||
GuildInstall,
|
||||
/**
|
||||
* App is installable to users
|
||||
*/
|
||||
UserInstall = 1,
|
||||
UserInstall,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types}
|
||||
*/
|
||||
export enum InteractionContextType {
|
||||
/**
|
||||
* Interaction can be used within servers
|
||||
*/
|
||||
Guild = 0,
|
||||
Guild,
|
||||
/**
|
||||
* Interaction can be used within DMs with the app's bot user
|
||||
*/
|
||||
BotDM = 1,
|
||||
BotDM,
|
||||
/**
|
||||
* Interaction can be used within Group DMs and DMs other than the app's bot user
|
||||
*/
|
||||
PrivateChannel = 2,
|
||||
PrivateChannel,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types}
|
||||
*/
|
||||
export enum EntryPointCommandHandlerType {
|
||||
/**
|
||||
* The app handles the interaction using an interaction token
|
||||
*/
|
||||
AppHandler = 1,
|
||||
/**
|
||||
* Discord handles the interaction by launching an Activity and sending a follow-up message without coordinating with
|
||||
* the app
|
||||
*/
|
||||
DiscordLaunchActivity,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export type APIApplicationCommandInteractionData =
|
||||
| APIChatInputApplicationCommandInteractionData
|
||||
| APIContextMenuInteractionData;
|
||||
| APIContextMenuInteractionData
|
||||
| APIPrimaryEntryPointCommandInteractionData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> =
|
||||
APIBaseInteraction<InteractionType.ApplicationCommand, Data> &
|
||||
@@ -169,20 +215,25 @@ export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationC
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIApplicationCommandInteraction = APIChatInputApplicationCommandInteraction | APIContextMenuInteraction;
|
||||
export type APIApplicationCommandInteraction =
|
||||
| APIChatInputApplicationCommandInteraction
|
||||
| APIContextMenuInteraction
|
||||
| APIPrimaryEntryPointCommandInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIApplicationCommandDMInteraction =
|
||||
| APIChatInputApplicationCommandDMInteraction
|
||||
| APIContextMenuDMInteraction;
|
||||
| APIContextMenuDMInteraction
|
||||
| APIPrimaryEntryPointCommandDMInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIApplicationCommandGuildInteraction =
|
||||
| APIChatInputApplicationCommandGuildInteraction
|
||||
| APIContextMenuGuildInteraction;
|
||||
| APIContextMenuGuildInteraction
|
||||
| APIPrimaryEntryPointCommandGuildInteraction;
|
||||
|
||||
10
deno/payloads/v10/_interactions/autocomplete.ts
generated
10
deno/payloads/v10/_interactions/autocomplete.ts
generated
@@ -1,6 +1,6 @@
|
||||
import type {
|
||||
APIBaseInteraction,
|
||||
APIChatInputApplicationCommandInteractionData,
|
||||
APIAutocompleteApplicationCommandInteractionData,
|
||||
APIDMInteractionWrapper,
|
||||
APIGuildInteractionWrapper,
|
||||
InteractionType,
|
||||
@@ -8,26 +8,26 @@ import type {
|
||||
|
||||
export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
|
||||
InteractionType.ApplicationCommandAutocomplete,
|
||||
APIChatInputApplicationCommandInteractionData
|
||||
APIAutocompleteApplicationCommandInteractionData
|
||||
> &
|
||||
Required<
|
||||
Pick<
|
||||
APIBaseInteraction<
|
||||
InteractionType.ApplicationCommandAutocomplete,
|
||||
Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>
|
||||
Required<Pick<APIAutocompleteApplicationCommandInteractionData, 'options'>>
|
||||
>,
|
||||
'data'
|
||||
>
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIApplicationCommandAutocompleteDMInteraction =
|
||||
APIDMInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIApplicationCommandAutocompleteGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
|
||||
|
||||
100
deno/payloads/v10/_interactions/base.ts
generated
100
deno/payloads/v10/_interactions/base.ts
generated
@@ -1,23 +1,28 @@
|
||||
import type { Permissions, Snowflake } from '../../../globals.ts';
|
||||
import type { APIRole, ApplicationIntegrationType, InteractionContextType, LocaleString } from '../../../v10.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 } 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';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object}
|
||||
*/
|
||||
export interface APIMessageInteractionMetadata {
|
||||
export type APIMessageInteractionMetadata =
|
||||
| APIApplicationCommandInteractionMetadata
|
||||
| APIMessageComponentInteractionMetadata
|
||||
| APIModalSubmitInteractionMetadata;
|
||||
|
||||
export interface APIBaseInteractionMetadata<Type extends InteractionType> {
|
||||
/**
|
||||
* ID of the interaction
|
||||
*/
|
||||
@@ -25,27 +30,54 @@ export interface APIMessageInteractionMetadata {
|
||||
/**
|
||||
* Type of interaction
|
||||
*/
|
||||
type: InteractionType;
|
||||
type: Type;
|
||||
/**
|
||||
* User who triggered the interaction
|
||||
*/
|
||||
user: APIUser;
|
||||
/**
|
||||
* IDs for installation context(s) related to an interaction. Details in Authorizing Integration Owners Object
|
||||
* IDs for installation context(s) related to an interaction
|
||||
*/
|
||||
authorizing_integration_owners: APIAuthorizingIntegrationOwnersMap;
|
||||
/**
|
||||
* ID of the original response message, present only on follow-up messages
|
||||
*/
|
||||
original_response_message_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure}
|
||||
*/
|
||||
export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
|
||||
/**
|
||||
* ID of the message that contained interactive component, present only on messages created from component interactions
|
||||
* The user the command was run on, present only on user commands interactions
|
||||
*/
|
||||
interacted_message_id?: Snowflake;
|
||||
target_user?: APIUser;
|
||||
/**
|
||||
* Metadata for the interaction that was used to open the modal, present only on modal submit interactions
|
||||
* The ID of the message the command was run on, present only on message command interactions.
|
||||
* The original response message will also have `message_reference` and `referenced_message` pointing to this message.
|
||||
*/
|
||||
triggering_interaction_metadata?: APIMessageInteractionMetadata;
|
||||
target_message_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure}
|
||||
*/
|
||||
export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
|
||||
/**
|
||||
* ID of the message that contained the interactive component
|
||||
*/
|
||||
interacted_message_id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-modal-submit-interaction-metadata-structure}
|
||||
*/
|
||||
export interface APIModalSubmitInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ModalSubmit> {
|
||||
/**
|
||||
* Metadata for the interaction that was used to open the modal
|
||||
*/
|
||||
triggering_interaction_metadata: APIApplicationCommandInteractionMetadata | APIMessageComponentInteractionMetadata;
|
||||
}
|
||||
|
||||
export type PartialAPIMessageInteractionGuildMember = Pick<
|
||||
@@ -62,7 +94,7 @@ export type PartialAPIMessageInteractionGuildMember = Pick<
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object}
|
||||
*/
|
||||
export interface APIMessageInteraction {
|
||||
/**
|
||||
@@ -88,7 +120,7 @@ export interface APIMessageInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIInteractionGuildMember extends APIGuildMember {
|
||||
permissions: Permissions;
|
||||
@@ -98,7 +130,7 @@ export interface APIInteractionGuildMember extends APIGuildMember {
|
||||
// INTERACTIONS RECEIVED
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
/**
|
||||
@@ -118,7 +150,11 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
*/
|
||||
data?: Data;
|
||||
/**
|
||||
* The guild it was sent from
|
||||
* Guild that the interaction was sent from
|
||||
*/
|
||||
guild?: APIPartialInteractionGuild;
|
||||
/**
|
||||
* Guild that the interaction was sent from
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
@@ -128,7 +164,7 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
/**
|
||||
* The id of the channel it was sent from
|
||||
*
|
||||
* @deprecated Use {@apilink APIBaseInteraction#channel} instead
|
||||
* @deprecated Use {@link APIBaseInteraction.channel} instead
|
||||
*/
|
||||
channel_id?: Snowflake;
|
||||
/**
|
||||
@@ -160,11 +196,11 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
/**
|
||||
* The selected language of the invoking user
|
||||
*/
|
||||
locale: LocaleString;
|
||||
locale: Locale;
|
||||
/**
|
||||
* The guild's preferred locale, if invoked in a guild
|
||||
*/
|
||||
guild_locale?: LocaleString;
|
||||
guild_locale?: Locale;
|
||||
/**
|
||||
* For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
|
||||
*/
|
||||
@@ -177,6 +213,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
* Context where the interaction was triggered from
|
||||
*/
|
||||
context?: InteractionContextType;
|
||||
/**
|
||||
* Attachment size limit in bytes
|
||||
*/
|
||||
attachment_size_limit: number;
|
||||
}
|
||||
|
||||
export type APIAuthorizingIntegrationOwnersMap = {
|
||||
@@ -201,7 +241,7 @@ export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> ex
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object}
|
||||
*/
|
||||
export type APIInteractionDataResolvedChannel =
|
||||
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
|
||||
@@ -209,20 +249,22 @@ export type APIInteractionDataResolvedChannel =
|
||||
Pick<APIThreadChannel, 'parent_id' | 'thread_metadata'>);
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'deaf' | 'mute' | 'user'> {
|
||||
export interface APIInteractionDataResolvedGuildMember
|
||||
extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined {
|
||||
permissions: Permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
|
||||
*/
|
||||
export interface APIInteractionDataResolved {
|
||||
users?: Record<Snowflake, APIUser>;
|
||||
roles?: Record<Snowflake, APIRole>;
|
||||
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
|
||||
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
|
||||
messages?: Record<Snowflake, APIMessage>;
|
||||
attachments?: Record<Snowflake, APIAttachment>;
|
||||
}
|
||||
|
||||
|
||||
21
deno/payloads/v10/_interactions/messageComponents.ts
generated
21
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,
|
||||
@@ -52,35 +52,34 @@ export interface APIMessageComponentBaseInteractionData<CType extends ComponentT
|
||||
* The type of the component
|
||||
*/
|
||||
component_type: CType;
|
||||
/**
|
||||
* The unique identifier for the component, as defined when the component was sent
|
||||
*/
|
||||
id: number;
|
||||
}
|
||||
|
||||
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'>>;
|
||||
}
|
||||
|
||||
89
deno/payloads/v10/_interactions/modalSubmit.ts
generated
89
deno/payloads/v10/_interactions/modalSubmit.ts
generated
@@ -1,27 +1,94 @@
|
||||
import type { APIActionRowComponent, APIModalActionRowComponent } 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<APIModalActionRowComponent>, 'components'> {
|
||||
components: ModalSubmitComponent[];
|
||||
export interface APIModalSubmitStringSelectComponent extends APIBaseModalSubmitComponent<ComponentType.StringSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitUserSelectComponent extends APIBaseModalSubmitComponent<ComponentType.UserSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitComponent<ComponentType.RoleSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmitComponent<ComponentType.ChannelSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitComponent<ComponentType.FileUpload> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export 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;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure}
|
||||
*/
|
||||
export interface APIModalSubmission {
|
||||
/**
|
||||
* Data for users, members, channels, and roles in the modal's auto-populated select menus
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
|
||||
*/
|
||||
resolved?: APIInteractionDataResolved;
|
||||
/**
|
||||
* A developer-defined identifier for the component, max 100 characters
|
||||
*/
|
||||
@@ -29,21 +96,21 @@ export interface APIModalSubmission {
|
||||
/**
|
||||
* A list of child components
|
||||
*/
|
||||
components: ModalSubmitActionRowComponent[];
|
||||
components: APIModalSubmissionComponent[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIModalSubmitInteraction = APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission> &
|
||||
Required<Pick<APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission>, 'data'>>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIModalSubmitDMInteraction = APIDMInteractionWrapper<APIModalSubmitInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>;
|
||||
|
||||
48
deno/payloads/v10/_interactions/responses.ts
generated
48
deno/payloads/v10/_interactions/responses.ts
generated
@@ -1,10 +1,14 @@
|
||||
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v10.ts';
|
||||
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts';
|
||||
import type { MessageFlags } from '../mod.ts';
|
||||
import type {
|
||||
APIActionRowComponent,
|
||||
APIComponentInModalActionRow,
|
||||
APILabelComponent,
|
||||
APITextDisplayComponent,
|
||||
} from '../message.ts';
|
||||
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type}
|
||||
*/
|
||||
export enum InteractionType {
|
||||
Ping = 1,
|
||||
@@ -15,13 +19,14 @@ export enum InteractionType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object}
|
||||
*/
|
||||
export type APIInteractionResponse =
|
||||
| APIApplicationCommandAutocompleteResponse
|
||||
| APIInteractionResponseChannelMessageWithSource
|
||||
| APIInteractionResponseDeferredChannelMessageWithSource
|
||||
| APIInteractionResponseDeferredMessageUpdate
|
||||
| APIInteractionResponseLaunchActivity
|
||||
| APIInteractionResponsePong
|
||||
| APIInteractionResponseUpdateMessage
|
||||
| APIModalInteractionResponse
|
||||
@@ -64,8 +69,12 @@ export interface APIInteractionResponseUpdateMessage {
|
||||
data?: APIInteractionResponseCallbackData;
|
||||
}
|
||||
|
||||
export interface APIInteractionResponseLaunchActivity {
|
||||
type: InteractionResponseType.LaunchActivity;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type}
|
||||
*/
|
||||
export enum InteractionResponseType {
|
||||
/**
|
||||
@@ -98,24 +107,37 @@ export enum InteractionResponseType {
|
||||
Modal,
|
||||
/**
|
||||
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
|
||||
*
|
||||
* @deprecated Send a button with Premium type instead.
|
||||
* {@link https://discord.com/developers/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes | Learn more here}
|
||||
*/
|
||||
PremiumRequired,
|
||||
|
||||
/**
|
||||
* Launch the Activity associated with the app.
|
||||
*
|
||||
* @remarks
|
||||
* Only available for apps with Activities enabled
|
||||
*/
|
||||
LaunchActivity = 12,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure}
|
||||
*/
|
||||
export type APIInteractionResponseCallbackData = Omit<
|
||||
RESTPostAPIWebhookWithTokenJSONBody,
|
||||
'avatar_url' | 'username'
|
||||
> & { flags?: MessageFlags };
|
||||
export type APIInteractionResponseCallbackData = Omit<RESTPostAPIWebhookWithTokenJSONBody, 'avatar_url' | 'username'>;
|
||||
|
||||
export interface APICommandAutocompleteInteractionResponseCallbackData {
|
||||
choices?: APIApplicationCommandOptionChoice[];
|
||||
}
|
||||
|
||||
export type APIModalInteractionResponseCallbackComponent =
|
||||
| APIActionRowComponent<APIComponentInModalActionRow>
|
||||
| APILabelComponent
|
||||
| APITextDisplayComponent;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal}
|
||||
*/
|
||||
export interface APIModalInteractionResponseCallbackData {
|
||||
/**
|
||||
@@ -128,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<APIModalActionRowComponent>[];
|
||||
components: APIModalInteractionResponseCallbackComponent[];
|
||||
}
|
||||
|
||||
74
deno/payloads/v10/application.ts
generated
74
deno/payloads/v10/application.ts
generated
@@ -9,9 +9,10 @@ import type { ApplicationIntegrationType } from './interactions.ts';
|
||||
import type { OAuth2Scopes } from './oauth2.ts';
|
||||
import type { APITeam } from './teams.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
import type { ApplicationWebhookEventType } from './webhook.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#application-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object}
|
||||
*/
|
||||
export interface APIApplication {
|
||||
/**
|
||||
@@ -57,25 +58,26 @@ export interface APIApplication {
|
||||
/**
|
||||
* Partial user object containing info on the owner of the application
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
owner?: APIUser;
|
||||
/**
|
||||
* An empty string
|
||||
*
|
||||
* @deprecated This field will be removed in v11
|
||||
* @unstable This field is no longer documented by Discord and will be removed in v11
|
||||
*/
|
||||
summary: '';
|
||||
/**
|
||||
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
|
||||
*
|
||||
* See https://discord.com/developers/docs/game-sdk/applications#getticket
|
||||
* @see {@link https://discord.com/developers/docs/game-sdk/applications#getticket}
|
||||
*/
|
||||
verify_key: string;
|
||||
/**
|
||||
* The team this application belongs to
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/teams#data-models-team-object
|
||||
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-object}
|
||||
*/
|
||||
team: APITeam | null;
|
||||
/**
|
||||
@@ -101,13 +103,21 @@ export interface APIApplication {
|
||||
/**
|
||||
* The application's public flags
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/application#application-object-application-flags
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags}
|
||||
*/
|
||||
flags: ApplicationFlags;
|
||||
/**
|
||||
* Approximate count of guilds the application has been added to
|
||||
*/
|
||||
approximate_guild_count?: number;
|
||||
/**
|
||||
* Approximate count of users that have installed the app (authorized with `application.commands` as a scope)
|
||||
*/
|
||||
approximate_user_install_count?: number;
|
||||
/**
|
||||
* Approximate count of users that have OAuth2 authorizations for the app
|
||||
*/
|
||||
approximate_user_authorization_count?: number;
|
||||
/**
|
||||
* Array of redirect URIs for the application
|
||||
*/
|
||||
@@ -115,12 +125,12 @@ export interface APIApplication {
|
||||
/**
|
||||
* The interactions endpoint URL for the application
|
||||
*/
|
||||
interactions_endpoint_url?: string;
|
||||
interactions_endpoint_url?: string | null;
|
||||
/**
|
||||
* The application's role connection verification entry point,
|
||||
* which when configured will render the app as a verification method in the guild role verification configuration
|
||||
*/
|
||||
role_connections_verification_url?: string;
|
||||
role_connections_verification_url?: string | null;
|
||||
/**
|
||||
* Up to 5 tags of max 20 characters each describing the content and functionality of the application
|
||||
*/
|
||||
@@ -131,14 +141,24 @@ export interface APIApplication {
|
||||
install_params?: APIApplicationInstallParams;
|
||||
/**
|
||||
* Default scopes and permissions for each supported installation context. Value for each key is an integration type configuration object
|
||||
*
|
||||
* @unstable
|
||||
*/
|
||||
integration_types_config?: APIApplicationIntegrationTypesConfigMap;
|
||||
/**
|
||||
* The application's default custom authorization link, if enabled
|
||||
*/
|
||||
custom_install_url?: string;
|
||||
/**
|
||||
* Event webhook URL for the app to receive webhook events
|
||||
*/
|
||||
event_webhooks_url?: string | null;
|
||||
/**
|
||||
* If webhook events are enabled for the app
|
||||
*/
|
||||
event_webhooks_status: ApplicationWebhookEventStatus;
|
||||
/**
|
||||
* List of webhook event types the app subscribes to
|
||||
*/
|
||||
event_webhooks_types?: ApplicationWebhookEventType[];
|
||||
}
|
||||
|
||||
export interface APIApplicationInstallParams {
|
||||
@@ -155,7 +175,7 @@ export type APIApplicationIntegrationTypesConfigMap = {
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#application-object-application-flags
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags}
|
||||
*/
|
||||
export enum ApplicationFlags {
|
||||
/**
|
||||
@@ -192,12 +212,14 @@ export enum ApplicationFlags {
|
||||
GatewayPresenceLimited = 1 << 13,
|
||||
/**
|
||||
* Intent required for bots in 100 or more servers to receive member-related events like `guild_member_add`.
|
||||
* See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
|
||||
*
|
||||
* @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`}
|
||||
*/
|
||||
GatewayGuildMembers = 1 << 14,
|
||||
/**
|
||||
* Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found in Bot Settings.
|
||||
* See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
|
||||
*
|
||||
* @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`}
|
||||
*/
|
||||
GatewayGuildMembersLimited = 1 << 15,
|
||||
/**
|
||||
@@ -209,11 +231,11 @@ export enum ApplicationFlags {
|
||||
*/
|
||||
Embedded = 1 << 17,
|
||||
/**
|
||||
* Intent required for bots in 100 or more servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055)
|
||||
* Intent required for bots in 100 or more servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content}
|
||||
*/
|
||||
GatewayMessageContent = 1 << 18,
|
||||
/**
|
||||
* Intent required for bots in under 100 servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055),
|
||||
* Intent required for bots in under 100 servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content},
|
||||
* found in Bot Settings
|
||||
*/
|
||||
GatewayMessageContentLimited = 1 << 19,
|
||||
@@ -222,13 +244,13 @@ export enum ApplicationFlags {
|
||||
*/
|
||||
EmbeddedFirstParty = 1 << 20,
|
||||
/**
|
||||
* Indicates if an app has registered global [application commands](https://discord.com/developers/docs/interactions/application-commands)
|
||||
* Indicates if an app has registered global {@link https://discord.com/developers/docs/interactions/application-commands | application commands}
|
||||
*/
|
||||
ApplicationCommandBadge = 1 << 23,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-structure}
|
||||
*/
|
||||
export interface APIApplicationRoleConnectionMetadata {
|
||||
/**
|
||||
@@ -258,7 +280,7 @@ export interface APIApplicationRoleConnectionMetadata {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type
|
||||
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type}
|
||||
*/
|
||||
export enum ApplicationRoleConnectionMetadataType {
|
||||
/**
|
||||
@@ -294,3 +316,21 @@ export enum ApplicationRoleConnectionMetadataType {
|
||||
*/
|
||||
BooleanNotEqual,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status}
|
||||
*/
|
||||
export enum ApplicationWebhookEventStatus {
|
||||
/**
|
||||
* Webhook events are disabled by developer
|
||||
*/
|
||||
Disabled = 1,
|
||||
/**
|
||||
* Webhook events are enabled by developer
|
||||
*/
|
||||
Enabled,
|
||||
/**
|
||||
* Webhook events are disabled by Discord, usually due to inactivity
|
||||
*/
|
||||
DisabledByDiscord,
|
||||
}
|
||||
|
||||
285
deno/payloads/v10/auditLog.ts
generated
285
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,
|
||||
@@ -23,6 +29,7 @@ import type {
|
||||
} from './guild.ts';
|
||||
import type {
|
||||
APIGuildScheduledEvent,
|
||||
APIGuildScheduledEventRecurrenceRule,
|
||||
GuildScheduledEventEntityType,
|
||||
GuildScheduledEventStatus,
|
||||
} from './guildScheduledEvent.ts';
|
||||
@@ -34,43 +41,43 @@ import type { APIUser } from './user.ts';
|
||||
import type { APIWebhook } from './webhook.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure}
|
||||
*/
|
||||
export interface APIAuditLog {
|
||||
/**
|
||||
* List of application commands found in the audit log
|
||||
*
|
||||
* See https://discord.com/developers/docs/interactions/application-commands#application-command-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object}
|
||||
*/
|
||||
application_commands: APIApplicationCommand[];
|
||||
/**
|
||||
* Webhooks found in the audit log
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/webhook#webhook-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object}
|
||||
*/
|
||||
webhooks: APIWebhook[];
|
||||
/**
|
||||
* Users found in the audit log
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
users: APIUser[];
|
||||
/**
|
||||
* Audit log entries
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object}
|
||||
*/
|
||||
audit_log_entries: APIAuditLogEntry[];
|
||||
/**
|
||||
* List of auto moderation rules referenced in the audit log
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object}
|
||||
*/
|
||||
auto_moderation_rules: APIAutoModerationRule[];
|
||||
/**
|
||||
* Partial integration objects
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#integration-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object}
|
||||
*/
|
||||
integrations: APIGuildIntegration[];
|
||||
/**
|
||||
@@ -78,19 +85,19 @@ export interface APIAuditLog {
|
||||
*
|
||||
* Threads referenced in THREAD_CREATE and THREAD_UPDATE events are included in the threads map, since archived threads might not be kept in memory by clients.
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object}
|
||||
*/
|
||||
threads: APIChannel[];
|
||||
/**
|
||||
* The guild scheduled events in the audit log
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object}
|
||||
*/
|
||||
guild_scheduled_events: APIGuildScheduledEvent[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure}
|
||||
*/
|
||||
export interface APIAuditLogEntry {
|
||||
/**
|
||||
@@ -100,7 +107,7 @@ export interface APIAuditLogEntry {
|
||||
/**
|
||||
* Changes made to the `target_id`
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/audit-log#audit-log-change-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-change-object}
|
||||
*/
|
||||
changes?: APIAuditLogChange[];
|
||||
/**
|
||||
@@ -116,13 +123,13 @@ export interface APIAuditLogEntry {
|
||||
/**
|
||||
* Type of action that occurred
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events}
|
||||
*/
|
||||
action_type: AuditLogEvent;
|
||||
/**
|
||||
* Additional info for certain action types
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info}
|
||||
*/
|
||||
options?: APIAuditLogOptions;
|
||||
/**
|
||||
@@ -132,7 +139,7 @@ export interface APIAuditLogEntry {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events}
|
||||
*/
|
||||
export enum AuditLogEvent {
|
||||
GuildUpdate = 1,
|
||||
@@ -196,12 +203,17 @@ export enum AuditLogEvent {
|
||||
|
||||
ApplicationCommandPermissionUpdate = 121,
|
||||
|
||||
SoundboardSoundCreate = 130,
|
||||
SoundboardSoundUpdate,
|
||||
SoundboardSoundDelete,
|
||||
|
||||
AutoModerationRuleCreate = 140,
|
||||
AutoModerationRuleUpdate,
|
||||
AutoModerationRuleDelete,
|
||||
AutoModerationBlockMessage,
|
||||
AutoModerationFlagToChannel,
|
||||
AutoModerationUserCommunicationDisabled,
|
||||
AutoModerationQuarantineUser,
|
||||
|
||||
CreatorMonetizationRequestCreated = 150,
|
||||
CreatorMonetizationTermsAccepted,
|
||||
@@ -217,7 +229,7 @@ export enum AuditLogEvent {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info}
|
||||
*/
|
||||
export interface APIAuditLogOptions {
|
||||
/**
|
||||
@@ -227,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;
|
||||
/**
|
||||
@@ -236,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;
|
||||
/**
|
||||
@@ -267,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;
|
||||
|
||||
@@ -320,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;
|
||||
|
||||
@@ -342,7 +357,7 @@ export enum AuditLogOptionsType {
|
||||
export type AuditLogRuleTriggerType = `${AutoModerationRuleTriggerType}`;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure}
|
||||
*/
|
||||
export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKey$Add
|
||||
@@ -372,6 +387,8 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyDeny
|
||||
| APIAuditLogChangeKeyDescription
|
||||
| APIAuditLogChangeKeyDiscoverySplashHash
|
||||
| APIAuditLogChangeKeyEmojiId
|
||||
| APIAuditLogChangeKeyEmojiName
|
||||
| APIAuditLogChangeKeyEnabled
|
||||
| APIAuditLogChangeKeyEnableEmoticons
|
||||
| APIAuditLogChangeKeyEntityType
|
||||
@@ -404,12 +421,17 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyPermissions
|
||||
| APIAuditLogChangeKeyPosition
|
||||
| APIAuditLogChangeKeyPreferredLocale
|
||||
| APIAuditLogChangeKeyPremiumProgressBarEnabled
|
||||
| APIAuditLogChangeKeyPrivacyLevel
|
||||
| APIAuditLogChangeKeyPruneDeleteDays
|
||||
| APIAuditLogChangeKeyPublicUpdatesChannelId
|
||||
| APIAuditLogChangeKeyRateLimitPerUser
|
||||
| APIAuditLogChangeKeyRecurrenceRule
|
||||
| APIAuditLogChangeKeyRegion
|
||||
| APIAuditLogChangeKeyRTCRegion
|
||||
| APIAuditLogChangeKeyRulesChannelId
|
||||
| APIAuditLogChangeKeySafetyAlertsChannelId
|
||||
| APIAuditLogChangeKeySoundId
|
||||
| APIAuditLogChangeKeySplashHash
|
||||
| APIAuditLogChangeKeyStatus
|
||||
| APIAuditLogChangeKeySystemChannelFlags
|
||||
@@ -420,102 +442,115 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyTriggerMetadata
|
||||
| APIAuditLogChangeKeyTriggerType
|
||||
| APIAuditLogChangeKeyType
|
||||
| APIAuditLogChangeKeyUserId
|
||||
| APIAuditLogChangeKeyUserLimit
|
||||
| APIAuditLogChangeKeyUses
|
||||
| APIAuditLogChangeKeyVanityURLCode
|
||||
| APIAuditLogChangeKeyVerificationLevel
|
||||
| APIAuditLogChangeKeyVideoQualityMode
|
||||
| APIAuditLogChangeKeyVolume
|
||||
| APIAuditLogChangeKeyWidgetChannelId
|
||||
| APIAuditLogChangeKeyWidgetEnabled;
|
||||
|
||||
/**
|
||||
* Returned when an entity's name is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
|
||||
export type APIAuditLogChangeKeyName = APIAuditLogChangeData<'name', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's or sticker's or guild scheduled event's description is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDescription = AuditLogChangeData<'description', string>;
|
||||
export type APIAuditLogChangeKeyDescription = APIAuditLogChangeData<'description', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's icon is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>;
|
||||
export type APIAuditLogChangeKeyIconHash = APIAuditLogChangeData<'icon_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's scheduled event's cover image is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyImageHash = AuditLogChangeData<'image_hash', string>;
|
||||
export type APIAuditLogChangeKeyImageHash = APIAuditLogChangeData<'image_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's splash is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
|
||||
export type APIAuditLogChangeKeySplashHash = APIAuditLogChangeData<'splash_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's discovery splash is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDiscoverySplashHash = AuditLogChangeData<'discovery_splash_hash', string>;
|
||||
export type APIAuditLogChangeKeyDiscoverySplashHash = APIAuditLogChangeData<'discovery_splash_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's banner hash is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyBannerHash = AuditLogChangeData<'banner_hash', string>;
|
||||
export type APIAuditLogChangeKeyBannerHash = APIAuditLogChangeData<'banner_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's owner_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyOwnerId = AuditLogChangeData<'owner_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's region is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
|
||||
export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's rtc_region is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRTCRegion = APIAuditLogChangeData<'rtc_region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's preferred_locale is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPreferredLocale = AuditLogChangeData<'preferred_locale', string>;
|
||||
export type APIAuditLogChangeKeyPreferredLocale = APIAuditLogChangeData<'preferred_locale', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's afk_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAFKChannelId = AuditLogChangeData<'afk_channel_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyAFKChannelId = APIAuditLogChangeData<'afk_channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's afk_timeout is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
|
||||
export type APIAuditLogChangeKeyAFKTimeout = APIAuditLogChangeData<'afk_timeout', number>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's rules_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_channel_id', string>;
|
||||
export type APIAuditLogChangeKeyRulesChannelId = APIAuditLogChangeData<'rules_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's public_updates_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
|
||||
export type APIAuditLogChangeKeyPublicUpdatesChannelId = APIAuditLogChangeData<'public_updates_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's safety_alerts_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeySafetyAlertsChannelId = AuditLogChangeData<'safety_alerts_channel_id', string>;
|
||||
export type APIAuditLogChangeKeySafetyAlertsChannelId = APIAuditLogChangeData<'safety_alerts_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's mfa_level is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>;
|
||||
export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', GuildMFALevel>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's verification_level is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>;
|
||||
export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's video_quality_mode is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVideoQualityMode = APIAuditLogChangeData<'video_quality_mode', VideoQualityMode>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's explicit_content_filter is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<
|
||||
export type APIAuditLogChangeKeyExplicitContentFilter = APIAuditLogChangeData<
|
||||
'explicit_content_filter',
|
||||
GuildExplicitContentFilter
|
||||
>;
|
||||
@@ -523,7 +558,7 @@ export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<
|
||||
/**
|
||||
* Returned when a guild's default_message_notifications is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<
|
||||
export type APIAuditLogChangeKeyDefaultMessageNotifications = APIAuditLogChangeData<
|
||||
'default_message_notifications',
|
||||
GuildDefaultMessageNotifications
|
||||
>;
|
||||
@@ -531,37 +566,45 @@ export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData
|
||||
/**
|
||||
* Returned when a guild's vanity_url_code is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>;
|
||||
export type APIAuditLogChangeKeyVanityURLCode = APIAuditLogChangeData<'vanity_url_code', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's boost progress bar is enabled
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPremiumProgressBarEnabled = APIAuditLogChangeData<
|
||||
'premium_progress_bar_enabled',
|
||||
boolean
|
||||
>;
|
||||
|
||||
/**
|
||||
* Returned when new role(s) are added
|
||||
*/
|
||||
export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', Pick<APIRole, 'id' | 'name'>[]>;
|
||||
export type APIAuditLogChangeKey$Add = APIAuditLogChangeData<'$add', Pick<APIRole, 'id' | 'name'>[]>;
|
||||
|
||||
/**
|
||||
* Returned when role(s) are removed
|
||||
*/
|
||||
export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', Pick<APIRole, 'id' | 'name'>[]>;
|
||||
export type APIAuditLogChangeKey$Remove = APIAuditLogChangeData<'$remove', Pick<APIRole, 'id' | 'name'>[]>;
|
||||
|
||||
/**
|
||||
* Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>;
|
||||
export type APIAuditLogChangeKeyPruneDeleteDays = APIAuditLogChangeData<'prune_delete_days', number>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's widget is enabled
|
||||
*/
|
||||
export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>;
|
||||
export type APIAuditLogChangeKeyWidgetEnabled = APIAuditLogChangeData<'widget_enabled', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's widget_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyWidgetChannelId = AuditLogChangeData<'widget_channel_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyWidgetChannelId = APIAuditLogChangeData<'widget_channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's system_channel_flags is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeySystemChannelFlags = AuditLogChangeData<
|
||||
export type APIAuditLogChangeKeySystemChannelFlags = APIAuditLogChangeData<
|
||||
'system_channel_flags',
|
||||
GuildSystemChannelFlags
|
||||
>;
|
||||
@@ -569,214 +612,222 @@ export type APIAuditLogChangeKeySystemChannelFlags = AuditLogChangeData<
|
||||
/**
|
||||
* Returned when a guild's system_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeySystemChannelId = AuditLogChangeData<'system_channel_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeySystemChannelId = APIAuditLogChangeData<'system_channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's position is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>;
|
||||
export type APIAuditLogChangeKeyPosition = APIAuditLogChangeData<'position', number>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's topic is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>;
|
||||
export type APIAuditLogChangeKeyTopic = APIAuditLogChangeData<'topic', string>;
|
||||
|
||||
/**
|
||||
* Returned when a voice channel's bitrate is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>;
|
||||
export type APIAuditLogChangeKeyBitrate = APIAuditLogChangeData<'bitrate', number>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's permission overwrites is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
|
||||
export type APIAuditLogChangeKeyPermissionOverwrites = APIAuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's NSFW restriction is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>;
|
||||
export type APIAuditLogChangeKeyNSFW = APIAuditLogChangeData<'nsfw', boolean>;
|
||||
|
||||
/**
|
||||
* The application ID of the added or removed Webhook or Bot
|
||||
*/
|
||||
export type APIAuditLogChangeKeyApplicationId = AuditLogChangeData<'application_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyApplicationId = APIAuditLogChangeData<'application_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's amount of seconds a user has to wait before sending another message
|
||||
* is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>;
|
||||
export type APIAuditLogChangeKeyRateLimitPerUser = APIAuditLogChangeData<'rate_limit_per_user', number>;
|
||||
|
||||
/**
|
||||
* Returned when a guild scheduled event's recurrence_rule is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRecurrenceRule = APIAuditLogChangeData<
|
||||
'recurrence_rule',
|
||||
APIGuildScheduledEventRecurrenceRule
|
||||
>;
|
||||
|
||||
/**
|
||||
* Returned when a permission bitfield is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', string>;
|
||||
export type APIAuditLogChangeKeyPermissions = APIAuditLogChangeData<'permissions', string>;
|
||||
|
||||
/**
|
||||
* Returned when a role's color is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>;
|
||||
export type APIAuditLogChangeKeyColor = APIAuditLogChangeData<'color', number>;
|
||||
|
||||
/**
|
||||
* Represents a change where the key is a snowflake.
|
||||
* Currently, the only known instance of this is returned when permissions for a command were updated (<insert name of object here>)
|
||||
* Currently, the only known instance of this is returned when permissions for a command were updated
|
||||
*/
|
||||
export type APIAuditLogChangeKeySnowflake = AuditLogChangeData<Snowflake, unknown>;
|
||||
export type APIAuditLogChangeKeySnowflake = APIAuditLogChangeData<Snowflake, unknown>;
|
||||
|
||||
/**
|
||||
* Returned when a role's hoist status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>;
|
||||
export type APIAuditLogChangeKeyHoist = APIAuditLogChangeData<'hoist', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a role's mentionable status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>;
|
||||
export type APIAuditLogChangeKeyMentionable = APIAuditLogChangeData<'mentionable', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when an overwrite's allowed permissions bitfield is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', string>;
|
||||
export type APIAuditLogChangeKeyAllow = APIAuditLogChangeData<'allow', string>;
|
||||
|
||||
/**
|
||||
* Returned when an overwrite's denied permissions bitfield is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', string>;
|
||||
export type APIAuditLogChangeKeyDeny = APIAuditLogChangeData<'deny', string>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's code is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>;
|
||||
export type APIAuditLogChangeKeyCode = APIAuditLogChangeData<'code', string>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's or guild scheduled event's channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyChannelId = AuditLogChangeData<'channel_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyChannelId = APIAuditLogChangeData<'channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's inviter_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyInviterId = AuditLogChangeData<'inviter_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyInviterId = APIAuditLogChangeData<'inviter_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's max_uses is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>;
|
||||
export type APIAuditLogChangeKeyMaxUses = APIAuditLogChangeData<'max_uses', number>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's uses is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>;
|
||||
export type APIAuditLogChangeKeyUses = APIAuditLogChangeData<'uses', number>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's max_age is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>;
|
||||
export type APIAuditLogChangeKeyMaxAge = APIAuditLogChangeData<'max_age', number>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's temporary status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>;
|
||||
export type APIAuditLogChangeKeyTemporary = APIAuditLogChangeData<'temporary', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a user's deaf status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>;
|
||||
export type APIAuditLogChangeKeyDeaf = APIAuditLogChangeData<'deaf', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a user's mute status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>;
|
||||
export type APIAuditLogChangeKeyMute = APIAuditLogChangeData<'mute', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a user's nick is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyNick = AuditLogChangeData<'nick', string>;
|
||||
export type APIAuditLogChangeKeyNick = APIAuditLogChangeData<'nick', string>;
|
||||
|
||||
/**
|
||||
* Returned when a user's avatar_hash is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>;
|
||||
export type APIAuditLogChangeKeyAvatarHash = APIAuditLogChangeData<'avatar_hash', string>;
|
||||
|
||||
/**
|
||||
* The ID of the changed entity - sometimes used in conjunction with other keys
|
||||
*/
|
||||
export type APIAuditLogChangeKeyId = AuditLogChangeData<'id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyId = APIAuditLogChangeData<'id', Snowflake>;
|
||||
|
||||
/**
|
||||
* The type of entity created
|
||||
*/
|
||||
export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', number | string>;
|
||||
export type APIAuditLogChangeKeyType = APIAuditLogChangeData<'type', number | string>;
|
||||
|
||||
/**
|
||||
* Returned when an integration's enable_emoticons is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>;
|
||||
export type APIAuditLogChangeKeyEnableEmoticons = APIAuditLogChangeData<'enable_emoticons', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when an integration's expire_behavior is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
|
||||
export type APIAuditLogChangeKeyExpireBehavior = APIAuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
|
||||
|
||||
/**
|
||||
* Returned when an integration's expire_grace_period is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;
|
||||
export type APIAuditLogChangeKeyExpireGracePeriod = APIAuditLogChangeData<'expire_grace_period', number>;
|
||||
|
||||
/**
|
||||
* Returned when a voice channel's user_limit is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
|
||||
export type APIAuditLogChangeKeyUserLimit = APIAuditLogChangeData<'user_limit', number>;
|
||||
|
||||
/**
|
||||
* Returned when privacy level of a stage instance or guild scheduled event is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
|
||||
export type APIAuditLogChangeKeyPrivacyLevel = APIAuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's related emoji is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTags = AuditLogChangeData<'tags', string>;
|
||||
export type APIAuditLogChangeKeyTags = APIAuditLogChangeData<'tags', string>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's format_type is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyFormatType = AuditLogChangeData<'format_type', StickerFormatType>;
|
||||
export type APIAuditLogChangeKeyFormatType = APIAuditLogChangeData<'format_type', StickerFormatType>;
|
||||
|
||||
/**
|
||||
* Empty string
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAsset = AuditLogChangeData<'asset', ''>;
|
||||
export type APIAuditLogChangeKeyAsset = APIAuditLogChangeData<'asset', ''>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's availability is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', boolean>;
|
||||
export type APIAuditLogChangeKeyAvailable = APIAuditLogChangeData<'available', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's guild_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyGuildId = APIAuditLogChangeData<'guild_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a thread's archive status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
|
||||
export type APIAuditLogChangeKeyArchived = APIAuditLogChangeData<'archived', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a thread's lock status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
|
||||
export type APIAuditLogChangeKeyLocked = APIAuditLogChangeData<'locked', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a thread's auto archive duration is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
|
||||
export type APIAuditLogChangeKeyAutoArchiveDuration = APIAuditLogChangeData<'auto_archive_duration', number>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's default auto archive duration for newly created threads is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<
|
||||
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = APIAuditLogChangeData<
|
||||
'default_auto_archive_duration',
|
||||
number
|
||||
>;
|
||||
@@ -784,37 +835,40 @@ export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<
|
||||
/**
|
||||
* Returned when entity type of a guild scheduled event is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEntityType = AuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
|
||||
export type APIAuditLogChangeKeyEntityType = APIAuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
|
||||
|
||||
/**
|
||||
* Returned when status of a guild scheduled event is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildScheduledEventStatus>;
|
||||
export type APIAuditLogChangeKeyStatus = APIAuditLogChangeData<'status', GuildScheduledEventStatus>;
|
||||
|
||||
/**
|
||||
* Returned when location of a guild scheduled event is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
|
||||
export type APIAuditLogChangeKeyLocation = APIAuditLogChangeData<'location', string>;
|
||||
|
||||
/**
|
||||
* Returned when a user's timeout is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;
|
||||
export type APIAuditLogChangeKeyCommunicationDisabledUntil = APIAuditLogChangeData<
|
||||
'communication_disabled_until',
|
||||
string
|
||||
>;
|
||||
|
||||
/**
|
||||
* Returned when an auto moderation rule's trigger type is changed (only in rule creation or deletion)
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTriggerType = AuditLogChangeData<'trigger_type', AutoModerationRuleTriggerType>;
|
||||
export type APIAuditLogChangeKeyTriggerType = APIAuditLogChangeData<'trigger_type', AutoModerationRuleTriggerType>;
|
||||
|
||||
/**
|
||||
* Returned when an auto moderation rule's event type is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEventType = AuditLogChangeData<'event_type', AutoModerationRuleEventType>;
|
||||
export type APIAuditLogChangeKeyEventType = APIAuditLogChangeData<'event_type', AutoModerationRuleEventType>;
|
||||
|
||||
/**
|
||||
* Returned when an auto moderation rule's trigger metadata is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTriggerMetadata = AuditLogChangeData<
|
||||
export type APIAuditLogChangeKeyTriggerMetadata = APIAuditLogChangeData<
|
||||
'trigger_metadata',
|
||||
APIAutoModerationRuleTriggerMetadata
|
||||
>;
|
||||
@@ -822,32 +876,32 @@ export type APIAuditLogChangeKeyTriggerMetadata = AuditLogChangeData<
|
||||
/**
|
||||
* Returned when an auto moderation rule's actions is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyActions = AuditLogChangeData<'actions', APIAutoModerationAction[]>;
|
||||
export type APIAuditLogChangeKeyActions = APIAuditLogChangeData<'actions', APIAutoModerationAction[]>;
|
||||
|
||||
/**
|
||||
* Returned when an auto moderation rule's enabled status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEnabled = AuditLogChangeData<'enabled', boolean>;
|
||||
export type APIAuditLogChangeKeyEnabled = APIAuditLogChangeData<'enabled', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when an auto moderation rule's exempt roles is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles', Snowflake[]>;
|
||||
export type APIAuditLogChangeKeyExemptRoles = APIAuditLogChangeData<'exempt_roles', Snowflake[]>;
|
||||
|
||||
/**
|
||||
* Returned when an auto moderation rule's exempt channels is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>;
|
||||
export type APIAuditLogChangeKeyExemptChannels = APIAuditLogChangeData<'exempt_channels', Snowflake[]>;
|
||||
|
||||
/**
|
||||
* Returned when a guild forum's available tags gets changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>;
|
||||
export type APIAuditLogChangeKeyAvailableTags = APIAuditLogChangeData<'available_tags', APIGuildForumTag[]>;
|
||||
|
||||
/**
|
||||
* Returned when a guild forum's default reaction emoji gets changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<
|
||||
export type APIAuditLogChangeKeyDefaultReactionEmoji = APIAuditLogChangeData<
|
||||
'default_reaction_emoji',
|
||||
APIGuildForumDefaultReactionEmoji
|
||||
>;
|
||||
@@ -855,18 +909,43 @@ export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<
|
||||
/**
|
||||
* Returned when a channel flag gets changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>;
|
||||
export type APIAuditLogChangeKeyFlags = APIAuditLogChangeData<'flags', number>;
|
||||
|
||||
/**
|
||||
* Returned when a thread's amount of seconds a user has to wait before creating another thread
|
||||
* gets changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData<
|
||||
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = APIAuditLogChangeData<
|
||||
'default_thread_rate_limit_per_user',
|
||||
number
|
||||
>;
|
||||
|
||||
interface AuditLogChangeData<K extends string, D> {
|
||||
/**
|
||||
* Returned when a soundboard is create or deleted
|
||||
*/
|
||||
export type APIAuditLogChangeKeySoundId = APIAuditLogChangeData<'sound_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a soundboard's volume is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVolume = APIAuditLogChangeData<'volume', number>;
|
||||
|
||||
/**
|
||||
* Returned when a soundboard's custom emoji is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEmojiId = APIAuditLogChangeData<'emoji_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a soundboard's unicode emoji is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEmojiName = APIAuditLogChangeData<'emoji_name', string>;
|
||||
|
||||
/**
|
||||
* Returned when a sounboard is created
|
||||
*/
|
||||
export type APIAuditLogChangeKeyUserId = APIAuditLogChangeData<'user_id', Snowflake>;
|
||||
|
||||
export interface APIAuditLogChangeData<K extends string, D> {
|
||||
key: K;
|
||||
/**
|
||||
* The new value
|
||||
|
||||
22
deno/payloads/v10/autoModeration.ts
generated
22
deno/payloads/v10/autoModeration.ts
generated
@@ -5,7 +5,7 @@
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-auto-moderation-rule-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-auto-moderation-rule-structure}
|
||||
*/
|
||||
export interface APIAutoModerationRule {
|
||||
/**
|
||||
@@ -55,7 +55,7 @@ export interface APIAutoModerationRule {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-types}
|
||||
*/
|
||||
export enum AutoModerationRuleTriggerType {
|
||||
/**
|
||||
@@ -81,14 +81,15 @@ export enum AutoModerationRuleTriggerType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata
|
||||
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-trigger-metadata}
|
||||
*/
|
||||
export interface APIAutoModerationRuleTriggerMetadata {
|
||||
/**
|
||||
* Substrings which will be searched for in content (Maximum of 1000)
|
||||
*
|
||||
* A keyword can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less
|
||||
* See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies)
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies | Keyword matching strategies}
|
||||
*
|
||||
* Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile}
|
||||
*/
|
||||
@@ -103,7 +104,8 @@ export interface APIAutoModerationRuleTriggerMetadata {
|
||||
* Substrings which will be exempt from triggering the preset trigger type (Maximum of 1000)
|
||||
*
|
||||
* A allowed-word can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less
|
||||
* See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies)
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies | Keyword matching strategies}
|
||||
*
|
||||
* Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.KeywordPreset}, {@link AutoModerationRuleTriggerType.MemberProfile}
|
||||
*/
|
||||
@@ -131,7 +133,7 @@ export interface APIAutoModerationRuleTriggerMetadata {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-preset-types}
|
||||
*/
|
||||
export enum AutoModerationRuleKeywordPresetType {
|
||||
/**
|
||||
@@ -149,7 +151,7 @@ export enum AutoModerationRuleKeywordPresetType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-event-types}
|
||||
*/
|
||||
export enum AutoModerationRuleEventType {
|
||||
/**
|
||||
@@ -163,7 +165,7 @@ export enum AutoModerationRuleEventType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-auto-moderation-action-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-auto-moderation-action-structure}
|
||||
*/
|
||||
export interface APIAutoModerationAction {
|
||||
/**
|
||||
@@ -179,7 +181,7 @@ export interface APIAutoModerationAction {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-types}
|
||||
*/
|
||||
export enum AutoModerationActionType {
|
||||
/**
|
||||
@@ -202,7 +204,7 @@ export enum AutoModerationActionType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata
|
||||
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-action-object-action-metadata}
|
||||
*/
|
||||
export interface APIAutoModerationActionMetadata {
|
||||
/**
|
||||
|
||||
1445
deno/payloads/v10/channel.ts
generated
1445
deno/payloads/v10/channel.ts
generated
File diff suppressed because it is too large
Load Diff
33
deno/payloads/v10/emoji.ts
generated
33
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';
|
||||
|
||||
@@ -25,7 +26,7 @@ export interface APIPartialEmoji {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure}
|
||||
*/
|
||||
export interface APIEmoji extends APIPartialEmoji {
|
||||
/**
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
174
deno/payloads/v10/gateway.ts
generated
174
deno/payloads/v10/gateway.ts
generated
@@ -5,12 +5,12 @@
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIChannel, APIThreadMember } from './channel.ts';
|
||||
import type { APIThreadChannel, APIThreadMember } from './channel.ts';
|
||||
import type { APIEmoji } from './emoji.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#get-gateway
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway}
|
||||
*/
|
||||
export interface APIGatewayInfo {
|
||||
/**
|
||||
@@ -20,25 +20,25 @@ export interface APIGatewayInfo {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#get-gateway-bot
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway-bot}
|
||||
*/
|
||||
export interface APIGatewayBotInfo extends APIGatewayInfo {
|
||||
/**
|
||||
* The recommended number of shards to use when connecting
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#sharding
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway#sharding}
|
||||
*/
|
||||
shards: number;
|
||||
/**
|
||||
* Information on the current session start limit
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway#session-start-limit-object
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway#session-start-limit-object}
|
||||
*/
|
||||
session_start_limit: APIGatewaySessionStartLimit;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway#session-start-limit-object
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway#session-start-limit-object}
|
||||
*/
|
||||
export interface APIGatewaySessionStartLimit {
|
||||
/**
|
||||
@@ -60,22 +60,18 @@ export interface APIGatewaySessionStartLimit {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence}
|
||||
*/
|
||||
export interface GatewayPresenceUpdate {
|
||||
export interface GatewayGuildMembersChunkPresence {
|
||||
/**
|
||||
* The user presence is being updated for
|
||||
*
|
||||
* **The user object within this event can be partial, the only field which must be sent is the `id` field,
|
||||
* everything else is optional.**
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
user: Partial<APIUser> & Pick<APIUser, 'id'>;
|
||||
/**
|
||||
* ID of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
/**
|
||||
* Either "idle", "dnd", "online", or "offline"
|
||||
*/
|
||||
@@ -83,19 +79,29 @@ export interface GatewayPresenceUpdate {
|
||||
/**
|
||||
* User's current activities
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway-events#activity-object
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object}
|
||||
*/
|
||||
activities?: GatewayActivity[];
|
||||
/**
|
||||
* User's platform-dependent status
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway-events#client-status-object
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#client-status-object}
|
||||
*/
|
||||
client_status?: GatewayPresenceClientStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields}
|
||||
*/
|
||||
export interface GatewayPresenceUpdate extends GatewayGuildMembersChunkPresence {
|
||||
/**
|
||||
* ID of the guild
|
||||
*/
|
||||
guild_id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types}
|
||||
*/
|
||||
export enum PresenceUpdateStatus {
|
||||
Online = 'online',
|
||||
@@ -111,7 +117,7 @@ export enum PresenceUpdateStatus {
|
||||
export type PresenceUpdateReceiveStatus = Exclude<PresenceUpdateStatus, PresenceUpdateStatus.Invisible>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#client-status-object
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#client-status-object}
|
||||
*/
|
||||
export interface GatewayPresenceClientStatus {
|
||||
/**
|
||||
@@ -129,7 +135,7 @@ export interface GatewayPresenceClientStatus {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure}
|
||||
*/
|
||||
export interface GatewayActivity {
|
||||
/**
|
||||
@@ -145,7 +151,7 @@ export interface GatewayActivity {
|
||||
/**
|
||||
* Activity type
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types}
|
||||
*/
|
||||
type: ActivityType;
|
||||
/**
|
||||
@@ -176,18 +182,32 @@ export interface GatewayActivity {
|
||||
* Application id for the game
|
||||
*/
|
||||
application_id?: Snowflake;
|
||||
/**
|
||||
* Controls which field is displayed in the user's status text in the member list
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
|
||||
*/
|
||||
status_display_type?: StatusDisplayType | null;
|
||||
/**
|
||||
* What the player is currently doing
|
||||
*/
|
||||
details?: string | null;
|
||||
/**
|
||||
* URL that is linked when clicking on the details text
|
||||
*/
|
||||
details_url?: string | null;
|
||||
/**
|
||||
* The user's current party status, or the text used for a custom status
|
||||
*/
|
||||
state?: string | null;
|
||||
/**
|
||||
* URL that is linked when clicking on the state text
|
||||
*/
|
||||
state_url?: string | null;
|
||||
/**
|
||||
* The emoji used for a custom status
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji}
|
||||
*/
|
||||
emoji?: GatewayActivityEmoji;
|
||||
/**
|
||||
@@ -197,19 +217,19 @@ export interface GatewayActivity {
|
||||
/**
|
||||
* Information for the current party of the player
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party}
|
||||
*/
|
||||
party?: GatewayActivityParty;
|
||||
/**
|
||||
* Images for the presence and their hover texts
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
|
||||
*/
|
||||
assets?: GatewayActivityAssets;
|
||||
/**
|
||||
* Secrets for Rich Presence joining and spectating
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
|
||||
*/
|
||||
secrets?: GatewayActivitySecrets;
|
||||
/**
|
||||
@@ -219,9 +239,8 @@ export interface GatewayActivity {
|
||||
/**
|
||||
* Activity flags `OR`d together, describes what the payload includes
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags?: ActivityFlags;
|
||||
/**
|
||||
@@ -246,37 +265,57 @@ export enum ActivityPlatform {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types}
|
||||
*/
|
||||
export enum ActivityType {
|
||||
/**
|
||||
* Playing {game}
|
||||
* Playing \{game\}
|
||||
*/
|
||||
Playing,
|
||||
/**
|
||||
* Streaming {details}
|
||||
* Streaming \{details\}
|
||||
*/
|
||||
Streaming,
|
||||
/**
|
||||
* Listening to {name}
|
||||
* Listening to \{name\}
|
||||
*/
|
||||
Listening,
|
||||
/**
|
||||
* Watching {details}
|
||||
* Watching \{details\}
|
||||
*/
|
||||
Watching,
|
||||
/**
|
||||
* {emoji} {state}
|
||||
* \{emoji\} \{state\}
|
||||
*/
|
||||
Custom,
|
||||
/**
|
||||
* Competing in {name}
|
||||
* Competing in \{name\}
|
||||
*/
|
||||
Competing,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps
|
||||
* Controls which field is used in the user's status message
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types}
|
||||
*/
|
||||
export 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}
|
||||
*/
|
||||
export interface GatewayActivityTimestamps {
|
||||
/**
|
||||
@@ -290,12 +329,12 @@ export interface GatewayActivityTimestamps {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji}
|
||||
*/
|
||||
export type GatewayActivityEmoji = Partial<Pick<APIEmoji, 'animated' | 'id'>> & Pick<APIEmoji, 'name'>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party}
|
||||
*/
|
||||
export interface GatewayActivityParty {
|
||||
/**
|
||||
@@ -309,19 +348,62 @@ export interface GatewayActivityParty {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
|
||||
*/
|
||||
export type GatewayActivityAssets = Partial<
|
||||
Record<'large_image' | 'large_text' | 'small_image' | 'small_text', string>
|
||||
>;
|
||||
export 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
|
||||
*/
|
||||
export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>;
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}
|
||||
*/
|
||||
export enum ActivityFlags {
|
||||
Instance = 1 << 0,
|
||||
@@ -347,7 +429,7 @@ export interface GatewayActivityButton {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-list-sync-thread-list-sync-event-fields
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-list-sync-thread-list-sync-event-fields}
|
||||
*/
|
||||
export interface GatewayThreadListSync {
|
||||
/**
|
||||
@@ -361,7 +443,7 @@ export interface GatewayThreadListSync {
|
||||
/**
|
||||
* Array of the synced threads
|
||||
*/
|
||||
threads: APIChannel[];
|
||||
threads: APIThreadChannel[];
|
||||
/**
|
||||
* The member objects for the client user in each joined thread that was synced
|
||||
*/
|
||||
@@ -369,7 +451,7 @@ export interface GatewayThreadListSync {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/gateway-events#thread-members-update-thread-members-update-event-fields
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-members-update-thread-members-update-event-fields}
|
||||
*/
|
||||
export interface GatewayThreadMembersUpdate {
|
||||
/**
|
||||
|
||||
391
deno/payloads/v10/guild.ts
generated
391
deno/payloads/v10/guild.ts
generated
@@ -3,21 +3,25 @@
|
||||
*/
|
||||
|
||||
import type { Permissions, Snowflake } from '../../globals.ts';
|
||||
import type { Locale } from '../../rest/common.ts';
|
||||
import type { APIEmoji, APIPartialEmoji } from './emoji.ts';
|
||||
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';
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
@@ -25,9 +29,9 @@ export interface APIUnavailableGuild {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure}
|
||||
*/
|
||||
export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'>, Pick<APIGuild, 'welcome_screen'> {
|
||||
export interface APIPartialGuild extends APIBaseGuild {
|
||||
/**
|
||||
* Guild name (2-100 characters, excluding trailing and leading whitespace)
|
||||
*/
|
||||
@@ -35,19 +39,19 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
|
||||
/**
|
||||
* Icon hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
icon: string | null;
|
||||
/**
|
||||
* Splash hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
splash: string | null;
|
||||
/**
|
||||
* Banner hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
banner?: string | null;
|
||||
/**
|
||||
@@ -57,35 +61,46 @@ export interface APIPartialGuild extends Omit<APIUnavailableGuild, 'unavailable'
|
||||
/**
|
||||
* Enabled guild features
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
|
||||
*/
|
||||
features?: GuildFeature[];
|
||||
/**
|
||||
* Verification level required for the guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level}
|
||||
*/
|
||||
verification_level?: GuildVerificationLevel;
|
||||
/**
|
||||
* The vanity url code for the guild
|
||||
*/
|
||||
vanity_url_code?: string | null;
|
||||
/**
|
||||
* The welcome screen of a Community guild, shown to new members
|
||||
*
|
||||
* Returned in the invite object
|
||||
*/
|
||||
welcome_screen?: APIGuildWelcomeScreen;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-guild-structure
|
||||
* Source guild of channel follower webhooks.
|
||||
*/
|
||||
export type APIWebhookSourceGuild = Pick<APIPartialGuild, 'icon' | 'id' | 'name'>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure}
|
||||
*/
|
||||
export interface APIGuild extends APIPartialGuild {
|
||||
/**
|
||||
* Icon hash, returned when in the template object
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
icon_hash?: string | null;
|
||||
/**
|
||||
* Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
discovery_splash: string | null;
|
||||
/**
|
||||
@@ -103,17 +118,16 @@ export interface APIGuild extends APIPartialGuild {
|
||||
*
|
||||
* **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds**
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
permissions?: Permissions;
|
||||
/**
|
||||
* Voice region id for the guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-region-object
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
|
||||
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
|
||||
*/
|
||||
region: string;
|
||||
region?: string | null;
|
||||
/**
|
||||
* ID of afk channel
|
||||
*/
|
||||
@@ -133,43 +147,43 @@ export interface APIGuild extends APIPartialGuild {
|
||||
/**
|
||||
* Verification level required for the guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-verification-level
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level}
|
||||
*/
|
||||
verification_level: GuildVerificationLevel;
|
||||
/**
|
||||
* Default message notifications level
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level}
|
||||
*/
|
||||
default_message_notifications: GuildDefaultMessageNotifications;
|
||||
/**
|
||||
* Explicit content filter level
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level}
|
||||
*/
|
||||
explicit_content_filter: GuildExplicitContentFilter;
|
||||
/**
|
||||
* Roles in the guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/permissions#role-object
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object}
|
||||
*/
|
||||
roles: APIRole[];
|
||||
/**
|
||||
* Custom guild emojis
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/emoji#emoji-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object}
|
||||
*/
|
||||
emojis: APIEmoji[];
|
||||
/**
|
||||
* Enabled guild features
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
|
||||
*/
|
||||
features: GuildFeature[];
|
||||
/**
|
||||
* Required MFA level for the guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level}
|
||||
*/
|
||||
mfa_level: GuildMFALevel;
|
||||
/**
|
||||
@@ -183,7 +197,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
/**
|
||||
* System channel flags
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags}
|
||||
*/
|
||||
system_channel_flags: GuildSystemChannelFlags;
|
||||
/**
|
||||
@@ -209,13 +223,13 @@ export interface APIGuild extends APIPartialGuild {
|
||||
/**
|
||||
* Banner hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
banner: string | null;
|
||||
/**
|
||||
* Premium tier (Server Boost level)
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier}
|
||||
*/
|
||||
premium_tier: GuildPremiumTier;
|
||||
/**
|
||||
@@ -223,11 +237,11 @@ export interface APIGuild extends APIPartialGuild {
|
||||
*/
|
||||
premium_subscription_count?: number;
|
||||
/**
|
||||
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
|
||||
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
|
||||
*
|
||||
* @default "en-US"
|
||||
* @defaultValue `"en-US"`
|
||||
*/
|
||||
preferred_locale: string;
|
||||
preferred_locale: Locale;
|
||||
/**
|
||||
* The id of the channel where admins and moderators of Community guilds receive notices from Discord
|
||||
*/
|
||||
@@ -250,24 +264,18 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* returned from the `GET /guilds/<id>` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true`
|
||||
*/
|
||||
approximate_presence_count?: number;
|
||||
/**
|
||||
* The welcome screen of a Community guild, shown to new members
|
||||
*
|
||||
* Returned in the invite object
|
||||
*/
|
||||
welcome_screen?: APIGuildWelcomeScreen;
|
||||
/**
|
||||
* The nsfw level of the guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level}
|
||||
*/
|
||||
nsfw_level: GuildNSFWLevel;
|
||||
/**
|
||||
* Custom guild stickers
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/sticker#sticker-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
|
||||
*/
|
||||
stickers: APISticker[];
|
||||
stickers?: APISticker[];
|
||||
/**
|
||||
* Whether the guild has the boost progress bar enabled.
|
||||
*/
|
||||
@@ -280,10 +288,27 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
|
||||
*/
|
||||
safety_alerts_channel_id: Snowflake | null;
|
||||
/**
|
||||
* The incidents data for this guild
|
||||
*/
|
||||
incidents_data: APIIncidentsData | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure}
|
||||
*/
|
||||
export interface APIPartialInteractionGuild extends Pick<APIGuild, 'features' | 'id'> {
|
||||
/**
|
||||
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
|
||||
*
|
||||
* @unstable https://github.com/discord/discord-api-docs/issues/6938
|
||||
* @defaultValue `"en-US"`
|
||||
*/
|
||||
locale: Locale;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level}
|
||||
*/
|
||||
export enum GuildDefaultMessageNotifications {
|
||||
AllMessages,
|
||||
@@ -291,7 +316,7 @@ export enum GuildDefaultMessageNotifications {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level}
|
||||
*/
|
||||
export enum GuildExplicitContentFilter {
|
||||
Disabled,
|
||||
@@ -300,7 +325,7 @@ export enum GuildExplicitContentFilter {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-mfa-level
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level}
|
||||
*/
|
||||
export enum GuildMFALevel {
|
||||
None,
|
||||
@@ -308,7 +333,7 @@ export enum GuildMFALevel {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level}
|
||||
*/
|
||||
export enum GuildNSFWLevel {
|
||||
Default,
|
||||
@@ -318,7 +343,7 @@ export enum GuildNSFWLevel {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-verification-level
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level}
|
||||
*/
|
||||
export enum GuildVerificationLevel {
|
||||
/**
|
||||
@@ -344,7 +369,7 @@ export enum GuildVerificationLevel {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-premium-tier
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier}
|
||||
*/
|
||||
export enum GuildPremiumTier {
|
||||
None,
|
||||
@@ -360,7 +385,7 @@ export enum GuildHubType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags}
|
||||
*/
|
||||
export enum GuildSystemChannelFlags {
|
||||
/**
|
||||
@@ -390,7 +415,7 @@ export enum GuildSystemChannelFlags {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-object-guild-features
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
|
||||
*/
|
||||
export enum GuildFeature {
|
||||
/**
|
||||
@@ -404,7 +429,7 @@ export enum GuildFeature {
|
||||
/**
|
||||
* Guild is using the old permissions configuration behavior
|
||||
*
|
||||
* See https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes
|
||||
* @see {@link https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes}
|
||||
*/
|
||||
ApplicationCommandPermissionsV2 = 'APPLICATION_COMMAND_PERMISSIONS_V2',
|
||||
/**
|
||||
@@ -446,8 +471,7 @@ export enum GuildFeature {
|
||||
/**
|
||||
* Guild is a Student Hub
|
||||
*
|
||||
* See https://support.discord.com/hc/articles/4406046651927
|
||||
*
|
||||
* @see {@link https://support.discord.com/hc/articles/4406046651927}
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
Hub = 'HUB',
|
||||
@@ -462,8 +486,7 @@ export enum GuildFeature {
|
||||
/**
|
||||
* Guild is in a Student Hub
|
||||
*
|
||||
* See https://support.discord.com/hc/articles/4406046651927
|
||||
*
|
||||
* @see {@link https://support.discord.com/hc/articles/4406046651927}
|
||||
* @unstable This feature is currently not documented by Discord, but has known value
|
||||
*/
|
||||
LinkedToHub = 'LINKED_TO_HUB',
|
||||
@@ -471,6 +494,10 @@ export enum GuildFeature {
|
||||
* Guild has enabled Membership Screening
|
||||
*/
|
||||
MemberVerificationGateEnabled = 'MEMBER_VERIFICATION_GATE_ENABLED',
|
||||
/**
|
||||
* Guild has increased custom soundboard sound slots
|
||||
*/
|
||||
MoreSoundboard = 'MORE_SOUNDBOARD',
|
||||
/**
|
||||
* Guild has enabled monetization
|
||||
*
|
||||
@@ -514,6 +541,10 @@ export enum GuildFeature {
|
||||
* Guild has enabled role subscriptions
|
||||
*/
|
||||
RoleSubscriptionsEnabled = 'ROLE_SUBSCRIPTIONS_ENABLED',
|
||||
/**
|
||||
* Guild has created soundboard sounds
|
||||
*/
|
||||
Soundboard = 'SOUNDBOARD',
|
||||
/**
|
||||
* Guild has enabled ticketed events
|
||||
*/
|
||||
@@ -534,10 +565,28 @@ 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',
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-preview-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-preview-object}
|
||||
*/
|
||||
export interface APIGuildPreview {
|
||||
/**
|
||||
@@ -551,31 +600,31 @@ export interface APIGuildPreview {
|
||||
/**
|
||||
* Icon hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
icon: string | null;
|
||||
/**
|
||||
* Splash hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
splash: string | null;
|
||||
/**
|
||||
* Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
discovery_splash: string | null;
|
||||
/**
|
||||
* Custom guild emojis
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/emoji#emoji-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object}
|
||||
*/
|
||||
emojis: APIEmoji[];
|
||||
/**
|
||||
* Enabled guild features
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object-guild-features
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features}
|
||||
*/
|
||||
features: GuildFeature[];
|
||||
/**
|
||||
@@ -589,7 +638,7 @@ export interface APIGuildPreview {
|
||||
/**
|
||||
* The description for the guild
|
||||
*/
|
||||
description: string;
|
||||
description: string | null;
|
||||
/**
|
||||
* Custom guild stickers
|
||||
*/
|
||||
@@ -597,7 +646,7 @@ export interface APIGuildPreview {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object}
|
||||
*/
|
||||
export interface APIGuildWidgetSettings {
|
||||
/**
|
||||
@@ -611,53 +660,25 @@ export interface APIGuildWidgetSettings {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMember {
|
||||
/**
|
||||
* The user this guild member represents
|
||||
*
|
||||
* **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.**
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
*/
|
||||
user: APIUser;
|
||||
export interface APIBaseGuildMember {
|
||||
/**
|
||||
* This users guild nickname
|
||||
*/
|
||||
nick?: string | null;
|
||||
/**
|
||||
* The member's guild avatar hash
|
||||
*/
|
||||
avatar?: string | null;
|
||||
/**
|
||||
* Array of role object ids
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/permissions#role-object
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object}
|
||||
*/
|
||||
roles: Snowflake[];
|
||||
/**
|
||||
* When the user joined the guild
|
||||
*/
|
||||
joined_at: string;
|
||||
/**
|
||||
* When the user started boosting the guild
|
||||
*
|
||||
* See https://support.discord.com/hc/articles/360028038352
|
||||
* @see {@link https://support.discord.com/hc/articles/360028038352}
|
||||
*/
|
||||
premium_since?: string | null;
|
||||
/**
|
||||
* Whether the user is deafened in voice channels
|
||||
*/
|
||||
deaf: boolean;
|
||||
/**
|
||||
* Whether the user is muted in voice channels
|
||||
*/
|
||||
mute: boolean;
|
||||
/**
|
||||
* Guild member flags represented as a bit set, defaults to `0`
|
||||
*/
|
||||
flags: GuildMemberFlags;
|
||||
/**
|
||||
* Whether the user has not yet passed the guild's Membership Screening requirements
|
||||
*
|
||||
@@ -671,13 +692,95 @@ export interface APIGuildMember {
|
||||
/**
|
||||
* The data for the member's guild avatar decoration
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIFlaggedGuildMember {
|
||||
/**
|
||||
* Guild member flags represented as a bit set
|
||||
*
|
||||
* @defaultValue `0`
|
||||
*/
|
||||
flags: GuildMemberFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMemberJoined {
|
||||
/**
|
||||
* When the user joined the guild
|
||||
*/
|
||||
joined_at: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMemberAvatar {
|
||||
/**
|
||||
* The member's guild avatar hash
|
||||
*/
|
||||
avatar?: string | null;
|
||||
/**
|
||||
* The member's guild banner hash
|
||||
*/
|
||||
banner?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIBaseVoiceGuildMember {
|
||||
/**
|
||||
* Whether the user is deafened in voice channels
|
||||
*/
|
||||
deaf: boolean;
|
||||
/**
|
||||
* Whether the user is muted in voice channels
|
||||
*/
|
||||
mute: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMemberUser {
|
||||
/**
|
||||
* The user this guild member represents
|
||||
*
|
||||
* **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.**
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMember
|
||||
extends
|
||||
APIBaseGuildMember,
|
||||
APIBaseVoiceGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
APIGuildMemberJoined,
|
||||
APIGuildMemberUser {}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
|
||||
*/
|
||||
export enum GuildMemberFlags {
|
||||
/**
|
||||
@@ -689,7 +792,7 @@ export enum GuildMemberFlags {
|
||||
*/
|
||||
CompletedOnboarding = 1 << 1,
|
||||
/**
|
||||
* Member bypasses guild verification requirements
|
||||
* Member is exempt from guild verification requirements
|
||||
*/
|
||||
BypassesVerification = 1 << 2,
|
||||
/**
|
||||
@@ -697,25 +800,38 @@ export enum GuildMemberFlags {
|
||||
*/
|
||||
StartedOnboarding = 1 << 3,
|
||||
/**
|
||||
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
* Member is a guest and can only access the voice channel they were invited to
|
||||
*/
|
||||
IsGuest = 1 << 4,
|
||||
/**
|
||||
* Member has started Server Guide new member actions
|
||||
*/
|
||||
StartedHomeActions = 1 << 5,
|
||||
/**
|
||||
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
* Member has completed Server Guide new member actions
|
||||
*/
|
||||
CompletedHomeActions = 1 << 6,
|
||||
/**
|
||||
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
* Member's username, display name, or nickname is blocked by AutoMod
|
||||
*/
|
||||
AutomodQuarantinedUsernameOrGuildNickname = 1 << 7,
|
||||
/**
|
||||
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
* @deprecated
|
||||
* {@link https://github.com/discord/discord-api-docs/pull/7113 | discord-api-docs#7113}
|
||||
*/
|
||||
AutomodQuarantinedBio = 1 << 8,
|
||||
/**
|
||||
* Member has dismissed the DM settings upsell
|
||||
*/
|
||||
DmSettingsUpsellAcknowledged = 1 << 9,
|
||||
/**
|
||||
* Member's guild tag is blocked by AutoMod
|
||||
*/
|
||||
AutoModQuarantinedGuildTag = 1 << 10,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#integration-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object}
|
||||
*/
|
||||
export interface APIGuildIntegration {
|
||||
/**
|
||||
@@ -757,7 +873,7 @@ export interface APIGuildIntegration {
|
||||
*
|
||||
* **This field is not provided for `discord` bot integrations.**
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors}
|
||||
*/
|
||||
expire_behavior?: IntegrationExpireBehavior;
|
||||
/**
|
||||
@@ -771,13 +887,13 @@ export interface APIGuildIntegration {
|
||||
*
|
||||
* **Some older integrations may not have an attached user.**
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
user?: APIUser;
|
||||
/**
|
||||
* Integration account information
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#integration-account-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#integration-account-object}
|
||||
*/
|
||||
account: APIIntegrationAccount;
|
||||
/**
|
||||
@@ -801,7 +917,7 @@ export interface APIGuildIntegration {
|
||||
/**
|
||||
* The bot/OAuth2 application for discord integrations
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#integration-application-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#integration-application-object}
|
||||
*
|
||||
* **This field is not provided for `discord` bot integrations.**
|
||||
*/
|
||||
@@ -815,7 +931,7 @@ export interface APIGuildIntegration {
|
||||
export type APIGuildIntegrationType = 'discord' | 'guild_subscription' | 'twitch' | 'youtube';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors}
|
||||
*/
|
||||
export enum IntegrationExpireBehavior {
|
||||
RemoveRole,
|
||||
@@ -823,7 +939,7 @@ export enum IntegrationExpireBehavior {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#integration-account-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#integration-account-object}
|
||||
*/
|
||||
export interface APIIntegrationAccount {
|
||||
/**
|
||||
@@ -837,7 +953,7 @@ export interface APIIntegrationAccount {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#integration-application-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#integration-application-object}
|
||||
*/
|
||||
export interface APIGuildIntegrationApplication {
|
||||
/**
|
||||
@@ -851,7 +967,7 @@ export interface APIGuildIntegrationApplication {
|
||||
/**
|
||||
* The icon hash of the app
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
icon: string | null;
|
||||
/**
|
||||
@@ -861,13 +977,13 @@ export interface APIGuildIntegrationApplication {
|
||||
/**
|
||||
* The bot associated with this application
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
bot?: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#ban-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#ban-object}
|
||||
*/
|
||||
export interface APIBan {
|
||||
/**
|
||||
@@ -881,7 +997,7 @@ export interface APIBan {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object}
|
||||
*/
|
||||
export interface APIGuildWidget {
|
||||
id: Snowflake;
|
||||
@@ -893,7 +1009,7 @@ export interface APIGuildWidget {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget}
|
||||
*/
|
||||
export interface APIGuildWidgetChannel {
|
||||
id: Snowflake;
|
||||
@@ -902,7 +1018,7 @@ export interface APIGuildWidgetChannel {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-widget-object-example-guild-widget}
|
||||
*/
|
||||
export interface APIGuildWidgetMember {
|
||||
id: string;
|
||||
@@ -915,7 +1031,7 @@ export interface APIGuildWidgetMember {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image-widget-style-options}
|
||||
*/
|
||||
export enum GuildWidgetStyle {
|
||||
/**
|
||||
@@ -971,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
|
||||
@@ -986,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
|
||||
@@ -1007,6 +1127,9 @@ export interface APIGuildMembershipScreeningField {
|
||||
required: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @unstable https://github.com/discord/discord-api-docs/pull/2547
|
||||
*/
|
||||
export enum MembershipScreeningFieldType {
|
||||
/**
|
||||
* Server Rules
|
||||
@@ -1015,7 +1138,7 @@ export enum MembershipScreeningFieldType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-guild-onboarding-structure}
|
||||
*/
|
||||
export interface APIGuildOnboarding {
|
||||
/**
|
||||
@@ -1041,7 +1164,7 @@ export interface APIGuildOnboarding {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure}
|
||||
*/
|
||||
export interface APIGuildOnboardingPrompt {
|
||||
/**
|
||||
@@ -1076,7 +1199,7 @@ export interface APIGuildOnboardingPrompt {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure}
|
||||
*/
|
||||
export interface APIGuildOnboardingPromptOption {
|
||||
/**
|
||||
@@ -1106,7 +1229,7 @@ export interface APIGuildOnboardingPromptOption {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-mode}
|
||||
*/
|
||||
export enum GuildOnboardingMode {
|
||||
/**
|
||||
@@ -1120,9 +1243,31 @@ export enum GuildOnboardingMode {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-types}
|
||||
*/
|
||||
export enum GuildOnboardingPromptType {
|
||||
MultipleChoice,
|
||||
Dropdown,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#incidents-data-object}
|
||||
*/
|
||||
export interface APIIncidentsData {
|
||||
/**
|
||||
* When invites get enabled again
|
||||
*/
|
||||
invites_disabled_until: string | null;
|
||||
/**
|
||||
* When direct messages get enabled again
|
||||
*/
|
||||
dms_disabled_until: string | null;
|
||||
/**
|
||||
* When the dm spam was detected
|
||||
*/
|
||||
dm_spam_detected_at?: string | null;
|
||||
/**
|
||||
* When the raid was detected
|
||||
*/
|
||||
raid_detected_at?: string | null;
|
||||
}
|
||||
|
||||
132
deno/payloads/v10/guildScheduledEvent.ts
generated
132
deno/payloads/v10/guildScheduledEvent.ts
generated
@@ -2,7 +2,7 @@ import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIGuildMember } from './guild.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
|
||||
export interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType> {
|
||||
/**
|
||||
* The id of the guild event
|
||||
*/
|
||||
@@ -67,10 +67,121 @@ interface APIGuildScheduledEventBase<Type extends GuildScheduledEventEntityType>
|
||||
* The cover image of the scheduled event
|
||||
*/
|
||||
image?: string | null;
|
||||
/**
|
||||
* The definition for how often this event should recur
|
||||
*/
|
||||
recurrence_rule: APIGuildScheduledEventRecurrenceRule | null;
|
||||
}
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-structure}
|
||||
*/
|
||||
export interface APIGuildScheduledEventRecurrenceRule {
|
||||
/**
|
||||
* Starting time of the recurrence interval
|
||||
*/
|
||||
start: string;
|
||||
/**
|
||||
* Ending time of the recurrence interval
|
||||
*/
|
||||
end: string | null;
|
||||
/**
|
||||
* How often the event occurs
|
||||
*/
|
||||
frequency: GuildScheduledEventRecurrenceRuleFrequency;
|
||||
/**
|
||||
* The spacing between the events, defined by `frequency`.
|
||||
* For example, `frequency` of {@link GuildScheduledEventRecurrenceRuleFrequency.Weekly} and an `interval` of `2`
|
||||
* would be "every-other week"
|
||||
*/
|
||||
interval: number;
|
||||
/**
|
||||
* Set of specific days within a week for the event to recur on
|
||||
*/
|
||||
by_weekday: GuildScheduledEventRecurrenceRuleWeekday[] | null;
|
||||
/**
|
||||
* List of specific days within a specific week (1-5) to recur on
|
||||
*/
|
||||
by_n_weekday: APIGuildScheduledEventRecurrenceRuleNWeekday[] | null;
|
||||
/**
|
||||
* Set of specific months to recur on
|
||||
*/
|
||||
by_month: GuildScheduledEventRecurrenceRuleMonth[] | null;
|
||||
/**
|
||||
* Set of specific dates within a month to recur on
|
||||
*/
|
||||
by_month_day: number[] | null;
|
||||
/**
|
||||
* Set of days within a year to recur on (1-364)
|
||||
*/
|
||||
by_year_day: number[] | null;
|
||||
/**
|
||||
* The total amount of times that the event is allowed to recur before stopping
|
||||
*/
|
||||
count: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-frequency}
|
||||
*/
|
||||
export enum GuildScheduledEventRecurrenceRuleFrequency {
|
||||
Yearly,
|
||||
Monthly,
|
||||
Weekly,
|
||||
Daily,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-weekday}
|
||||
*/
|
||||
export enum GuildScheduledEventRecurrenceRuleWeekday {
|
||||
Monday,
|
||||
Tuesday,
|
||||
Wednesday,
|
||||
Thursday,
|
||||
Friday,
|
||||
Saturday,
|
||||
Sunday,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-month}
|
||||
*/
|
||||
export enum GuildScheduledEventRecurrenceRuleMonth {
|
||||
January = 1,
|
||||
February,
|
||||
March,
|
||||
April,
|
||||
May,
|
||||
June,
|
||||
July,
|
||||
August,
|
||||
September,
|
||||
October,
|
||||
November,
|
||||
December,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-recurrence-rule-object-guild-scheduled-event-recurrence-rule-nweekday-structure}
|
||||
*/
|
||||
export interface APIGuildScheduledEventRecurrenceRuleNWeekday {
|
||||
/**
|
||||
* The week to reoccur on.
|
||||
*/
|
||||
n: 1 | 2 | 3 | 4 | 5;
|
||||
/**
|
||||
* The day within the week to reoccur on
|
||||
*/
|
||||
day: GuildScheduledEventRecurrenceRuleWeekday;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link APIGuildScheduledEventRecurrenceRuleNWeekday} instead
|
||||
*/
|
||||
export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday;
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
@@ -80,14 +191,13 @@ 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>;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure}
|
||||
*/
|
||||
export type APIGuildScheduledEvent =
|
||||
| APIExternalGuildScheduledEvent
|
||||
@@ -95,7 +205,7 @@ export type APIGuildScheduledEvent =
|
||||
| APIVoiceGuildScheduledEvent;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata}
|
||||
*/
|
||||
export interface APIGuildScheduledEventEntityMetadata {
|
||||
/**
|
||||
@@ -105,7 +215,7 @@ export interface APIGuildScheduledEventEntityMetadata {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types}
|
||||
*/
|
||||
export enum GuildScheduledEventEntityType {
|
||||
StageInstance = 1,
|
||||
@@ -114,7 +224,7 @@ export enum GuildScheduledEventEntityType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status}
|
||||
*/
|
||||
export enum GuildScheduledEventStatus {
|
||||
Scheduled = 1,
|
||||
@@ -124,7 +234,7 @@ export enum GuildScheduledEventStatus {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level}
|
||||
*/
|
||||
export enum GuildScheduledEventPrivacyLevel {
|
||||
/**
|
||||
@@ -134,7 +244,7 @@ export enum GuildScheduledEventPrivacyLevel {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object-guild-scheduled-event-user-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object-guild-scheduled-event-user-structure}
|
||||
*/
|
||||
export interface APIGuildScheduledEventUser {
|
||||
/**
|
||||
|
||||
16
deno/payloads/v10/interactions.ts
generated
16
deno/payloads/v10/interactions.ts
generated
@@ -21,15 +21,15 @@ 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';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIInteraction =
|
||||
| APIApplicationCommandAutocompleteInteraction
|
||||
@@ -39,7 +39,7 @@ export type APIInteraction =
|
||||
| APIPingInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIDMInteraction =
|
||||
| APIApplicationCommandAutocompleteDMInteraction
|
||||
@@ -48,7 +48,7 @@ export type APIDMInteraction =
|
||||
| APIModalSubmitDMInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIGuildInteraction =
|
||||
| APIApplicationCommandAutocompleteGuildInteraction
|
||||
|
||||
45
deno/payloads/v10/invite.ts
generated
45
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<
|
||||
@@ -25,7 +24,7 @@ export type APIInviteGuild = Pick<
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object}
|
||||
*/
|
||||
export interface APIInvite {
|
||||
/**
|
||||
@@ -35,37 +34,37 @@ export interface APIInvite {
|
||||
/**
|
||||
* The guild this invite is for
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object}
|
||||
*/
|
||||
guild?: APIInviteGuild;
|
||||
/**
|
||||
* The channel this invite is for
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object}
|
||||
*/
|
||||
channel: Required<APIPartialChannel> | null;
|
||||
channel: APIInviteChannel | null;
|
||||
/**
|
||||
* The user who created the invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
inviter?: APIUser;
|
||||
/**
|
||||
* The type of target for this voice channel invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types}
|
||||
*/
|
||||
target_type?: InviteTargetType;
|
||||
/**
|
||||
* The user whose stream to display for this voice channel stream invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
target_user?: APIUser;
|
||||
/**
|
||||
* The embedded application to open for this voice channel embedded application invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/application#application-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object}
|
||||
*/
|
||||
target_application?: Partial<APIApplication>;
|
||||
/**
|
||||
@@ -77,15 +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
|
||||
* @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
|
||||
*/
|
||||
@@ -94,10 +94,21 @@ export interface APIInvite {
|
||||
* The invite type
|
||||
*/
|
||||
type: InviteType;
|
||||
/**
|
||||
* The flags of the invite
|
||||
*/
|
||||
flags?: InviteFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object-invite-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object-guild-invite-flags}
|
||||
*/
|
||||
export enum InviteFlags {
|
||||
IsGuestInvite = 1 << 0,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-types}
|
||||
*/
|
||||
export enum InviteType {
|
||||
Guild,
|
||||
@@ -106,7 +117,7 @@ export enum InviteType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types}
|
||||
*/
|
||||
export enum InviteTargetType {
|
||||
Stream = 1,
|
||||
@@ -114,7 +125,7 @@ export enum InviteTargetType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-metadata-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/invite#invite-metadata-object}
|
||||
*/
|
||||
export interface APIExtendedInvite extends APIInvite {
|
||||
/**
|
||||
|
||||
1999
deno/payloads/v10/message.ts
generated
Normal file
1999
deno/payloads/v10/message.ts
generated
Normal file
File diff suppressed because it is too large
Load Diff
12
deno/payloads/v10/mod.ts
generated
12
deno/payloads/v10/mod.ts
generated
@@ -3,20 +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 './poll.ts';
|
||||
export * from './permissions.ts';
|
||||
export * from './poll.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';
|
||||
export * from './monetization.ts';
|
||||
|
||||
85
deno/payloads/v10/monetization.ts
generated
85
deno/payloads/v10/monetization.ts
generated
@@ -1,7 +1,7 @@
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure
|
||||
* @see {@link https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure}
|
||||
*/
|
||||
export interface APIEntitlement {
|
||||
/**
|
||||
@@ -33,13 +33,13 @@ export interface APIEntitlement {
|
||||
*/
|
||||
deleted: boolean;
|
||||
/**
|
||||
* Start date at which the entitlement is valid. Not present when using test entitlements.
|
||||
* Start date at which the entitlement is valid.
|
||||
*/
|
||||
starts_at?: string;
|
||||
starts_at: string | null;
|
||||
/**
|
||||
* Date at which the entitlement is no longer valid. Not present when using test entitlements.
|
||||
* Date at which the entitlement is no longer valid.
|
||||
*/
|
||||
ends_at?: string;
|
||||
ends_at: string | null;
|
||||
/**
|
||||
* For consumable items, whether or not the entitlement has been consumed
|
||||
*/
|
||||
@@ -47,7 +47,7 @@ export interface APIEntitlement {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types
|
||||
* @see {@link https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types}
|
||||
*/
|
||||
export enum EntitlementType {
|
||||
/**
|
||||
@@ -85,7 +85,7 @@ export enum EntitlementType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure
|
||||
* @see {@link https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure}
|
||||
*/
|
||||
export interface APISKU {
|
||||
/**
|
||||
@@ -111,13 +111,13 @@ export interface APISKU {
|
||||
/**
|
||||
* SKU flags combined as a bitfield
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
flags: SKUFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags
|
||||
* @see {@link https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags}
|
||||
*/
|
||||
export enum SKUFlags {
|
||||
/**
|
||||
@@ -135,6 +135,9 @@ export enum SKUFlags {
|
||||
UserSubscription = 1 << 8,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/sku#sku-object-sku-types}
|
||||
*/
|
||||
export enum SKUType {
|
||||
/**
|
||||
* Durable one-time purchase
|
||||
@@ -153,3 +156,67 @@ export enum SKUType {
|
||||
*/
|
||||
SubscriptionGroup = 6,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/subscription#subscription-object}
|
||||
*/
|
||||
export interface APISubscription {
|
||||
/**
|
||||
* ID of the subscription
|
||||
*/
|
||||
id: Snowflake;
|
||||
/**
|
||||
* ID of the user who is subscribed
|
||||
*/
|
||||
user_id: Snowflake;
|
||||
/**
|
||||
* List of SKUs subscribed to
|
||||
*/
|
||||
sku_ids: Snowflake[];
|
||||
/**
|
||||
* List of entitlements granted for this subscription
|
||||
*/
|
||||
entitlement_ids: Snowflake[];
|
||||
/**
|
||||
* List of SKUs that this user will be subscribed to at renewal
|
||||
*/
|
||||
renewal_sku_ids: Snowflake[] | null;
|
||||
/**
|
||||
* Start of the current subscription period
|
||||
*/
|
||||
current_period_start: string;
|
||||
/**
|
||||
* End of the current subscription period
|
||||
*/
|
||||
current_period_end: string;
|
||||
/**
|
||||
* Current status of the subscription
|
||||
*/
|
||||
status: SubscriptionStatus;
|
||||
/**
|
||||
* When the subscription was canceled
|
||||
*/
|
||||
canceled_at: string | null;
|
||||
/**
|
||||
* ISO3166-1 alpha-2 country code of the payment source used to purchase the subscription. Missing unless queried with a private OAuth scope.
|
||||
*/
|
||||
country?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/subscription#subscription-statuses}
|
||||
*/
|
||||
export enum SubscriptionStatus {
|
||||
/**
|
||||
* Subscription is active and scheduled to renew.
|
||||
*/
|
||||
Active,
|
||||
/**
|
||||
* Subscription is active but will not renew.
|
||||
*/
|
||||
Ending,
|
||||
/**
|
||||
* Subscription is inactive and not being charged.
|
||||
*/
|
||||
Inactive,
|
||||
}
|
||||
|
||||
46
deno/payloads/v10/oauth2.ts
generated
46
deno/payloads/v10/oauth2.ts
generated
@@ -8,10 +8,10 @@ export enum OAuth2Scopes {
|
||||
*/
|
||||
Bot = 'bot',
|
||||
/**
|
||||
* Allows [/users/@me/connections](https://discord.com/developers/docs/resources/user#get-user-connections)
|
||||
* Allows {@link https://discord.com/developers/docs/resources/user#get-user-connections | `/users/@me/connections`}
|
||||
* to return linked third-party accounts
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#get-user-connections
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#get-user-connections}
|
||||
*/
|
||||
Connections = 'connections',
|
||||
/**
|
||||
@@ -19,41 +19,41 @@ export enum OAuth2Scopes {
|
||||
*/
|
||||
DMChannelsRead = 'dm_channels.read',
|
||||
/**
|
||||
* Enables [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) to return an `email`
|
||||
* Enables {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} to return an `email`
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#get-current-user
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#get-current-user}
|
||||
*/
|
||||
Email = 'email',
|
||||
/**
|
||||
* Allows [/users/@me](https://discord.com/developers/docs/resources/user#get-current-user) without `email`
|
||||
* Allows {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} without `email`
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#get-current-user
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#get-current-user}
|
||||
*/
|
||||
Identify = 'identify',
|
||||
/**
|
||||
* Allows [/users/@me/guilds](https://discord.com/developers/docs/resources/user#get-current-user-guilds)
|
||||
* Allows {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds | `/users/@me/guilds`}
|
||||
* to return basic information about all of a user's guilds
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#get-current-user-guilds
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds}
|
||||
*/
|
||||
Guilds = 'guilds',
|
||||
/**
|
||||
* Allows [/guilds/{guild.id}/members/{user.id}](https://discord.com/developers/docs/resources/guild#add-guild-member)
|
||||
* Allows {@link https://discord.com/developers/docs/resources/guild#add-guild-member | `/guilds/[guild.id]/members/[user.id]`}
|
||||
* to be used for joining users to a guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#add-guild-member
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member}
|
||||
*/
|
||||
GuildsJoin = 'guilds.join',
|
||||
/**
|
||||
* Allows /users/@me/guilds/{guild.id}/member to return a user's member information in a guild
|
||||
* Allows /users/\@me/guilds/\{guild.id\}/member to return a user's member information in a guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#get-current-user-guild-member
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member}
|
||||
*/
|
||||
GuildsMembersRead = 'guilds.members.read',
|
||||
/**
|
||||
* Allows your app to join users to a group dm
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient}
|
||||
*/
|
||||
GroupDMJoins = 'gdm.join',
|
||||
/**
|
||||
@@ -69,6 +69,18 @@ export enum OAuth2Scopes {
|
||||
* For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval
|
||||
*/
|
||||
RPC = 'rpc',
|
||||
/**
|
||||
* For local rpc server access, this allows you to update a user's activity - requires Discord approval
|
||||
*/
|
||||
RPCActivitiesWrite = 'rpc.activities.write',
|
||||
/**
|
||||
* For local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval
|
||||
*/
|
||||
RPCVoiceRead = 'rpc.voice.read',
|
||||
/**
|
||||
* For local rpc server access, this allows you to update a user's voice settings - requires Discord approval
|
||||
*/
|
||||
RPCVoiceWrite = 'rpc.voice.write',
|
||||
/**
|
||||
* For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval
|
||||
*/
|
||||
@@ -108,25 +120,25 @@ export enum OAuth2Scopes {
|
||||
/**
|
||||
* Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER)
|
||||
*
|
||||
* See https://discord.com/developers/docs/game-sdk/activities
|
||||
* @see {@link https://discord.com/developers/docs/game-sdk/activities}
|
||||
*/
|
||||
ActivitiesWrite = 'activities.write',
|
||||
/**
|
||||
* Allows your app to use Application Commands in a guild
|
||||
*
|
||||
* See https://discord.com/developers/docs/interactions/application-commands
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands}
|
||||
*/
|
||||
ApplicationsCommands = 'applications.commands',
|
||||
/**
|
||||
* Allows your app to update its Application Commands via this bearer token - client credentials grant only
|
||||
*
|
||||
* See https://discord.com/developers/docs/interactions/application-commands
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands}
|
||||
*/
|
||||
ApplicationsCommandsUpdate = 'applications.commands.update',
|
||||
/**
|
||||
* Allows your app to update permissions for its commands using a Bearer token - client credentials grant only
|
||||
*
|
||||
* See https://discord.com/developers/docs/interactions/application-commands
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands}
|
||||
*/
|
||||
ApplicationCommandsPermissionsUpdate = 'applications.commands.permissions.update',
|
||||
}
|
||||
|
||||
35
deno/payloads/v10/permissions.ts
generated
35
deno/payloads/v10/permissions.ts
generated
@@ -5,7 +5,7 @@
|
||||
import type { Permissions, Snowflake } from '../../globals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#role-object
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object}
|
||||
*/
|
||||
export interface APIRole {
|
||||
/**
|
||||
@@ -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
|
||||
*/
|
||||
@@ -39,7 +46,7 @@ export interface APIRole {
|
||||
/**
|
||||
* Permission bit set
|
||||
*
|
||||
* See https://en.wikipedia.org/wiki/Bit_field
|
||||
* @see {@link https://en.wikipedia.org/wiki/Bit_field}
|
||||
*/
|
||||
permissions: Permissions;
|
||||
/**
|
||||
@@ -61,7 +68,7 @@ export interface APIRole {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure}
|
||||
*/
|
||||
export interface APIRoleTags {
|
||||
/**
|
||||
@@ -91,7 +98,7 @@ export interface APIRoleTags {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/permissions#role-object-role-flags
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-flags}
|
||||
*/
|
||||
export enum RoleFlags {
|
||||
/**
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
63
deno/payloads/v10/poll.ts
generated
63
deno/payloads/v10/poll.ts
generated
@@ -4,14 +4,32 @@
|
||||
|
||||
import type { APIPartialEmoji } from './emoji.ts';
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
export interface APIPollDefaults {
|
||||
/**
|
||||
* Whether a user can select multiple answers
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
allow_multiselect: boolean;
|
||||
/**
|
||||
* The layout type of the poll
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
@@ -19,15 +37,7 @@ export interface APIPoll {
|
||||
/**
|
||||
* The time when the poll ends (IS08601 timestamp)
|
||||
*/
|
||||
expiry: string;
|
||||
/**
|
||||
* Whether a user can select multiple answers
|
||||
*/
|
||||
allow_multiselect: boolean;
|
||||
/**
|
||||
* The layout type of the poll
|
||||
*/
|
||||
layout_type: PollLayoutType;
|
||||
expiry: string | null;
|
||||
/**
|
||||
* The results of the poll
|
||||
*/
|
||||
@@ -35,7 +45,7 @@ export interface APIPoll {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#layout-type
|
||||
* @see {@link https://discord.com/developers/docs/resources/poll#layout-type}
|
||||
*/
|
||||
export enum PollLayoutType {
|
||||
/**
|
||||
@@ -45,7 +55,7 @@ export enum PollLayoutType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#poll-media-object-poll-media-object-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/poll#poll-media-object-poll-media-object-structure}
|
||||
*/
|
||||
export interface APIPollMedia {
|
||||
/**
|
||||
@@ -60,14 +70,7 @@ export interface APIPollMedia {
|
||||
emoji?: APIPartialEmoji;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
@@ -75,7 +78,17 @@ export interface APIPollAnswer {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#poll-results-object-poll-results-object-structure
|
||||
* @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}
|
||||
*/
|
||||
export interface APIPollResults {
|
||||
/**
|
||||
@@ -89,7 +102,7 @@ export interface APIPollResults {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/poll#poll-results-object-poll-answer-count-object-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/poll#poll-results-object-poll-answer-count-object-structure}
|
||||
*/
|
||||
export interface APIPollAnswerCount {
|
||||
/**
|
||||
|
||||
44
deno/payloads/v10/soundboard.ts
generated
Normal file
44
deno/payloads/v10/soundboard.ts
generated
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* Types extracted from https://discord.com/developers/docs/resources/soundboard
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object}
|
||||
*/
|
||||
export interface APISoundboardSound {
|
||||
/**
|
||||
* The name of this sound
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The id of this sound
|
||||
*/
|
||||
sound_id: Snowflake;
|
||||
/**
|
||||
* The volume of this sound, from 0 to 1
|
||||
*/
|
||||
volume: number;
|
||||
/**
|
||||
* The id of this sound's custom emoji
|
||||
*/
|
||||
emoji_id: Snowflake | null;
|
||||
/**
|
||||
* The unicode character of this sound's standard emoji
|
||||
*/
|
||||
emoji_name: string | null;
|
||||
/**
|
||||
* The id of the guild that this sound is in
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
* Whether this sound can be used (for guild sounds), may be false due to loss of Server Boosts
|
||||
*/
|
||||
available: boolean;
|
||||
/**
|
||||
* The user who created this sound
|
||||
*/
|
||||
user?: APIUser;
|
||||
}
|
||||
14
deno/payloads/v10/stageInstance.ts
generated
14
deno/payloads/v10/stageInstance.ts
generated
@@ -2,7 +2,7 @@ import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIGuildMember } from './guild.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/stage-instance#stage-instance-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object}
|
||||
*/
|
||||
export interface APIStageInstance {
|
||||
/**
|
||||
@@ -24,13 +24,14 @@ export interface APIStageInstance {
|
||||
/**
|
||||
* The privacy level of the stage instance
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
|
||||
* @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level}
|
||||
*/
|
||||
privacy_level: StageInstancePrivacyLevel;
|
||||
/**
|
||||
* Whether or not stage discovery is disabled
|
||||
*
|
||||
* @deprecated
|
||||
* {@link https://github.com/discord/discord-api-docs/pull/4296 | discord-api-docs#4296}
|
||||
*/
|
||||
discoverable_disabled: boolean;
|
||||
/**
|
||||
@@ -40,13 +41,14 @@ export interface APIStageInstance {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level
|
||||
* @see {@link https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-privacy-level}
|
||||
*/
|
||||
export enum StageInstancePrivacyLevel {
|
||||
/**
|
||||
* The stage instance is visible publicly, such as on stage discovery
|
||||
*
|
||||
* @deprecated
|
||||
* {@link https://github.com/discord/discord-api-docs/pull/4296 | discord-api-docs#4296}
|
||||
*/
|
||||
Public = 1,
|
||||
/**
|
||||
@@ -56,7 +58,9 @@ export enum StageInstancePrivacyLevel {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/invite#invite-stage-instance-object-invite-stage-instance-structure}
|
||||
* @deprecated
|
||||
* {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479}
|
||||
*/
|
||||
export interface APIInviteStageInstance {
|
||||
/**
|
||||
@@ -74,7 +78,7 @@ export interface APIInviteStageInstance {
|
||||
/**
|
||||
* The members speaking in the stage
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure}
|
||||
*/
|
||||
members: APIGuildMember[];
|
||||
}
|
||||
|
||||
17
deno/payloads/v10/sticker.ts
generated
17
deno/payloads/v10/sticker.ts
generated
@@ -6,7 +6,7 @@ import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#sticker-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
|
||||
*/
|
||||
export interface APISticker {
|
||||
/**
|
||||
@@ -32,19 +32,20 @@ export interface APISticker {
|
||||
/**
|
||||
* Previously the sticker asset hash, now an empty string
|
||||
*
|
||||
* @deprecated
|
||||
* @deprecated This field is no longer documented by Discord and will be removed in v11
|
||||
* @unstable This field is no longer documented by Discord and will be removed in v11
|
||||
*/
|
||||
asset?: '';
|
||||
/**
|
||||
* Type of sticker
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types}
|
||||
*/
|
||||
type: StickerType;
|
||||
/**
|
||||
* Type of sticker format
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types}
|
||||
*/
|
||||
format_type: StickerFormatType;
|
||||
/**
|
||||
@@ -66,7 +67,7 @@ export interface APISticker {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types}
|
||||
*/
|
||||
export enum StickerType {
|
||||
/**
|
||||
@@ -80,7 +81,7 @@ export enum StickerType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types}
|
||||
*/
|
||||
export enum StickerFormatType {
|
||||
PNG = 1,
|
||||
@@ -90,12 +91,12 @@ export enum StickerFormatType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#sticker-item-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-item-object}
|
||||
*/
|
||||
export type APIStickerItem = Pick<APISticker, 'format_type' | 'id' | 'name'>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/sticker#sticker-pack-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-pack-object}
|
||||
*/
|
||||
export interface APIStickerPack {
|
||||
/**
|
||||
|
||||
16
deno/payloads/v10/teams.ts
generated
16
deno/payloads/v10/teams.ts
generated
@@ -6,7 +6,7 @@ import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-team-object
|
||||
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-object}
|
||||
*/
|
||||
export interface APITeam {
|
||||
/**
|
||||
@@ -32,19 +32,19 @@ export interface APITeam {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-team-member-object
|
||||
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-member-object}
|
||||
*/
|
||||
export interface APITeamMember {
|
||||
/**
|
||||
* The user's membership state on the team
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
|
||||
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum}
|
||||
*/
|
||||
membership_state: TeamMemberMembershipState;
|
||||
/**
|
||||
* Will always be `["*"]`
|
||||
*
|
||||
* @deprecated Use `role` instead
|
||||
* @deprecated Use {@link APITeamMember.role} instead.
|
||||
*/
|
||||
permissions: ['*'];
|
||||
/**
|
||||
@@ -54,19 +54,19 @@ export interface APITeamMember {
|
||||
/**
|
||||
* The avatar, discriminator, id, and username of the user
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
user: APIUser;
|
||||
/**
|
||||
* The user's role in the team.
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/teams#team-member-roles
|
||||
* @see {@link https://discord.com/developers/docs/topics/teams#team-member-roles}
|
||||
*/
|
||||
role: TeamMemberRole;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum
|
||||
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum}
|
||||
*/
|
||||
export enum TeamMemberMembershipState {
|
||||
Invited = 1,
|
||||
@@ -74,7 +74,7 @@ export enum TeamMemberMembershipState {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
|
||||
* @see {@link https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types}
|
||||
*/
|
||||
export enum TeamMemberRole {
|
||||
Admin = 'admin',
|
||||
|
||||
7
deno/payloads/v10/template.ts
generated
7
deno/payloads/v10/template.ts
generated
@@ -3,11 +3,12 @@
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { Locale } from '../../rest/common.ts';
|
||||
import type { RESTPostAPIGuildsJSONBody } from '../../rest/v10/mod.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild-template#guild-template-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-template#guild-template-object}
|
||||
*/
|
||||
export interface APITemplate {
|
||||
/**
|
||||
@@ -33,7 +34,7 @@ export interface APITemplate {
|
||||
/**
|
||||
* The user who created the template
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
creator: APIUser;
|
||||
/**
|
||||
@@ -60,6 +61,6 @@ export interface APITemplate {
|
||||
|
||||
export interface APITemplateSerializedSourceGuild extends Omit<RESTPostAPIGuildsJSONBody, 'icon'> {
|
||||
description: string | null;
|
||||
preferred_locale: string;
|
||||
preferred_locale: Locale;
|
||||
icon_hash: string | null;
|
||||
}
|
||||
|
||||
148
deno/payloads/v10/user.ts
generated
148
deno/payloads/v10/user.ts
generated
@@ -6,7 +6,7 @@ import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIGuildIntegration } from './guild.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/user#user-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
export interface APIUser {
|
||||
/**
|
||||
@@ -28,7 +28,7 @@ export interface APIUser {
|
||||
/**
|
||||
* The user's avatar hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
avatar: string | null;
|
||||
/**
|
||||
@@ -46,7 +46,7 @@ export interface APIUser {
|
||||
/**
|
||||
* The user's banner hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
banner?: string | null;
|
||||
/**
|
||||
@@ -68,39 +68,50 @@ export interface APIUser {
|
||||
/**
|
||||
* The flags on a user's account
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object-user-flags
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags}
|
||||
*/
|
||||
flags?: UserFlags;
|
||||
/**
|
||||
* The type of Nitro subscription on a user's account
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object-premium-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types}
|
||||
*/
|
||||
premium_type?: UserPremiumType;
|
||||
/**
|
||||
* The public flags on a user's account
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object-user-flags
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags}
|
||||
*/
|
||||
public_flags?: UserFlags;
|
||||
/**
|
||||
* The user's avatar decoration hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
*
|
||||
* @deprecated Use `avatar_decoration_data` instead
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
* @deprecated Use {@link APIUser.avatar_decoration_data} instead
|
||||
*/
|
||||
avatar_decoration?: string | null;
|
||||
/**
|
||||
* The data for the user's avatar decoration
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/user#user-object-user-flags
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags}
|
||||
*/
|
||||
export enum UserFlags {
|
||||
/**
|
||||
@@ -144,7 +155,7 @@ export enum UserFlags {
|
||||
*/
|
||||
PremiumEarlySupporter = 1 << 9,
|
||||
/**
|
||||
* User is a [team](https://discord.com/developers/docs/topics/teams)
|
||||
* User is a {@link https://discord.com/developers/docs/topics/teams | team}
|
||||
*/
|
||||
TeamPseudoUser = 1 << 10,
|
||||
/**
|
||||
@@ -168,7 +179,7 @@ export enum UserFlags {
|
||||
*/
|
||||
CertifiedModerator = 1 << 18,
|
||||
/**
|
||||
* Bot uses only [HTTP interactions](https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction) and is shown in the online member list
|
||||
* Bot uses only {@link https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction | HTTP interactions} and is shown in the online member list
|
||||
*/
|
||||
BotHTTPInteractions = 1 << 19,
|
||||
/**
|
||||
@@ -182,36 +193,36 @@ export enum UserFlags {
|
||||
*/
|
||||
DisablePremium = 1 << 21,
|
||||
/**
|
||||
* User is an [Active Developer](https://support-dev.discord.com/hc/articles/10113997751447)
|
||||
* User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer}
|
||||
*/
|
||||
ActiveDeveloper = 1 << 22,
|
||||
/**
|
||||
* User's account has been [quarantined](https://support.discord.com/hc/articles/6461420677527) based on recent activity
|
||||
* User's account has been {@link https://support.discord.com/hc/articles/6461420677527 | quarantined} based on recent activity
|
||||
*
|
||||
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
* @privateRemarks
|
||||
*
|
||||
* This value would be 1 << 44, but bit shifting above 1 << 30 requires bigints
|
||||
* This value would be `1 << 44`, but bit shifting above `1 << 30` requires bigints
|
||||
*/
|
||||
Quarantined = 17_592_186_044_416,
|
||||
/**
|
||||
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
* @privateRemarks
|
||||
*
|
||||
* This value would be 1 << 50, but bit shifting above 1 << 30 requires bigints
|
||||
* This value would be `1 << 50`, but bit shifting above `1 << 30` requires bigints
|
||||
*/
|
||||
Collaborator = 1_125_899_906_842_624,
|
||||
/**
|
||||
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
|
||||
* @privateRemarks
|
||||
*
|
||||
* This value would be 1 << 51, but bit shifting above 1 << 30 requires bigints
|
||||
* This value would be `1 << 51`, but bit shifting above `1 << 30` requires bigints
|
||||
*/
|
||||
RestrictedCollaborator = 2_251_799_813_685_248,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/user#user-object-premium-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types}
|
||||
*/
|
||||
export enum UserPremiumType {
|
||||
None,
|
||||
@@ -221,7 +232,7 @@ export enum UserPremiumType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/user#connection-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#connection-object}
|
||||
*/
|
||||
export interface APIConnection {
|
||||
/**
|
||||
@@ -235,7 +246,7 @@ export interface APIConnection {
|
||||
/**
|
||||
* The service of the connection
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#connection-object-services
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#connection-object-services}
|
||||
*/
|
||||
type: ConnectionService;
|
||||
/**
|
||||
@@ -245,7 +256,7 @@ export interface APIConnection {
|
||||
/**
|
||||
* An array of partial server integrations
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#integration-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object}
|
||||
*/
|
||||
integrations?: Partial<APIGuildIntegration>[];
|
||||
/**
|
||||
@@ -267,14 +278,17 @@ export interface APIConnection {
|
||||
/**
|
||||
* Visibility of this connection
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#connection-object-visibility-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#connection-object-visibility-types}
|
||||
*/
|
||||
visibility: ConnectionVisibility;
|
||||
}
|
||||
|
||||
export enum ConnectionService {
|
||||
AmazonMusic = 'amazon-music',
|
||||
BattleNet = 'battlenet',
|
||||
Bluesky = 'bluesky',
|
||||
BungieNet = 'bungie',
|
||||
Crunchyroll = 'crunchyroll',
|
||||
Domain = 'domain',
|
||||
eBay = 'ebay',
|
||||
EpicGames = 'epicgames',
|
||||
@@ -282,10 +296,12 @@ export enum ConnectionService {
|
||||
GitHub = 'github',
|
||||
Instagram = 'instagram',
|
||||
LeagueOfLegends = 'leagueoflegends',
|
||||
Mastodon = 'mastodon',
|
||||
PayPal = 'paypal',
|
||||
PlayStationNetwork = 'playstation',
|
||||
Reddit = 'reddit',
|
||||
RiotGames = 'riotgames',
|
||||
Roblox = 'roblox',
|
||||
Spotify = 'spotify',
|
||||
Skype = 'skype',
|
||||
Steam = 'steam',
|
||||
@@ -293,7 +309,7 @@ export enum ConnectionService {
|
||||
Twitch = 'twitch',
|
||||
X = 'twitter',
|
||||
/**
|
||||
* @deprecated This is the old name for {@apilink ConnectionService#X}
|
||||
* @deprecated This is the old name for {@link ConnectionService.X}
|
||||
*/
|
||||
Twitter = X,
|
||||
Xbox = 'xbox',
|
||||
@@ -312,7 +328,7 @@ export enum ConnectionVisibility {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/user#application-role-connection-object-application-role-connection-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#application-role-connection-object-application-role-connection-structure}
|
||||
*/
|
||||
export interface APIApplicationRoleConnection {
|
||||
/**
|
||||
@@ -330,13 +346,13 @@ export interface APIApplicationRoleConnection {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object}
|
||||
*/
|
||||
export interface APIAvatarDecorationData {
|
||||
/**
|
||||
* The avatar decoration hash
|
||||
*
|
||||
* See https://discord.com/developers/docs/reference#image-formatting
|
||||
* @see {@link https://discord.com/developers/docs/reference#image-formatting}
|
||||
*/
|
||||
asset: string;
|
||||
/**
|
||||
@@ -344,3 +360,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;
|
||||
}
|
||||
|
||||
29
deno/payloads/v10/voice.ts
generated
29
deno/payloads/v10/voice.ts
generated
@@ -6,13 +6,15 @@ import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIGuildMember } from './guild.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-state-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
|
||||
* @deprecated This is deprecated, use {@link APIVoiceState}
|
||||
*/
|
||||
export interface GatewayVoiceState {
|
||||
/**
|
||||
* The guild id this voice state is for
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
export type GatewayVoiceState = APIVoiceState;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-state-object}
|
||||
*/
|
||||
export interface APIBaseVoiceState {
|
||||
/**
|
||||
* The channel id this user is connected to
|
||||
*/
|
||||
@@ -24,7 +26,8 @@ export interface GatewayVoiceState {
|
||||
/**
|
||||
* The guild member this voice state is for
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
* @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;
|
||||
/**
|
||||
@@ -66,7 +69,17 @@ export interface GatewayVoiceState {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/voice#voice-region-object
|
||||
* @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}
|
||||
*/
|
||||
export interface APIVoiceRegion {
|
||||
/**
|
||||
|
||||
159
deno/payloads/v10/webhook.ts
generated
159
deno/payloads/v10/webhook.ts
generated
@@ -3,10 +3,18 @@
|
||||
*/
|
||||
|
||||
import type { Snowflake } from '../../globals.ts';
|
||||
import type { APIPartialChannel, APIPartialGuild, APIUser } from './mod.ts';
|
||||
import type {
|
||||
APIEntitlement,
|
||||
APIGuild,
|
||||
APIUser,
|
||||
APIWebhookSourceGuild,
|
||||
ApplicationIntegrationType,
|
||||
OAuth2Scopes,
|
||||
APIWebhookSourceChannel,
|
||||
} from './mod.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/webhook#webhook-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object}
|
||||
*/
|
||||
export interface APIWebhook {
|
||||
/**
|
||||
@@ -16,7 +24,7 @@ export interface APIWebhook {
|
||||
/**
|
||||
* The type of the webhook
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types}
|
||||
*/
|
||||
type: WebhookType;
|
||||
/**
|
||||
@@ -30,7 +38,7 @@ export interface APIWebhook {
|
||||
/**
|
||||
* The user this webhook was created by (not returned when getting a webhook with its token)
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
user?: APIUser;
|
||||
/**
|
||||
@@ -52,17 +60,156 @@ 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)
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/webhook-events#webhook-event-payloads}
|
||||
*/
|
||||
export type APIWebhookEvent =
|
||||
| APIWebhookEventBase<ApplicationWebhookType.Event, APIWebhookEventBody>
|
||||
| APIWebhookEventBase<ApplicationWebhookType.Ping, never>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/webhook-events#event-body-object}
|
||||
*/
|
||||
export type APIWebhookEventBody =
|
||||
| APIWebhookEventEventBase<
|
||||
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 {
|
||||
/**
|
||||
* Installation context for the authorization. Either guild (`0`) if installed to a server or user (`1`) if installed to a user's account
|
||||
*/
|
||||
integration_type?: ApplicationIntegrationType;
|
||||
/**
|
||||
* User who authorized the app
|
||||
*/
|
||||
user: APIUser;
|
||||
/**
|
||||
* List of scopes the user authorized
|
||||
*/
|
||||
scopes: OAuth2Scopes[];
|
||||
/**
|
||||
* Server which app was authorized for (when integration type is `0`)
|
||||
*/
|
||||
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> {
|
||||
/**
|
||||
* Version scheme for the webhook event. Currently always `1`
|
||||
*/
|
||||
version: 1;
|
||||
/**
|
||||
* ID of your app
|
||||
*/
|
||||
application_id: Snowflake;
|
||||
/**
|
||||
* Type of webhook
|
||||
*/
|
||||
type: Type;
|
||||
/**
|
||||
* Event data payload
|
||||
*/
|
||||
event: Event;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/webhook-events#webhook-types}
|
||||
*/
|
||||
export enum ApplicationWebhookType {
|
||||
/**
|
||||
* PING event sent to verify your Webhook Event URL is active
|
||||
*/
|
||||
Ping,
|
||||
/**
|
||||
* Webhook event (details for event in event body object)
|
||||
*/
|
||||
Event,
|
||||
}
|
||||
|
||||
export interface APIWebhookEventEventBase<Type extends ApplicationWebhookEventType, Data> {
|
||||
/**
|
||||
* Event type
|
||||
*/
|
||||
type: Type;
|
||||
/**
|
||||
* Timestamp of when the event occurred in ISO8601 format
|
||||
*/
|
||||
timestamp: string;
|
||||
/**
|
||||
* Data for the event. The shape depends on the event type
|
||||
*/
|
||||
data: Data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/webhook-events#event-types}
|
||||
*/
|
||||
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)
|
||||
*/
|
||||
QuestUserEnrollment = 'QUEST_USER_ENROLLMENT',
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types}
|
||||
*/
|
||||
export enum WebhookType {
|
||||
/**
|
||||
* Incoming Webhooks can post messages to channels with a generated token
|
||||
|
||||
4
deno/payloads/v6/channel.ts
generated
4
deno/payloads/v6/channel.ts
generated
@@ -219,9 +219,6 @@ export enum OverwriteType {
|
||||
*/
|
||||
export interface APIEmbed {
|
||||
title?: string;
|
||||
/**
|
||||
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
|
||||
*/
|
||||
type?: EmbedType;
|
||||
description?: string;
|
||||
url?: string;
|
||||
@@ -239,7 +236,6 @@ export interface APIEmbed {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#embed-object-embed-types
|
||||
*
|
||||
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
|
||||
* @deprecated API and Gateway v6 are deprecated and the types will not receive further updates, please update to v8.
|
||||
*/
|
||||
export enum EmbedType {
|
||||
|
||||
5
deno/payloads/v8/channel.ts
generated
5
deno/payloads/v8/channel.ts
generated
@@ -693,10 +693,6 @@ export interface APIEmbed {
|
||||
title?: string;
|
||||
/**
|
||||
* Type of embed (always "rich" for webhook embeds)
|
||||
*
|
||||
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#embed-object-embed-types
|
||||
*/
|
||||
type?: EmbedType;
|
||||
/**
|
||||
@@ -766,7 +762,6 @@ export interface APIEmbed {
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#embed-object-embed-types
|
||||
*
|
||||
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
|
||||
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
|
||||
*/
|
||||
export enum EmbedType {
|
||||
|
||||
@@ -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<
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { InteractionType } from '../../responses.ts';
|
||||
import type {
|
||||
APIApplicationCommandOptionBase,
|
||||
APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper,
|
||||
@@ -5,8 +6,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
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.
|
||||
*/
|
||||
@@ -22,7 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Integer, number> {
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Integer,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { InteractionType } from '../../responses.ts';
|
||||
import type {
|
||||
APIApplicationCommandOptionBase,
|
||||
APIApplicationCommandOptionWithAutocompleteOrChoicesWrapper,
|
||||
@@ -5,8 +6,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
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.
|
||||
*/
|
||||
@@ -22,7 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataNumberOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.Number, number> {
|
||||
export interface APIApplicationCommandInteractionDataNumberOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Number,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { LocalizationMap } from '../../../../../v9.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type}
|
||||
*/
|
||||
export enum ApplicationCommandOptionType {
|
||||
Subcommand = 1,
|
||||
@@ -18,7 +18,7 @@ export enum ApplicationCommandOptionType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure}
|
||||
*/
|
||||
export interface APIApplicationCommandOptionChoice<ValueType = number | string> {
|
||||
name: string;
|
||||
|
||||
@@ -5,8 +5,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import type { InteractionType } from '../../responses.ts';
|
||||
import type { APIApplicationCommandBasicOption, APIApplicationCommandInteractionDataBasicOption } from '../chatInput.ts';
|
||||
import type { APIApplicationCommandOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandSubcommandOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
options?: APIApplicationCommandBasicOption[];
|
||||
}
|
||||
|
||||
export interface APIApplicationCommandInteractionDataSubcommandOption {
|
||||
export interface APIApplicationCommandInteractionDataSubcommandOption<Type extends InteractionType = InteractionType> {
|
||||
name: string;
|
||||
type: ApplicationCommandOptionType.Subcommand;
|
||||
options?: APIApplicationCommandInteractionDataBasicOption[];
|
||||
options?: APIApplicationCommandInteractionDataBasicOption<Type>[];
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { InteractionType } from '../../responses.ts';
|
||||
import type { APIApplicationCommandOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
import type {
|
||||
@@ -5,13 +6,14 @@ import type {
|
||||
APIApplicationCommandSubcommandOption,
|
||||
} from './subcommand.ts';
|
||||
|
||||
export interface APIApplicationCommandSubcommandGroupOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
options?: APIApplicationCommandSubcommandOption[];
|
||||
}
|
||||
|
||||
export interface APIApplicationCommandInteractionDataSubcommandGroupOption {
|
||||
export interface APIApplicationCommandInteractionDataSubcommandGroupOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> {
|
||||
name: string;
|
||||
type: ApplicationCommandOptionType.SubcommandGroup;
|
||||
options: APIApplicationCommandInteractionDataSubcommandOption[];
|
||||
options: APIApplicationCommandInteractionDataSubcommandOption<Type>[];
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { APIInteractionDataResolved } from '../../mod.ts';
|
||||
import type { APIInteractionDataResolved, InteractionType } from '../../mod.ts';
|
||||
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
|
||||
import type {
|
||||
@@ -47,22 +47,22 @@ 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';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure}
|
||||
*/
|
||||
export type APIApplicationCommandBasicOption =
|
||||
| APIApplicationCommandAttachmentOption
|
||||
@@ -76,7 +76,7 @@ export type APIApplicationCommandBasicOption =
|
||||
| APIApplicationCommandUserOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure}
|
||||
*/
|
||||
export type APIApplicationCommandOption =
|
||||
| APIApplicationCommandBasicOption
|
||||
@@ -84,47 +84,54 @@ export type APIApplicationCommandOption =
|
||||
| APIApplicationCommandSubcommandOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-interaction-data-option-structure}
|
||||
*/
|
||||
export type APIApplicationCommandInteractionDataOption =
|
||||
| APIApplicationCommandInteractionDataBasicOption
|
||||
| APIApplicationCommandInteractionDataSubcommandGroupOption
|
||||
| APIApplicationCommandInteractionDataSubcommandOption;
|
||||
export type APIApplicationCommandInteractionDataOption<Type extends InteractionType = InteractionType> =
|
||||
| APIApplicationCommandInteractionDataBasicOption<Type>
|
||||
| APIApplicationCommandInteractionDataSubcommandGroupOption<Type>
|
||||
| APIApplicationCommandInteractionDataSubcommandOption<Type>;
|
||||
|
||||
export type APIApplicationCommandInteractionDataBasicOption =
|
||||
export type APIApplicationCommandInteractionDataBasicOption<Type extends InteractionType = InteractionType> =
|
||||
| APIApplicationCommandInteractionDataAttachmentOption
|
||||
| APIApplicationCommandInteractionDataBooleanOption
|
||||
| APIApplicationCommandInteractionDataChannelOption
|
||||
| APIApplicationCommandInteractionDataIntegerOption
|
||||
| APIApplicationCommandInteractionDataIntegerOption<Type>
|
||||
| APIApplicationCommandInteractionDataMentionableOption
|
||||
| APIApplicationCommandInteractionDataNumberOption
|
||||
| APIApplicationCommandInteractionDataNumberOption<Type>
|
||||
| APIApplicationCommandInteractionDataRoleOption
|
||||
| APIApplicationCommandInteractionDataStringOption
|
||||
| APIApplicationCommandInteractionDataUserOption;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIChatInputApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption[];
|
||||
export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIChatInputApplicationCommandInteraction =
|
||||
APIApplicationCommandInteractionWrapper<APIChatInputApplicationCommandInteractionData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIChatInputApplicationCommandDMInteraction =
|
||||
APIDMInteractionWrapper<APIChatInputApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIChatInputApplicationCommandGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIChatInputApplicationCommandInteraction>;
|
||||
|
||||
@@ -1,90 +1,88 @@
|
||||
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';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIUserApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
target_id: Snowflake;
|
||||
resolved: APIUserInteractionDataResolved;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIMessageApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
target_id: Snowflake;
|
||||
resolved: APIMessageApplicationCommandInteractionDataResolved;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
|
||||
*/
|
||||
export interface APIMessageApplicationCommandInteractionDataResolved {
|
||||
messages: Record<Snowflake, APIMessage>;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export type APIContextMenuInteractionData =
|
||||
| APIMessageApplicationCommandInteractionData
|
||||
| APIUserApplicationCommandInteractionData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIUserApplicationCommandInteraction =
|
||||
APIApplicationCommandInteractionWrapper<APIUserApplicationCommandInteractionData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIUserApplicationCommandDMInteraction = APIDMInteractionWrapper<APIUserApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIUserApplicationCommandGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIUserApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIMessageApplicationCommandInteraction =
|
||||
APIApplicationCommandInteractionWrapper<APIMessageApplicationCommandInteractionData>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIMessageApplicationCommandDMInteraction =
|
||||
APIDMInteractionWrapper<APIMessageApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIMessageApplicationCommandGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIMessageApplicationCommandInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIContextMenuInteraction = APIMessageApplicationCommandInteraction | APIUserApplicationCommandInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIContextMenuDMInteraction =
|
||||
| APIMessageApplicationCommandDMInteraction
|
||||
| APIUserApplicationCommandDMInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIContextMenuGuildInteraction =
|
||||
| APIMessageApplicationCommandGuildInteraction
|
||||
|
||||
26
deno/payloads/v9/_interactions/_applicationCommands/entryPoint.ts
generated
Normal file
26
deno/payloads/v9/_interactions/_applicationCommands/entryPoint.ts
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
import type { APIApplicationCommandInteractionWrapper, ApplicationCommandType } from '../applicationCommands.ts';
|
||||
import type { APIDMInteractionWrapper, APIGuildInteractionWrapper } from '../base.ts';
|
||||
import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export type APIPrimaryEntryPointCommandInteractionData =
|
||||
APIBaseApplicationCommandInteractionData<ApplicationCommandType.PrimaryEntryPoint>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIPrimaryEntryPointCommandInteraction =
|
||||
APIApplicationCommandInteractionWrapper<APIPrimaryEntryPointCommandInteractionData>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIPrimaryEntryPointCommandDMInteraction = APIDMInteractionWrapper<APIPrimaryEntryPointCommandInteraction>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIPrimaryEntryPointCommandGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIPrimaryEntryPointCommandInteraction>;
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Snowflake } from '../../../../globals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-guild-application-command-permissions-structure}
|
||||
*/
|
||||
export interface APIGuildApplicationCommandPermissions {
|
||||
/**
|
||||
@@ -23,7 +23,7 @@ export interface APIGuildApplicationCommandPermissions {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-structure}
|
||||
*/
|
||||
export interface APIApplicationCommandPermission {
|
||||
/**
|
||||
@@ -41,7 +41,7 @@ export interface APIApplicationCommandPermission {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permission-type}
|
||||
*/
|
||||
export enum ApplicationCommandPermissionType {
|
||||
Role = 1,
|
||||
@@ -50,7 +50,7 @@ export enum ApplicationCommandPermissionType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-permissions-object-application-command-permissions-constants}
|
||||
*/
|
||||
export const APIApplicationCommandPermissionsConstant = {
|
||||
// eslint-disable-next-line unicorn/prefer-native-coercion-functions
|
||||
|
||||
101
deno/payloads/v9/_interactions/applicationCommands.ts
generated
101
deno/payloads/v9/_interactions/applicationCommands.ts
generated
@@ -13,15 +13,23 @@ import type {
|
||||
APIContextMenuInteraction,
|
||||
APIContextMenuInteractionData,
|
||||
} from './_applicationCommands/contextMenu.ts';
|
||||
import type {
|
||||
APIPrimaryEntryPointCommandDMInteraction,
|
||||
APIPrimaryEntryPointCommandGuildInteraction,
|
||||
APIPrimaryEntryPointCommandInteraction,
|
||||
APIPrimaryEntryPointCommandInteractionData,
|
||||
} from './_applicationCommands/entryPoint.ts';
|
||||
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 type * from './_applicationCommands/entryPoint.ts';
|
||||
export type * from './_applicationCommands/internals.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object}
|
||||
*/
|
||||
export interface APIApplicationCommand {
|
||||
/**
|
||||
@@ -75,7 +83,7 @@ export interface APIApplicationCommand {
|
||||
/**
|
||||
* Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible
|
||||
*
|
||||
* @deprecated Use `contexts` instead
|
||||
* @deprecated Use {@link APIApplicationCommand.contexts} instead
|
||||
*/
|
||||
dm_permission?: boolean;
|
||||
/**
|
||||
@@ -83,81 +91,117 @@ export interface APIApplicationCommand {
|
||||
*
|
||||
* If missing, this property should be assumed as `true`
|
||||
*
|
||||
* @deprecated Use `dm_permission` and/or `default_member_permissions` instead
|
||||
* @deprecated Use {@link APIApplicationCommand.dm_permission} and/or {@link APIApplicationCommand.default_member_permissions} instead
|
||||
*/
|
||||
default_permission?: boolean;
|
||||
/**
|
||||
* Indicates whether the command is age-restricted, defaults to `false`
|
||||
* Indicates whether the command is age-restricted
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @unstable
|
||||
* @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
|
||||
*
|
||||
* @unstable
|
||||
* @defaultValue `[InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel]`
|
||||
*/
|
||||
contexts?: InteractionContextType[] | null;
|
||||
/**
|
||||
* Autoincrementing version identifier updated during substantial record changes
|
||||
*/
|
||||
version: Snowflake;
|
||||
/**
|
||||
* Determines whether the interaction is handled by the app's interactions handler or by Discord
|
||||
*
|
||||
* @remarks
|
||||
* This is only available for {@link ApplicationCommandType.PrimaryEntryPoint} commands
|
||||
*/
|
||||
handler?: EntryPointCommandHandlerType;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types}
|
||||
*/
|
||||
export enum ApplicationCommandType {
|
||||
/**
|
||||
* Slash commands; a text-based command that shows up when a user types `/`
|
||||
*/
|
||||
ChatInput = 1,
|
||||
/**
|
||||
* A UI-based command that shows up when you right click or tap on a user
|
||||
*/
|
||||
User,
|
||||
/**
|
||||
* A UI-based command that shows up when you right click or tap on a message
|
||||
*/
|
||||
Message,
|
||||
/**
|
||||
* A UI-based command that represents the primary way to invoke an app's Activity
|
||||
*/
|
||||
PrimaryEntryPoint,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#application-object-application-integration-types
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-integration-types}
|
||||
*/
|
||||
export enum ApplicationIntegrationType {
|
||||
/**
|
||||
* App is installable to servers
|
||||
*/
|
||||
GuildInstall = 0,
|
||||
GuildInstall,
|
||||
/**
|
||||
* App is installable to users
|
||||
*/
|
||||
UserInstall = 1,
|
||||
UserInstall,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-context-types}
|
||||
*/
|
||||
export enum InteractionContextType {
|
||||
/**
|
||||
* Interaction can be used within servers
|
||||
*/
|
||||
Guild = 0,
|
||||
Guild,
|
||||
/**
|
||||
* Interaction can be used within DMs with the app's bot user
|
||||
*/
|
||||
BotDM = 1,
|
||||
BotDM,
|
||||
/**
|
||||
* Interaction can be used within Group DMs and DMs other than the app's bot user
|
||||
*/
|
||||
PrivateChannel = 2,
|
||||
PrivateChannel,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types}
|
||||
*/
|
||||
export enum EntryPointCommandHandlerType {
|
||||
/**
|
||||
* The app handles the interaction using an interaction token
|
||||
*/
|
||||
AppHandler = 1,
|
||||
/**
|
||||
* Discord handles the interaction by launching an Activity and sending a follow-up message without coordinating with
|
||||
* the app
|
||||
*/
|
||||
DiscordLaunchActivity,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export type APIApplicationCommandInteractionData =
|
||||
| APIChatInputApplicationCommandInteractionData
|
||||
| APIContextMenuInteractionData;
|
||||
| APIContextMenuInteractionData
|
||||
| APIPrimaryEntryPointCommandInteractionData;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationCommandInteractionData> =
|
||||
APIBaseInteraction<InteractionType.ApplicationCommand, Data> &
|
||||
@@ -169,20 +213,25 @@ export type APIApplicationCommandInteractionWrapper<Data extends APIApplicationC
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIApplicationCommandInteraction = APIChatInputApplicationCommandInteraction | APIContextMenuInteraction;
|
||||
export type APIApplicationCommandInteraction =
|
||||
| APIChatInputApplicationCommandInteraction
|
||||
| APIContextMenuInteraction
|
||||
| APIPrimaryEntryPointCommandInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIApplicationCommandDMInteraction =
|
||||
| APIChatInputApplicationCommandDMInteraction
|
||||
| APIContextMenuDMInteraction;
|
||||
| APIContextMenuDMInteraction
|
||||
| APIPrimaryEntryPointCommandDMInteraction;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIApplicationCommandGuildInteraction =
|
||||
| APIChatInputApplicationCommandGuildInteraction
|
||||
| APIContextMenuGuildInteraction;
|
||||
| APIContextMenuGuildInteraction
|
||||
| APIPrimaryEntryPointCommandGuildInteraction;
|
||||
|
||||
10
deno/payloads/v9/_interactions/autocomplete.ts
generated
10
deno/payloads/v9/_interactions/autocomplete.ts
generated
@@ -1,6 +1,6 @@
|
||||
import type {
|
||||
APIBaseInteraction,
|
||||
APIChatInputApplicationCommandInteractionData,
|
||||
APIAutocompleteApplicationCommandInteractionData,
|
||||
APIDMInteractionWrapper,
|
||||
APIGuildInteractionWrapper,
|
||||
InteractionType,
|
||||
@@ -8,26 +8,26 @@ import type {
|
||||
|
||||
export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
|
||||
InteractionType.ApplicationCommandAutocomplete,
|
||||
APIChatInputApplicationCommandInteractionData
|
||||
APIAutocompleteApplicationCommandInteractionData
|
||||
> &
|
||||
Required<
|
||||
Pick<
|
||||
APIBaseInteraction<
|
||||
InteractionType.ApplicationCommandAutocomplete,
|
||||
Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>
|
||||
Required<Pick<APIAutocompleteApplicationCommandInteractionData, 'options'>>
|
||||
>,
|
||||
'data'
|
||||
>
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIApplicationCommandAutocompleteDMInteraction =
|
||||
APIDMInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIApplicationCommandAutocompleteGuildInteraction =
|
||||
APIGuildInteractionWrapper<APIApplicationCommandAutocompleteInteraction>;
|
||||
|
||||
103
deno/payloads/v9/_interactions/base.ts
generated
103
deno/payloads/v9/_interactions/base.ts
generated
@@ -1,23 +1,31 @@
|
||||
import type { Permissions, Snowflake } from '../../../globals.ts';
|
||||
import type { APIRole, ApplicationIntegrationType, InteractionContextType, LocaleString } from '../../../v9.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 } 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';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object}
|
||||
*/
|
||||
export interface APIMessageInteractionMetadata {
|
||||
export type APIMessageInteractionMetadata =
|
||||
| APIApplicationCommandInteractionMetadata
|
||||
| APIMessageComponentInteractionMetadata
|
||||
| APIModalSubmitInteractionMetadata;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object}
|
||||
*/
|
||||
export interface APIBaseInteractionMetadata<Type extends InteractionType> {
|
||||
/**
|
||||
* ID of the interaction
|
||||
*/
|
||||
@@ -25,27 +33,54 @@ export interface APIMessageInteractionMetadata {
|
||||
/**
|
||||
* Type of interaction
|
||||
*/
|
||||
type: InteractionType;
|
||||
type: Type;
|
||||
/**
|
||||
* User who triggered the interaction
|
||||
*/
|
||||
user: APIUser;
|
||||
/**
|
||||
* IDs for installation context(s) related to an interaction. Details in Authorizing Integration Owners Object
|
||||
* IDs for installation context(s) related to an interaction
|
||||
*/
|
||||
authorizing_integration_owners: APIAuthorizingIntegrationOwnersMap;
|
||||
/**
|
||||
* ID of the original response message, present only on follow-up messages
|
||||
*/
|
||||
original_response_message_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure}
|
||||
*/
|
||||
export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
|
||||
/**
|
||||
* ID of the message that contained interactive component, present only on messages created from component interactions
|
||||
* The user the command was run on, present only on user commands interactions
|
||||
*/
|
||||
interacted_message_id?: Snowflake;
|
||||
target_user?: APIUser;
|
||||
/**
|
||||
* Metadata for the interaction that was used to open the modal, present only on modal submit interactions
|
||||
* The ID of the message the command was run on, present only on message command interactions.
|
||||
* The original response message will also have `message_reference` and `referenced_message` pointing to this message.
|
||||
*/
|
||||
triggering_interaction_metadata?: APIMessageInteractionMetadata;
|
||||
target_message_id?: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure}
|
||||
*/
|
||||
export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
|
||||
/**
|
||||
* ID of the message that contained the interactive component
|
||||
*/
|
||||
interacted_message_id: Snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-modal-submit-interaction-metadata-structure}
|
||||
*/
|
||||
export interface APIModalSubmitInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ModalSubmit> {
|
||||
/**
|
||||
* Metadata for the interaction that was used to open the modal
|
||||
*/
|
||||
triggering_interaction_metadata: APIApplicationCommandInteractionMetadata | APIMessageComponentInteractionMetadata;
|
||||
}
|
||||
|
||||
export type PartialAPIMessageInteractionGuildMember = Pick<
|
||||
@@ -62,7 +97,7 @@ export type PartialAPIMessageInteractionGuildMember = Pick<
|
||||
>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#message-interaction-object}
|
||||
*/
|
||||
export interface APIMessageInteraction {
|
||||
/**
|
||||
@@ -88,7 +123,7 @@ export interface APIMessageInteraction {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIInteractionGuildMember extends APIGuildMember {
|
||||
permissions: Permissions;
|
||||
@@ -98,7 +133,7 @@ export interface APIInteractionGuildMember extends APIGuildMember {
|
||||
// INTERACTIONS RECEIVED
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
/**
|
||||
@@ -118,7 +153,11 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
*/
|
||||
data?: Data;
|
||||
/**
|
||||
* The guild it was sent from
|
||||
* Guild that the interaction was sent from
|
||||
*/
|
||||
guild?: APIPartialInteractionGuild;
|
||||
/**
|
||||
* Guild that the interaction was sent from
|
||||
*/
|
||||
guild_id?: Snowflake;
|
||||
/**
|
||||
@@ -128,7 +167,7 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
/**
|
||||
* The id of the channel it was sent from
|
||||
*
|
||||
* @deprecated Use {@apilink APIBaseInteraction#channel} instead
|
||||
* @deprecated Use {@link APIBaseInteraction.channel} instead
|
||||
*/
|
||||
channel_id?: Snowflake;
|
||||
/**
|
||||
@@ -160,11 +199,11 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
/**
|
||||
* The selected language of the invoking user
|
||||
*/
|
||||
locale: LocaleString;
|
||||
locale: Locale;
|
||||
/**
|
||||
* The guild's preferred locale, if invoked in a guild
|
||||
*/
|
||||
guild_locale?: LocaleString;
|
||||
guild_locale?: Locale;
|
||||
/**
|
||||
* For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
|
||||
*/
|
||||
@@ -177,6 +216,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
|
||||
* Context where the interaction was triggered from
|
||||
*/
|
||||
context?: InteractionContextType;
|
||||
/**
|
||||
* Attachment size limit in bytes
|
||||
*/
|
||||
attachment_size_limit: number;
|
||||
}
|
||||
|
||||
export type APIAuthorizingIntegrationOwnersMap = {
|
||||
@@ -201,7 +244,7 @@ export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> ex
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/channel#channel-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object}
|
||||
*/
|
||||
export type APIInteractionDataResolvedChannel =
|
||||
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
|
||||
@@ -209,20 +252,22 @@ export type APIInteractionDataResolvedChannel =
|
||||
Pick<APIThreadChannel, 'parent_id' | 'thread_metadata'>);
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/guild#guild-member-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIInteractionDataResolvedGuildMember extends Omit<APIGuildMember, 'deaf' | 'mute' | 'user'> {
|
||||
export interface APIInteractionDataResolvedGuildMember
|
||||
extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined {
|
||||
permissions: Permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
|
||||
*/
|
||||
export interface APIInteractionDataResolved {
|
||||
users?: Record<Snowflake, APIUser>;
|
||||
roles?: Record<Snowflake, APIRole>;
|
||||
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
|
||||
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
|
||||
messages?: Record<Snowflake, APIMessage>;
|
||||
attachments?: Record<Snowflake, APIAttachment>;
|
||||
}
|
||||
|
||||
|
||||
21
deno/payloads/v9/_interactions/messageComponents.ts
generated
21
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,
|
||||
@@ -52,35 +52,34 @@ export interface APIMessageComponentBaseInteractionData<CType extends ComponentT
|
||||
* The type of the component
|
||||
*/
|
||||
component_type: CType;
|
||||
/**
|
||||
* The unique identifier for the component, as defined when the component was sent
|
||||
*/
|
||||
id: number;
|
||||
}
|
||||
|
||||
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'>>;
|
||||
}
|
||||
|
||||
89
deno/payloads/v9/_interactions/modalSubmit.ts
generated
89
deno/payloads/v9/_interactions/modalSubmit.ts
generated
@@ -1,27 +1,94 @@
|
||||
import type { APIActionRowComponent, APIModalActionRowComponent } 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<APIModalActionRowComponent>, 'components'> {
|
||||
components: ModalSubmitComponent[];
|
||||
export interface APIModalSubmitStringSelectComponent extends APIBaseModalSubmitComponent<ComponentType.StringSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitUserSelectComponent extends APIBaseModalSubmitComponent<ComponentType.UserSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitComponent<ComponentType.RoleSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitChannelSelectComponent extends APIBaseModalSubmitComponent<ComponentType.ChannelSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitComponent<ComponentType.FileUpload> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export 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;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-modal-submit-data-structure}
|
||||
*/
|
||||
export interface APIModalSubmission {
|
||||
/**
|
||||
* Data for users, members, channels, and roles in the modal's auto-populated select menus
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure}
|
||||
*/
|
||||
resolved?: APIInteractionDataResolved;
|
||||
/**
|
||||
* A developer-defined identifier for the component, max 100 characters
|
||||
*/
|
||||
@@ -29,21 +96,21 @@ export interface APIModalSubmission {
|
||||
/**
|
||||
* A list of child components
|
||||
*/
|
||||
components: ModalSubmitActionRowComponent[];
|
||||
components: APIModalSubmissionComponent[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIModalSubmitInteraction = APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission> &
|
||||
Required<Pick<APIBaseInteraction<InteractionType.ModalSubmit, APIModalSubmission>, 'data'>>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIModalSubmitDMInteraction = APIDMInteractionWrapper<APIModalSubmitInteraction>;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object}
|
||||
*/
|
||||
export type APIModalSubmitGuildInteraction = APIGuildInteractionWrapper<APIModalSubmitInteraction>;
|
||||
|
||||
48
deno/payloads/v9/_interactions/responses.ts
generated
48
deno/payloads/v9/_interactions/responses.ts
generated
@@ -1,10 +1,14 @@
|
||||
import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v9.ts';
|
||||
import type { APIActionRowComponent, APIModalActionRowComponent } from '../channel.ts';
|
||||
import type { MessageFlags } from '../mod.ts';
|
||||
import type {
|
||||
APIActionRowComponent,
|
||||
APIComponentInModalActionRow,
|
||||
APILabelComponent,
|
||||
APITextDisplayComponent,
|
||||
} from '../message.ts';
|
||||
import type { APIApplicationCommandOptionChoice } from './applicationCommands.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type}
|
||||
*/
|
||||
export enum InteractionType {
|
||||
Ping = 1,
|
||||
@@ -15,13 +19,14 @@ export enum InteractionType {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object}
|
||||
*/
|
||||
export type APIInteractionResponse =
|
||||
| APIApplicationCommandAutocompleteResponse
|
||||
| APIInteractionResponseChannelMessageWithSource
|
||||
| APIInteractionResponseDeferredChannelMessageWithSource
|
||||
| APIInteractionResponseDeferredMessageUpdate
|
||||
| APIInteractionResponseLaunchActivity
|
||||
| APIInteractionResponsePong
|
||||
| APIInteractionResponseUpdateMessage
|
||||
| APIModalInteractionResponse
|
||||
@@ -64,8 +69,12 @@ export interface APIInteractionResponseUpdateMessage {
|
||||
data?: APIInteractionResponseCallbackData;
|
||||
}
|
||||
|
||||
export interface APIInteractionResponseLaunchActivity {
|
||||
type: InteractionResponseType.LaunchActivity;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type}
|
||||
*/
|
||||
export enum InteractionResponseType {
|
||||
/**
|
||||
@@ -98,24 +107,37 @@ export enum InteractionResponseType {
|
||||
Modal,
|
||||
/**
|
||||
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
|
||||
*
|
||||
* @deprecated Send a button with Premium type instead.
|
||||
* {@link https://discord.com/developers/docs/change-log#premium-apps-new-premium-button-style-deep-linking-url-schemes | Learn more here}
|
||||
*/
|
||||
PremiumRequired,
|
||||
|
||||
/**
|
||||
* Launch the Activity associated with the app.
|
||||
*
|
||||
* @remarks
|
||||
* Only available for apps with Activities enabled
|
||||
*/
|
||||
LaunchActivity = 12,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure}
|
||||
*/
|
||||
export type APIInteractionResponseCallbackData = Omit<
|
||||
RESTPostAPIWebhookWithTokenJSONBody,
|
||||
'avatar_url' | 'username'
|
||||
> & { flags?: MessageFlags };
|
||||
export type APIInteractionResponseCallbackData = Omit<RESTPostAPIWebhookWithTokenJSONBody, 'avatar_url' | 'username'>;
|
||||
|
||||
export interface APICommandAutocompleteInteractionResponseCallbackData {
|
||||
choices?: APIApplicationCommandOptionChoice[];
|
||||
}
|
||||
|
||||
export type APIModalInteractionResponseCallbackComponent =
|
||||
| APIActionRowComponent<APIComponentInModalActionRow>
|
||||
| APILabelComponent
|
||||
| APITextDisplayComponent;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-modal}
|
||||
*/
|
||||
export interface APIModalInteractionResponseCallbackData {
|
||||
/**
|
||||
@@ -128,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<APIModalActionRowComponent>[];
|
||||
components: APIModalInteractionResponseCallbackComponent[];
|
||||
}
|
||||
|
||||
74
deno/payloads/v9/application.ts
generated
74
deno/payloads/v9/application.ts
generated
@@ -9,9 +9,10 @@ import type { ApplicationIntegrationType } from './interactions.ts';
|
||||
import type { OAuth2Scopes } from './oauth2.ts';
|
||||
import type { APITeam } from './teams.ts';
|
||||
import type { APIUser } from './user.ts';
|
||||
import type { ApplicationWebhookEventType } from './webhook.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#application-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object}
|
||||
*/
|
||||
export interface APIApplication {
|
||||
/**
|
||||
@@ -57,25 +58,26 @@ export interface APIApplication {
|
||||
/**
|
||||
* Partial user object containing info on the owner of the application
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
owner?: APIUser;
|
||||
/**
|
||||
* An empty string
|
||||
*
|
||||
* @deprecated This field will be removed in v11
|
||||
* @unstable This field is no longer documented by Discord and will be removed in v11
|
||||
*/
|
||||
summary: '';
|
||||
/**
|
||||
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
|
||||
*
|
||||
* See https://discord.com/developers/docs/game-sdk/applications#getticket
|
||||
* @see {@link https://discord.com/developers/docs/game-sdk/applications#getticket}
|
||||
*/
|
||||
verify_key: string;
|
||||
/**
|
||||
* The team this application belongs to
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/teams#data-models-team-object
|
||||
* @see {@link https://discord.com/developers/docs/topics/teams#data-models-team-object}
|
||||
*/
|
||||
team: APITeam | null;
|
||||
/**
|
||||
@@ -101,13 +103,21 @@ export interface APIApplication {
|
||||
/**
|
||||
* The application's public flags
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/application#application-object-application-flags
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags}
|
||||
*/
|
||||
flags: ApplicationFlags;
|
||||
/**
|
||||
* Approximate count of guilds the application has been added to
|
||||
*/
|
||||
approximate_guild_count?: number;
|
||||
/**
|
||||
* Approximate count of users that have installed the app (authorized with `application.commands` as a scope)
|
||||
*/
|
||||
approximate_user_install_count?: number;
|
||||
/**
|
||||
* Approximate count of users that have OAuth2 authorizations for the app
|
||||
*/
|
||||
approximate_user_authorization_count?: number;
|
||||
/**
|
||||
* Array of redirect URIs for the application
|
||||
*/
|
||||
@@ -115,12 +125,12 @@ export interface APIApplication {
|
||||
/**
|
||||
* The interactions endpoint URL for the application
|
||||
*/
|
||||
interactions_endpoint_url?: string;
|
||||
interactions_endpoint_url?: string | null;
|
||||
/**
|
||||
* The application's role connection verification entry point,
|
||||
* which when configured will render the app as a verification method in the guild role verification configuration
|
||||
*/
|
||||
role_connections_verification_url?: string;
|
||||
role_connections_verification_url?: string | null;
|
||||
/**
|
||||
* Up to 5 tags of max 20 characters each describing the content and functionality of the application
|
||||
*/
|
||||
@@ -131,14 +141,24 @@ export interface APIApplication {
|
||||
install_params?: APIApplicationInstallParams;
|
||||
/**
|
||||
* Default scopes and permissions for each supported installation context. Value for each key is an integration type configuration object
|
||||
*
|
||||
* @unstable
|
||||
*/
|
||||
integration_types_config?: APIApplicationIntegrationTypesConfigMap;
|
||||
/**
|
||||
* The application's default custom authorization link, if enabled
|
||||
*/
|
||||
custom_install_url?: string;
|
||||
/**
|
||||
* Event webhook URL for the app to receive webhook events
|
||||
*/
|
||||
event_webhooks_url?: string | null;
|
||||
/**
|
||||
* If webhook events are enabled for the app
|
||||
*/
|
||||
event_webhooks_status: ApplicationWebhookEventStatus;
|
||||
/**
|
||||
* List of webhook event types the app subscribes to
|
||||
*/
|
||||
event_webhooks_types?: ApplicationWebhookEventType[];
|
||||
}
|
||||
|
||||
export interface APIApplicationInstallParams {
|
||||
@@ -155,7 +175,7 @@ export type APIApplicationIntegrationTypesConfigMap = {
|
||||
};
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application#application-object-application-flags
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags}
|
||||
*/
|
||||
export enum ApplicationFlags {
|
||||
/**
|
||||
@@ -192,12 +212,14 @@ export enum ApplicationFlags {
|
||||
GatewayPresenceLimited = 1 << 13,
|
||||
/**
|
||||
* Intent required for bots in 100 or more servers to receive member-related events like `guild_member_add`.
|
||||
* See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
|
||||
*
|
||||
* @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`}
|
||||
*/
|
||||
GatewayGuildMembers = 1 << 14,
|
||||
/**
|
||||
* Intent required for bots in under 100 servers to receive member-related events like `guild_member_add`, found in Bot Settings.
|
||||
* See list of member-related events [under `GUILD_MEMBERS`](https://discord.com/developers/docs/topics/gateway#list-of-intents)
|
||||
*
|
||||
* @see List of member-related events {@link https://discord.com/developers/docs/topics/gateway#list-of-intents | under `GUILD_MEMBERS`}
|
||||
*/
|
||||
GatewayGuildMembersLimited = 1 << 15,
|
||||
/**
|
||||
@@ -209,11 +231,11 @@ export enum ApplicationFlags {
|
||||
*/
|
||||
Embedded = 1 << 17,
|
||||
/**
|
||||
* Intent required for bots in 100 or more servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055)
|
||||
* Intent required for bots in 100 or more servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content}
|
||||
*/
|
||||
GatewayMessageContent = 1 << 18,
|
||||
/**
|
||||
* Intent required for bots in under 100 servers to receive [message content](https://support-dev.discord.com/hc/en-us/articles/4404772028055),
|
||||
* Intent required for bots in under 100 servers to receive {@link https://support-dev.discord.com/hc/articles/6207308062871 | message content},
|
||||
* found in Bot Settings
|
||||
*/
|
||||
GatewayMessageContentLimited = 1 << 19,
|
||||
@@ -222,13 +244,13 @@ export enum ApplicationFlags {
|
||||
*/
|
||||
EmbeddedFirstParty = 1 << 20,
|
||||
/**
|
||||
* Indicates if an app has registered global [application commands](https://discord.com/developers/docs/interactions/application-commands)
|
||||
* Indicates if an app has registered global {@link https://discord.com/developers/docs/interactions/application-commands | application commands}
|
||||
*/
|
||||
ApplicationCommandBadge = 1 << 23,
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-structure}
|
||||
*/
|
||||
export interface APIApplicationRoleConnectionMetadata {
|
||||
/**
|
||||
@@ -258,7 +280,7 @@ export interface APIApplicationRoleConnectionMetadata {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type
|
||||
* @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type}
|
||||
*/
|
||||
export enum ApplicationRoleConnectionMetadataType {
|
||||
/**
|
||||
@@ -294,3 +316,21 @@ export enum ApplicationRoleConnectionMetadataType {
|
||||
*/
|
||||
BooleanNotEqual,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status}
|
||||
*/
|
||||
export enum ApplicationWebhookEventStatus {
|
||||
/**
|
||||
* Webhook events are disabled by developer
|
||||
*/
|
||||
Disabled = 1,
|
||||
/**
|
||||
* Webhook events are enabled by developer
|
||||
*/
|
||||
Enabled,
|
||||
/**
|
||||
* Webhook events are disabled by Discord, usually due to inactivity
|
||||
*/
|
||||
DisabledByDiscord,
|
||||
}
|
||||
|
||||
285
deno/payloads/v9/auditLog.ts
generated
285
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,
|
||||
@@ -23,6 +29,7 @@ import type {
|
||||
} from './guild.ts';
|
||||
import type {
|
||||
APIGuildScheduledEvent,
|
||||
APIGuildScheduledEventRecurrenceRule,
|
||||
GuildScheduledEventEntityType,
|
||||
GuildScheduledEventStatus,
|
||||
} from './guildScheduledEvent.ts';
|
||||
@@ -34,43 +41,43 @@ import type { APIUser } from './user.ts';
|
||||
import type { APIWebhook } from './webhook.ts';
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure}
|
||||
*/
|
||||
export interface APIAuditLog {
|
||||
/**
|
||||
* List of application commands found in the audit log
|
||||
*
|
||||
* See https://discord.com/developers/docs/interactions/application-commands#application-command-object
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object}
|
||||
*/
|
||||
application_commands: APIApplicationCommand[];
|
||||
/**
|
||||
* Webhooks found in the audit log
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/webhook#webhook-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/webhook#webhook-object}
|
||||
*/
|
||||
webhooks: APIWebhook[];
|
||||
/**
|
||||
* Users found in the audit log
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/user#user-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/user#user-object}
|
||||
*/
|
||||
users: APIUser[];
|
||||
/**
|
||||
* Audit log entries
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object}
|
||||
*/
|
||||
audit_log_entries: APIAuditLogEntry[];
|
||||
/**
|
||||
* List of auto moderation rules referenced in the audit log
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object}
|
||||
*/
|
||||
auto_moderation_rules: APIAutoModerationRule[];
|
||||
/**
|
||||
* Partial integration objects
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild#integration-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#integration-object}
|
||||
*/
|
||||
integrations: APIGuildIntegration[];
|
||||
/**
|
||||
@@ -78,19 +85,19 @@ export interface APIAuditLog {
|
||||
*
|
||||
* Threads referenced in THREAD_CREATE and THREAD_UPDATE events are included in the threads map, since archived threads might not be kept in memory by clients.
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object}
|
||||
*/
|
||||
threads: APIChannel[];
|
||||
/**
|
||||
* The guild scheduled events in the audit log
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object}
|
||||
*/
|
||||
guild_scheduled_events: APIGuildScheduledEvent[];
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-entry-structure}
|
||||
*/
|
||||
export interface APIAuditLogEntry {
|
||||
/**
|
||||
@@ -100,7 +107,7 @@ export interface APIAuditLogEntry {
|
||||
/**
|
||||
* Changes made to the `target_id`
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/audit-log#audit-log-change-object
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-change-object}
|
||||
*/
|
||||
changes?: APIAuditLogChange[];
|
||||
/**
|
||||
@@ -116,13 +123,13 @@ export interface APIAuditLogEntry {
|
||||
/**
|
||||
* Type of action that occurred
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events}
|
||||
*/
|
||||
action_type: AuditLogEvent;
|
||||
/**
|
||||
* Additional info for certain action types
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info}
|
||||
*/
|
||||
options?: APIAuditLogOptions;
|
||||
/**
|
||||
@@ -132,7 +139,7 @@ export interface APIAuditLogEntry {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events}
|
||||
*/
|
||||
export enum AuditLogEvent {
|
||||
GuildUpdate = 1,
|
||||
@@ -196,12 +203,17 @@ export enum AuditLogEvent {
|
||||
|
||||
ApplicationCommandPermissionUpdate = 121,
|
||||
|
||||
SoundboardSoundCreate = 130,
|
||||
SoundboardSoundUpdate,
|
||||
SoundboardSoundDelete,
|
||||
|
||||
AutoModerationRuleCreate = 140,
|
||||
AutoModerationRuleUpdate,
|
||||
AutoModerationRuleDelete,
|
||||
AutoModerationBlockMessage,
|
||||
AutoModerationFlagToChannel,
|
||||
AutoModerationUserCommunicationDisabled,
|
||||
AutoModerationQuarantineUser,
|
||||
|
||||
CreatorMonetizationRequestCreated = 150,
|
||||
CreatorMonetizationTermsAccepted,
|
||||
@@ -217,7 +229,7 @@ export enum AuditLogEvent {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info}
|
||||
*/
|
||||
export interface APIAuditLogOptions {
|
||||
/**
|
||||
@@ -227,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;
|
||||
/**
|
||||
@@ -236,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;
|
||||
/**
|
||||
@@ -267,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;
|
||||
|
||||
@@ -320,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;
|
||||
|
||||
@@ -342,7 +357,7 @@ export enum AuditLogOptionsType {
|
||||
export type AuditLogRuleTriggerType = `${AutoModerationRuleTriggerType}`;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure
|
||||
* @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure}
|
||||
*/
|
||||
export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKey$Add
|
||||
@@ -372,6 +387,8 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyDeny
|
||||
| APIAuditLogChangeKeyDescription
|
||||
| APIAuditLogChangeKeyDiscoverySplashHash
|
||||
| APIAuditLogChangeKeyEmojiId
|
||||
| APIAuditLogChangeKeyEmojiName
|
||||
| APIAuditLogChangeKeyEnabled
|
||||
| APIAuditLogChangeKeyEnableEmoticons
|
||||
| APIAuditLogChangeKeyEntityType
|
||||
@@ -404,12 +421,17 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyPermissions
|
||||
| APIAuditLogChangeKeyPosition
|
||||
| APIAuditLogChangeKeyPreferredLocale
|
||||
| APIAuditLogChangeKeyPremiumProgressBarEnabled
|
||||
| APIAuditLogChangeKeyPrivacyLevel
|
||||
| APIAuditLogChangeKeyPruneDeleteDays
|
||||
| APIAuditLogChangeKeyPublicUpdatesChannelId
|
||||
| APIAuditLogChangeKeyRateLimitPerUser
|
||||
| APIAuditLogChangeKeyRecurrenceRule
|
||||
| APIAuditLogChangeKeyRegion
|
||||
| APIAuditLogChangeKeyRTCRegion
|
||||
| APIAuditLogChangeKeyRulesChannelId
|
||||
| APIAuditLogChangeKeySafetyAlertsChannelId
|
||||
| APIAuditLogChangeKeySoundId
|
||||
| APIAuditLogChangeKeySplashHash
|
||||
| APIAuditLogChangeKeyStatus
|
||||
| APIAuditLogChangeKeySystemChannelFlags
|
||||
@@ -420,102 +442,115 @@ export type APIAuditLogChange =
|
||||
| APIAuditLogChangeKeyTriggerMetadata
|
||||
| APIAuditLogChangeKeyTriggerType
|
||||
| APIAuditLogChangeKeyType
|
||||
| APIAuditLogChangeKeyUserId
|
||||
| APIAuditLogChangeKeyUserLimit
|
||||
| APIAuditLogChangeKeyUses
|
||||
| APIAuditLogChangeKeyVanityURLCode
|
||||
| APIAuditLogChangeKeyVerificationLevel
|
||||
| APIAuditLogChangeKeyVideoQualityMode
|
||||
| APIAuditLogChangeKeyVolume
|
||||
| APIAuditLogChangeKeyWidgetChannelId
|
||||
| APIAuditLogChangeKeyWidgetEnabled;
|
||||
|
||||
/**
|
||||
* Returned when an entity's name is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyName = AuditLogChangeData<'name', string>;
|
||||
export type APIAuditLogChangeKeyName = APIAuditLogChangeData<'name', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's or sticker's or guild scheduled event's description is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDescription = AuditLogChangeData<'description', string>;
|
||||
export type APIAuditLogChangeKeyDescription = APIAuditLogChangeData<'description', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's icon is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyIconHash = AuditLogChangeData<'icon_hash', string>;
|
||||
export type APIAuditLogChangeKeyIconHash = APIAuditLogChangeData<'icon_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's scheduled event's cover image is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyImageHash = AuditLogChangeData<'image_hash', string>;
|
||||
export type APIAuditLogChangeKeyImageHash = APIAuditLogChangeData<'image_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's splash is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeySplashHash = AuditLogChangeData<'splash_hash', string>;
|
||||
export type APIAuditLogChangeKeySplashHash = APIAuditLogChangeData<'splash_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's discovery splash is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDiscoverySplashHash = AuditLogChangeData<'discovery_splash_hash', string>;
|
||||
export type APIAuditLogChangeKeyDiscoverySplashHash = APIAuditLogChangeData<'discovery_splash_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's banner hash is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyBannerHash = AuditLogChangeData<'banner_hash', string>;
|
||||
export type APIAuditLogChangeKeyBannerHash = APIAuditLogChangeData<'banner_hash', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's owner_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyOwnerId = AuditLogChangeData<'owner_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyOwnerId = APIAuditLogChangeData<'owner_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's region is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRegion = AuditLogChangeData<'region', string>;
|
||||
export type APIAuditLogChangeKeyRegion = APIAuditLogChangeData<'region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's rtc_region is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRTCRegion = APIAuditLogChangeData<'rtc_region', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's preferred_locale is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPreferredLocale = AuditLogChangeData<'preferred_locale', string>;
|
||||
export type APIAuditLogChangeKeyPreferredLocale = APIAuditLogChangeData<'preferred_locale', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's afk_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAFKChannelId = AuditLogChangeData<'afk_channel_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyAFKChannelId = APIAuditLogChangeData<'afk_channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's afk_timeout is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAFKTimeout = AuditLogChangeData<'afk_timeout', number>;
|
||||
export type APIAuditLogChangeKeyAFKTimeout = APIAuditLogChangeData<'afk_timeout', number>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's rules_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_channel_id', string>;
|
||||
export type APIAuditLogChangeKeyRulesChannelId = APIAuditLogChangeData<'rules_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's public_updates_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;
|
||||
export type APIAuditLogChangeKeyPublicUpdatesChannelId = APIAuditLogChangeData<'public_updates_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's safety_alerts_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeySafetyAlertsChannelId = AuditLogChangeData<'safety_alerts_channel_id', string>;
|
||||
export type APIAuditLogChangeKeySafetyAlertsChannelId = APIAuditLogChangeData<'safety_alerts_channel_id', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's mfa_level is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMFALevel = AuditLogChangeData<'mfa_level', GuildMFALevel>;
|
||||
export type APIAuditLogChangeKeyMFALevel = APIAuditLogChangeData<'mfa_level', GuildMFALevel>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's verification_level is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVerificationLevel = AuditLogChangeData<'verification_level', GuildVerificationLevel>;
|
||||
export type APIAuditLogChangeKeyVerificationLevel = APIAuditLogChangeData<'verification_level', GuildVerificationLevel>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's video_quality_mode is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVideoQualityMode = APIAuditLogChangeData<'video_quality_mode', VideoQualityMode>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's explicit_content_filter is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<
|
||||
export type APIAuditLogChangeKeyExplicitContentFilter = APIAuditLogChangeData<
|
||||
'explicit_content_filter',
|
||||
GuildExplicitContentFilter
|
||||
>;
|
||||
@@ -523,7 +558,7 @@ export type APIAuditLogChangeKeyExplicitContentFilter = AuditLogChangeData<
|
||||
/**
|
||||
* Returned when a guild's default_message_notifications is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData<
|
||||
export type APIAuditLogChangeKeyDefaultMessageNotifications = APIAuditLogChangeData<
|
||||
'default_message_notifications',
|
||||
GuildDefaultMessageNotifications
|
||||
>;
|
||||
@@ -531,37 +566,45 @@ export type APIAuditLogChangeKeyDefaultMessageNotifications = AuditLogChangeData
|
||||
/**
|
||||
* Returned when a guild's vanity_url_code is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVanityURLCode = AuditLogChangeData<'vanity_url_code', string>;
|
||||
export type APIAuditLogChangeKeyVanityURLCode = APIAuditLogChangeData<'vanity_url_code', string>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's boost progress bar is enabled
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPremiumProgressBarEnabled = APIAuditLogChangeData<
|
||||
'premium_progress_bar_enabled',
|
||||
boolean
|
||||
>;
|
||||
|
||||
/**
|
||||
* Returned when new role(s) are added
|
||||
*/
|
||||
export type APIAuditLogChangeKey$Add = AuditLogChangeData<'$add', Pick<APIRole, 'id' | 'name'>[]>;
|
||||
export type APIAuditLogChangeKey$Add = APIAuditLogChangeData<'$add', Pick<APIRole, 'id' | 'name'>[]>;
|
||||
|
||||
/**
|
||||
* Returned when role(s) are removed
|
||||
*/
|
||||
export type APIAuditLogChangeKey$Remove = AuditLogChangeData<'$remove', Pick<APIRole, 'id' | 'name'>[]>;
|
||||
export type APIAuditLogChangeKey$Remove = APIAuditLogChangeData<'$remove', Pick<APIRole, 'id' | 'name'>[]>;
|
||||
|
||||
/**
|
||||
* Returned when there is a change in number of days after which inactive and role-unassigned members are kicked
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPruneDeleteDays = AuditLogChangeData<'prune_delete_days', number>;
|
||||
export type APIAuditLogChangeKeyPruneDeleteDays = APIAuditLogChangeData<'prune_delete_days', number>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's widget is enabled
|
||||
*/
|
||||
export type APIAuditLogChangeKeyWidgetEnabled = AuditLogChangeData<'widget_enabled', boolean>;
|
||||
export type APIAuditLogChangeKeyWidgetEnabled = APIAuditLogChangeData<'widget_enabled', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's widget_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyWidgetChannelId = AuditLogChangeData<'widget_channel_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyWidgetChannelId = APIAuditLogChangeData<'widget_channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a guild's system_channel_flags is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeySystemChannelFlags = AuditLogChangeData<
|
||||
export type APIAuditLogChangeKeySystemChannelFlags = APIAuditLogChangeData<
|
||||
'system_channel_flags',
|
||||
GuildSystemChannelFlags
|
||||
>;
|
||||
@@ -569,214 +612,222 @@ export type APIAuditLogChangeKeySystemChannelFlags = AuditLogChangeData<
|
||||
/**
|
||||
* Returned when a guild's system_channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeySystemChannelId = AuditLogChangeData<'system_channel_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeySystemChannelId = APIAuditLogChangeData<'system_channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's position is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPosition = AuditLogChangeData<'position', number>;
|
||||
export type APIAuditLogChangeKeyPosition = APIAuditLogChangeData<'position', number>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's topic is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTopic = AuditLogChangeData<'topic', string>;
|
||||
export type APIAuditLogChangeKeyTopic = APIAuditLogChangeData<'topic', string>;
|
||||
|
||||
/**
|
||||
* Returned when a voice channel's bitrate is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyBitrate = AuditLogChangeData<'bitrate', number>;
|
||||
export type APIAuditLogChangeKeyBitrate = APIAuditLogChangeData<'bitrate', number>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's permission overwrites is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPermissionOverwrites = AuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
|
||||
export type APIAuditLogChangeKeyPermissionOverwrites = APIAuditLogChangeData<'permission_overwrites', APIOverwrite[]>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's NSFW restriction is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyNSFW = AuditLogChangeData<'nsfw', boolean>;
|
||||
export type APIAuditLogChangeKeyNSFW = APIAuditLogChangeData<'nsfw', boolean>;
|
||||
|
||||
/**
|
||||
* The application ID of the added or removed Webhook or Bot
|
||||
*/
|
||||
export type APIAuditLogChangeKeyApplicationId = AuditLogChangeData<'application_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyApplicationId = APIAuditLogChangeData<'application_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's amount of seconds a user has to wait before sending another message
|
||||
* is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRateLimitPerUser = AuditLogChangeData<'rate_limit_per_user', number>;
|
||||
export type APIAuditLogChangeKeyRateLimitPerUser = APIAuditLogChangeData<'rate_limit_per_user', number>;
|
||||
|
||||
/**
|
||||
* Returned when a guild scheduled event's recurrence_rule is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyRecurrenceRule = APIAuditLogChangeData<
|
||||
'recurrence_rule',
|
||||
APIGuildScheduledEventRecurrenceRule
|
||||
>;
|
||||
|
||||
/**
|
||||
* Returned when a permission bitfield is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPermissions = AuditLogChangeData<'permissions', string>;
|
||||
export type APIAuditLogChangeKeyPermissions = APIAuditLogChangeData<'permissions', string>;
|
||||
|
||||
/**
|
||||
* Returned when a role's color is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyColor = AuditLogChangeData<'color', number>;
|
||||
export type APIAuditLogChangeKeyColor = APIAuditLogChangeData<'color', number>;
|
||||
|
||||
/**
|
||||
* Represents a change where the key is a snowflake.
|
||||
* Currently, the only known instance of this is returned when permissions for a command were updated (<insert name of object here>)
|
||||
* Currently, the only known instance of this is returned when permissions for a command were updated
|
||||
*/
|
||||
export type APIAuditLogChangeKeySnowflake = AuditLogChangeData<Snowflake, unknown>;
|
||||
export type APIAuditLogChangeKeySnowflake = APIAuditLogChangeData<Snowflake, unknown>;
|
||||
|
||||
/**
|
||||
* Returned when a role's hoist status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyHoist = AuditLogChangeData<'hoist', boolean>;
|
||||
export type APIAuditLogChangeKeyHoist = APIAuditLogChangeData<'hoist', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a role's mentionable status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMentionable = AuditLogChangeData<'mentionable', boolean>;
|
||||
export type APIAuditLogChangeKeyMentionable = APIAuditLogChangeData<'mentionable', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when an overwrite's allowed permissions bitfield is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAllow = AuditLogChangeData<'allow', string>;
|
||||
export type APIAuditLogChangeKeyAllow = APIAuditLogChangeData<'allow', string>;
|
||||
|
||||
/**
|
||||
* Returned when an overwrite's denied permissions bitfield is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDeny = AuditLogChangeData<'deny', string>;
|
||||
export type APIAuditLogChangeKeyDeny = APIAuditLogChangeData<'deny', string>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's code is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyCode = AuditLogChangeData<'code', string>;
|
||||
export type APIAuditLogChangeKeyCode = APIAuditLogChangeData<'code', string>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's or guild scheduled event's channel_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyChannelId = AuditLogChangeData<'channel_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyChannelId = APIAuditLogChangeData<'channel_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's inviter_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyInviterId = AuditLogChangeData<'inviter_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyInviterId = APIAuditLogChangeData<'inviter_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's max_uses is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMaxUses = AuditLogChangeData<'max_uses', number>;
|
||||
export type APIAuditLogChangeKeyMaxUses = APIAuditLogChangeData<'max_uses', number>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's uses is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyUses = AuditLogChangeData<'uses', number>;
|
||||
export type APIAuditLogChangeKeyUses = APIAuditLogChangeData<'uses', number>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's max_age is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMaxAge = AuditLogChangeData<'max_age', number>;
|
||||
export type APIAuditLogChangeKeyMaxAge = APIAuditLogChangeData<'max_age', number>;
|
||||
|
||||
/**
|
||||
* Returned when an invite's temporary status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTemporary = AuditLogChangeData<'temporary', boolean>;
|
||||
export type APIAuditLogChangeKeyTemporary = APIAuditLogChangeData<'temporary', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a user's deaf status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDeaf = AuditLogChangeData<'deaf', boolean>;
|
||||
export type APIAuditLogChangeKeyDeaf = APIAuditLogChangeData<'deaf', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a user's mute status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyMute = AuditLogChangeData<'mute', boolean>;
|
||||
export type APIAuditLogChangeKeyMute = APIAuditLogChangeData<'mute', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a user's nick is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyNick = AuditLogChangeData<'nick', string>;
|
||||
export type APIAuditLogChangeKeyNick = APIAuditLogChangeData<'nick', string>;
|
||||
|
||||
/**
|
||||
* Returned when a user's avatar_hash is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAvatarHash = AuditLogChangeData<'avatar_hash', string>;
|
||||
export type APIAuditLogChangeKeyAvatarHash = APIAuditLogChangeData<'avatar_hash', string>;
|
||||
|
||||
/**
|
||||
* The ID of the changed entity - sometimes used in conjunction with other keys
|
||||
*/
|
||||
export type APIAuditLogChangeKeyId = AuditLogChangeData<'id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyId = APIAuditLogChangeData<'id', Snowflake>;
|
||||
|
||||
/**
|
||||
* The type of entity created
|
||||
*/
|
||||
export type APIAuditLogChangeKeyType = AuditLogChangeData<'type', number | string>;
|
||||
export type APIAuditLogChangeKeyType = APIAuditLogChangeData<'type', number | string>;
|
||||
|
||||
/**
|
||||
* Returned when an integration's enable_emoticons is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEnableEmoticons = AuditLogChangeData<'enable_emoticons', boolean>;
|
||||
export type APIAuditLogChangeKeyEnableEmoticons = APIAuditLogChangeData<'enable_emoticons', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when an integration's expire_behavior is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExpireBehavior = AuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
|
||||
export type APIAuditLogChangeKeyExpireBehavior = APIAuditLogChangeData<'expire_behavior', IntegrationExpireBehavior>;
|
||||
|
||||
/**
|
||||
* Returned when an integration's expire_grace_period is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExpireGracePeriod = AuditLogChangeData<'expire_grace_period', number>;
|
||||
export type APIAuditLogChangeKeyExpireGracePeriod = APIAuditLogChangeData<'expire_grace_period', number>;
|
||||
|
||||
/**
|
||||
* Returned when a voice channel's user_limit is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyUserLimit = AuditLogChangeData<'user_limit', number>;
|
||||
export type APIAuditLogChangeKeyUserLimit = APIAuditLogChangeData<'user_limit', number>;
|
||||
|
||||
/**
|
||||
* Returned when privacy level of a stage instance or guild scheduled event is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyPrivacyLevel = AuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
|
||||
export type APIAuditLogChangeKeyPrivacyLevel = APIAuditLogChangeData<'privacy_level', StageInstancePrivacyLevel>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's related emoji is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTags = AuditLogChangeData<'tags', string>;
|
||||
export type APIAuditLogChangeKeyTags = APIAuditLogChangeData<'tags', string>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's format_type is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyFormatType = AuditLogChangeData<'format_type', StickerFormatType>;
|
||||
export type APIAuditLogChangeKeyFormatType = APIAuditLogChangeData<'format_type', StickerFormatType>;
|
||||
|
||||
/**
|
||||
* Empty string
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAsset = AuditLogChangeData<'asset', ''>;
|
||||
export type APIAuditLogChangeKeyAsset = APIAuditLogChangeData<'asset', ''>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's availability is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', boolean>;
|
||||
export type APIAuditLogChangeKeyAvailable = APIAuditLogChangeData<'available', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a sticker's guild_id is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
|
||||
export type APIAuditLogChangeKeyGuildId = APIAuditLogChangeData<'guild_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a thread's archive status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
|
||||
export type APIAuditLogChangeKeyArchived = APIAuditLogChangeData<'archived', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a thread's lock status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
|
||||
export type APIAuditLogChangeKeyLocked = APIAuditLogChangeData<'locked', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when a thread's auto archive duration is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
|
||||
export type APIAuditLogChangeKeyAutoArchiveDuration = APIAuditLogChangeData<'auto_archive_duration', number>;
|
||||
|
||||
/**
|
||||
* Returned when a channel's default auto archive duration for newly created threads is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<
|
||||
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = APIAuditLogChangeData<
|
||||
'default_auto_archive_duration',
|
||||
number
|
||||
>;
|
||||
@@ -784,37 +835,40 @@ export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<
|
||||
/**
|
||||
* Returned when entity type of a guild scheduled event is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEntityType = AuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
|
||||
export type APIAuditLogChangeKeyEntityType = APIAuditLogChangeData<'entity_type', GuildScheduledEventEntityType>;
|
||||
|
||||
/**
|
||||
* Returned when status of a guild scheduled event is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyStatus = AuditLogChangeData<'status', GuildScheduledEventStatus>;
|
||||
export type APIAuditLogChangeKeyStatus = APIAuditLogChangeData<'status', GuildScheduledEventStatus>;
|
||||
|
||||
/**
|
||||
* Returned when location of a guild scheduled event is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyLocation = AuditLogChangeData<'location', string>;
|
||||
export type APIAuditLogChangeKeyLocation = APIAuditLogChangeData<'location', string>;
|
||||
|
||||
/**
|
||||
* Returned when a user's timeout is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyCommunicationDisabledUntil = AuditLogChangeData<'communication_disabled_until', string>;
|
||||
export type APIAuditLogChangeKeyCommunicationDisabledUntil = APIAuditLogChangeData<
|
||||
'communication_disabled_until',
|
||||
string
|
||||
>;
|
||||
|
||||
/**
|
||||
* Returned when an auto moderation rule's trigger type is changed (only in rule creation or deletion)
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTriggerType = AuditLogChangeData<'trigger_type', AutoModerationRuleTriggerType>;
|
||||
export type APIAuditLogChangeKeyTriggerType = APIAuditLogChangeData<'trigger_type', AutoModerationRuleTriggerType>;
|
||||
|
||||
/**
|
||||
* Returned when an auto moderation rule's event type is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEventType = AuditLogChangeData<'event_type', AutoModerationRuleEventType>;
|
||||
export type APIAuditLogChangeKeyEventType = APIAuditLogChangeData<'event_type', AutoModerationRuleEventType>;
|
||||
|
||||
/**
|
||||
* Returned when an auto moderation rule's trigger metadata is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyTriggerMetadata = AuditLogChangeData<
|
||||
export type APIAuditLogChangeKeyTriggerMetadata = APIAuditLogChangeData<
|
||||
'trigger_metadata',
|
||||
APIAutoModerationRuleTriggerMetadata
|
||||
>;
|
||||
@@ -822,32 +876,32 @@ export type APIAuditLogChangeKeyTriggerMetadata = AuditLogChangeData<
|
||||
/**
|
||||
* Returned when an auto moderation rule's actions is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyActions = AuditLogChangeData<'actions', APIAutoModerationAction[]>;
|
||||
export type APIAuditLogChangeKeyActions = APIAuditLogChangeData<'actions', APIAutoModerationAction[]>;
|
||||
|
||||
/**
|
||||
* Returned when an auto moderation rule's enabled status is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEnabled = AuditLogChangeData<'enabled', boolean>;
|
||||
export type APIAuditLogChangeKeyEnabled = APIAuditLogChangeData<'enabled', boolean>;
|
||||
|
||||
/**
|
||||
* Returned when an auto moderation rule's exempt roles is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExemptRoles = AuditLogChangeData<'exempt_roles', Snowflake[]>;
|
||||
export type APIAuditLogChangeKeyExemptRoles = APIAuditLogChangeData<'exempt_roles', Snowflake[]>;
|
||||
|
||||
/**
|
||||
* Returned when an auto moderation rule's exempt channels is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyExemptChannels = AuditLogChangeData<'exempt_channels', Snowflake[]>;
|
||||
export type APIAuditLogChangeKeyExemptChannels = APIAuditLogChangeData<'exempt_channels', Snowflake[]>;
|
||||
|
||||
/**
|
||||
* Returned when a guild forum's available tags gets changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyAvailableTags = AuditLogChangeData<'available_tags', APIGuildForumTag[]>;
|
||||
export type APIAuditLogChangeKeyAvailableTags = APIAuditLogChangeData<'available_tags', APIGuildForumTag[]>;
|
||||
|
||||
/**
|
||||
* Returned when a guild forum's default reaction emoji gets changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<
|
||||
export type APIAuditLogChangeKeyDefaultReactionEmoji = APIAuditLogChangeData<
|
||||
'default_reaction_emoji',
|
||||
APIGuildForumDefaultReactionEmoji
|
||||
>;
|
||||
@@ -855,18 +909,43 @@ export type APIAuditLogChangeKeyDefaultReactionEmoji = AuditLogChangeData<
|
||||
/**
|
||||
* Returned when a channel flag gets changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyFlags = AuditLogChangeData<'flags', number>;
|
||||
export type APIAuditLogChangeKeyFlags = APIAuditLogChangeData<'flags', number>;
|
||||
|
||||
/**
|
||||
* Returned when a thread's amount of seconds a user has to wait before creating another thread
|
||||
* gets changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = AuditLogChangeData<
|
||||
export type APIAuditLogChangeKeyDefaultThreadRateLimitPerUser = APIAuditLogChangeData<
|
||||
'default_thread_rate_limit_per_user',
|
||||
number
|
||||
>;
|
||||
|
||||
interface AuditLogChangeData<K extends string, D> {
|
||||
/**
|
||||
* Returned when a soundboard is create or deleted
|
||||
*/
|
||||
export type APIAuditLogChangeKeySoundId = APIAuditLogChangeData<'sound_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a soundboard's volume is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyVolume = APIAuditLogChangeData<'volume', number>;
|
||||
|
||||
/**
|
||||
* Returned when a soundboard's custom emoji is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEmojiId = APIAuditLogChangeData<'emoji_id', Snowflake>;
|
||||
|
||||
/**
|
||||
* Returned when a soundboard's unicode emoji is changed
|
||||
*/
|
||||
export type APIAuditLogChangeKeyEmojiName = APIAuditLogChangeData<'emoji_name', string>;
|
||||
|
||||
/**
|
||||
* Returned when a sounboard is created
|
||||
*/
|
||||
export type APIAuditLogChangeKeyUserId = APIAuditLogChangeData<'user_id', Snowflake>;
|
||||
|
||||
export interface APIAuditLogChangeData<K extends string, D> {
|
||||
key: K;
|
||||
/**
|
||||
* The new value
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user