mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-21 19:00:32 +00:00
Compare commits
97 Commits
0.38.35
...
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 |
2
.github/workflows/cicd.yml
vendored
2
.github/workflows/cicd.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Add problem matcher
|
||||
run: echo "::add-matcher::.github/problemMatchers/eslint.json" && echo "::add-matcher::.github/problemMatchers/tsc.json"
|
||||
|
||||
8
.github/workflows/documentation.yml
vendored
8
.github/workflows/documentation.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout discord-api-types
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ inputs.ref || '' }}
|
||||
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
# pnpm --filter="*api-*" --filter="scripts" --filter="actions" run build
|
||||
|
||||
- name: Checkout discord.js
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
repository: discordjs/discord.js
|
||||
path: djs
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
with:
|
||||
swap-size-gb: 10
|
||||
|
||||
- uses: pnpm/action-setup@v4.2.0
|
||||
- uses: pnpm/action-setup@v4.3.0
|
||||
name: Install pnpm
|
||||
with:
|
||||
run_install: false
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
run: |
|
||||
echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache@v4
|
||||
- uses: actions/cache@v5
|
||||
name: Setup pnpm cache
|
||||
with:
|
||||
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
|
||||
|
||||
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@v5
|
||||
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 }}
|
||||
|
||||
6
.github/workflows/release-flows.yml
vendored
6
.github/workflows/release-flows.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -116,7 +116,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
4
.github/workflows/validate-pull-request.yml
vendored
4
.github/workflows/validate-pull-request.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v6
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
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/v8.ts|^v6.ts$|^v8.ts$"
|
||||
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."
|
||||
|
||||
@@ -1 +1 @@
|
||||
yarn pretty-quick --staged && yarn lint-staged && yarn build:deno && git add deno
|
||||
yarn pretty-quick --staged && yarn lint-staged && yarn clean:node && yarn build:deno && git add deno
|
||||
|
||||
57
CHANGELOG.md
57
CHANGELOG.md
@@ -1,3 +1,60 @@
|
||||
## [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)
|
||||
|
||||
|
||||
|
||||
57
deno/CHANGELOG.md
generated
57
deno/CHANGELOG.md
generated
@@ -1,3 +1,60 @@
|
||||
## [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)
|
||||
|
||||
|
||||
|
||||
2
deno/gateway/common.ts
generated
2
deno/gateway/common.ts
generated
@@ -4,5 +4,5 @@
|
||||
export interface GatewayURLQuery {
|
||||
v: string;
|
||||
encoding: 'etf' | 'json';
|
||||
compress?: 'zlib-stream';
|
||||
compress?: 'zlib-stream' | 'zstd-stream';
|
||||
}
|
||||
|
||||
108
deno/gateway/v10.ts
generated
108
deno/gateway/v10.ts
generated
@@ -331,12 +331,17 @@ export type GatewayDispatchPayload =
|
||||
| GatewayAutoModerationActionExecutionDispatch
|
||||
| GatewayAutoModerationRuleCreateDispatch
|
||||
| GatewayAutoModerationRuleDeleteDispatch
|
||||
| GatewayAutoModerationRuleModifyDispatch
|
||||
| GatewayChannelModifyDispatch
|
||||
| GatewayAutoModerationRuleUpdateDispatch
|
||||
| GatewayChannelCreateDispatch
|
||||
| GatewayChannelDeleteDispatch
|
||||
| GatewayChannelPinsUpdateDispatch
|
||||
| GatewayEntitlementModifyDispatch
|
||||
| GatewayChannelUpdateDispatch
|
||||
| GatewayEntitlementCreateDispatch
|
||||
| GatewayEntitlementDeleteDispatch
|
||||
| GatewayEntitlementUpdateDispatch
|
||||
| GatewayGuildAuditLogEntryCreateDispatch
|
||||
| GatewayGuildBanModifyDispatch
|
||||
| GatewayGuildBanAddDispatch
|
||||
| GatewayGuildBanRemoveDispatch
|
||||
| GatewayGuildCreateDispatch
|
||||
| GatewayGuildDeleteDispatch
|
||||
| GatewayGuildEmojisUpdateDispatch
|
||||
@@ -346,8 +351,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayGuildMembersChunkDispatch
|
||||
| GatewayGuildMemberUpdateDispatch
|
||||
| GatewayGuildModifyDispatch
|
||||
| GatewayGuildRoleCreateDispatch
|
||||
| GatewayGuildRoleDeleteDispatch
|
||||
| GatewayGuildRoleModifyDispatch
|
||||
| GatewayGuildRoleUpdateDispatch
|
||||
| GatewayGuildScheduledEventCreateDispatch
|
||||
| GatewayGuildScheduledEventDeleteDispatch
|
||||
| GatewayGuildScheduledEventUpdateDispatch
|
||||
@@ -382,7 +388,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayStageInstanceCreateDispatch
|
||||
| GatewayStageInstanceDeleteDispatch
|
||||
| GatewayStageInstanceUpdateDispatch
|
||||
| GatewaySubscriptionModifyDispatch
|
||||
| GatewaySubscriptionCreateDispatch
|
||||
| GatewaySubscriptionDeleteDispatch
|
||||
| GatewaySubscriptionUpdateDispatch
|
||||
| GatewayThreadCreateDispatch
|
||||
| GatewayThreadDeleteDispatch
|
||||
| GatewayThreadListSyncDispatch
|
||||
@@ -529,7 +537,10 @@ export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleCreate,
|
||||
GatewayAutoModerationRuleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
@@ -539,7 +550,10 @@ export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleUpdate,
|
||||
GatewayAutoModerationRuleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
@@ -549,7 +563,10 @@ export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleDelete,
|
||||
GatewayAutoModerationRuleDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
@@ -674,7 +691,10 @@ export type GatewaySubscriptionModifyDispatchData = APISubscription;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
*/
|
||||
export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionCreate,
|
||||
GatewaySubscriptionCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
@@ -684,7 +704,10 @@ export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
*/
|
||||
export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionUpdate,
|
||||
GatewaySubscriptionUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
@@ -694,7 +717,10 @@ export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
*/
|
||||
export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionDelete,
|
||||
GatewaySubscriptionDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
@@ -724,7 +750,10 @@ export type GatewayChannelModifyDispatchData = APIChannel & {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
*/
|
||||
export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelCreate,
|
||||
GatewayChannelCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
@@ -734,7 +763,10 @@ export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
*/
|
||||
export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelUpdate,
|
||||
GatewayChannelUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
@@ -744,7 +776,10 @@ export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
*/
|
||||
export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelDelete,
|
||||
GatewayChannelDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
@@ -804,7 +839,10 @@ export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create}
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementCreate,
|
||||
GatewayEntitlementCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
@@ -814,7 +852,10 @@ export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementUpdate,
|
||||
GatewayEntitlementUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
@@ -824,7 +865,10 @@ export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementDelete,
|
||||
GatewayEntitlementDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update}
|
||||
@@ -999,7 +1043,10 @@ export interface GatewayGuildBanModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
*/
|
||||
export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanAddDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanAdd,
|
||||
GatewayGuildBanAddDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
@@ -1009,7 +1056,10 @@ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
*/
|
||||
export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanRemove,
|
||||
GatewayGuildBanRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
@@ -1136,7 +1186,8 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload<
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update}
|
||||
*/
|
||||
export interface GatewayGuildMemberUpdateDispatchData
|
||||
extends APIGuildMemberJoined,
|
||||
extends
|
||||
APIGuildMemberJoined,
|
||||
APIBaseGuildMember,
|
||||
Partial<APIBaseVoiceGuildMember>,
|
||||
Partial<APIFlaggedGuildMember>,
|
||||
@@ -1225,7 +1276,10 @@ export interface GatewayGuildRoleModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
*/
|
||||
export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleCreate,
|
||||
GatewayGuildRoleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
@@ -1235,7 +1289,10 @@ export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchD
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
*/
|
||||
export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleUpdate,
|
||||
GatewayGuildRoleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
@@ -1519,7 +1576,7 @@ export interface GatewayInviteCreateDispatchData {
|
||||
/**
|
||||
* The time at which the invite was created
|
||||
*/
|
||||
created_at: number;
|
||||
created_at: string;
|
||||
/**
|
||||
* The guild of the invite
|
||||
*/
|
||||
@@ -1623,7 +1680,8 @@ export type GatewayMessageUpdateDispatch = _DataPayload<
|
||||
export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {}
|
||||
|
||||
export interface APIGuildMemberNoUser
|
||||
extends APIBaseGuildMember,
|
||||
extends
|
||||
APIBaseGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
NonNullable<APIGuildMemberJoined>,
|
||||
|
||||
108
deno/gateway/v9.ts
generated
108
deno/gateway/v9.ts
generated
@@ -330,12 +330,17 @@ export type GatewayDispatchPayload =
|
||||
| GatewayAutoModerationActionExecutionDispatch
|
||||
| GatewayAutoModerationRuleCreateDispatch
|
||||
| GatewayAutoModerationRuleDeleteDispatch
|
||||
| GatewayAutoModerationRuleModifyDispatch
|
||||
| GatewayChannelModifyDispatch
|
||||
| GatewayAutoModerationRuleUpdateDispatch
|
||||
| GatewayChannelCreateDispatch
|
||||
| GatewayChannelDeleteDispatch
|
||||
| GatewayChannelPinsUpdateDispatch
|
||||
| GatewayEntitlementModifyDispatch
|
||||
| GatewayChannelUpdateDispatch
|
||||
| GatewayEntitlementCreateDispatch
|
||||
| GatewayEntitlementDeleteDispatch
|
||||
| GatewayEntitlementUpdateDispatch
|
||||
| GatewayGuildAuditLogEntryCreateDispatch
|
||||
| GatewayGuildBanModifyDispatch
|
||||
| GatewayGuildBanAddDispatch
|
||||
| GatewayGuildBanRemoveDispatch
|
||||
| GatewayGuildCreateDispatch
|
||||
| GatewayGuildDeleteDispatch
|
||||
| GatewayGuildEmojisUpdateDispatch
|
||||
@@ -345,8 +350,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayGuildMembersChunkDispatch
|
||||
| GatewayGuildMemberUpdateDispatch
|
||||
| GatewayGuildModifyDispatch
|
||||
| GatewayGuildRoleCreateDispatch
|
||||
| GatewayGuildRoleDeleteDispatch
|
||||
| GatewayGuildRoleModifyDispatch
|
||||
| GatewayGuildRoleUpdateDispatch
|
||||
| GatewayGuildScheduledEventCreateDispatch
|
||||
| GatewayGuildScheduledEventDeleteDispatch
|
||||
| GatewayGuildScheduledEventUpdateDispatch
|
||||
@@ -381,7 +387,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayStageInstanceCreateDispatch
|
||||
| GatewayStageInstanceDeleteDispatch
|
||||
| GatewayStageInstanceUpdateDispatch
|
||||
| GatewaySubscriptionModifyDispatch
|
||||
| GatewaySubscriptionCreateDispatch
|
||||
| GatewaySubscriptionDeleteDispatch
|
||||
| GatewaySubscriptionUpdateDispatch
|
||||
| GatewayThreadCreateDispatch
|
||||
| GatewayThreadDeleteDispatch
|
||||
| GatewayThreadListSyncDispatch
|
||||
@@ -528,7 +536,10 @@ export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleCreate,
|
||||
GatewayAutoModerationRuleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
@@ -538,7 +549,10 @@ export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleUpdate,
|
||||
GatewayAutoModerationRuleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
@@ -548,7 +562,10 @@ export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleDelete,
|
||||
GatewayAutoModerationRuleDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
@@ -673,7 +690,10 @@ export type GatewaySubscriptionModifyDispatchData = APISubscription;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
*/
|
||||
export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionCreate,
|
||||
GatewaySubscriptionCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
@@ -683,7 +703,10 @@ export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
*/
|
||||
export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionUpdate,
|
||||
GatewaySubscriptionUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
@@ -693,7 +716,10 @@ export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
*/
|
||||
export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionDelete,
|
||||
GatewaySubscriptionDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
@@ -723,7 +749,10 @@ export type GatewayChannelModifyDispatchData = APIChannel & {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
*/
|
||||
export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelCreate,
|
||||
GatewayChannelCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
@@ -733,7 +762,10 @@ export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
*/
|
||||
export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelUpdate,
|
||||
GatewayChannelUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
@@ -743,7 +775,10 @@ export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
*/
|
||||
export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelDelete,
|
||||
GatewayChannelDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
@@ -803,7 +838,10 @@ export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create}
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementCreate,
|
||||
GatewayEntitlementCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
@@ -813,7 +851,10 @@ export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementUpdate,
|
||||
GatewayEntitlementUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
@@ -823,7 +864,10 @@ export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementDelete,
|
||||
GatewayEntitlementDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update}
|
||||
@@ -998,7 +1042,10 @@ export interface GatewayGuildBanModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
*/
|
||||
export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanAddDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanAdd,
|
||||
GatewayGuildBanAddDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
@@ -1008,7 +1055,10 @@ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
*/
|
||||
export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanRemove,
|
||||
GatewayGuildBanRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
@@ -1135,7 +1185,8 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload<
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update}
|
||||
*/
|
||||
export interface GatewayGuildMemberUpdateDispatchData
|
||||
extends APIGuildMemberJoined,
|
||||
extends
|
||||
APIGuildMemberJoined,
|
||||
APIBaseGuildMember,
|
||||
Partial<APIBaseVoiceGuildMember>,
|
||||
Partial<APIFlaggedGuildMember>,
|
||||
@@ -1224,7 +1275,10 @@ export interface GatewayGuildRoleModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
*/
|
||||
export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleCreate,
|
||||
GatewayGuildRoleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
@@ -1234,7 +1288,10 @@ export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchD
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
*/
|
||||
export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleUpdate,
|
||||
GatewayGuildRoleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
@@ -1518,7 +1575,7 @@ export interface GatewayInviteCreateDispatchData {
|
||||
/**
|
||||
* The time at which the invite was created
|
||||
*/
|
||||
created_at: number;
|
||||
created_at: string;
|
||||
/**
|
||||
* The guild of the invite
|
||||
*/
|
||||
@@ -1622,7 +1679,8 @@ export type GatewayMessageUpdateDispatch = _DataPayload<
|
||||
export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {}
|
||||
|
||||
export interface APIGuildMemberNoUser
|
||||
extends APIBaseGuildMember,
|
||||
extends
|
||||
APIBaseGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
NonNullable<APIGuildMemberJoined>,
|
||||
|
||||
11
deno/globals.ts
generated
11
deno/globals.ts
generated
@@ -8,6 +8,9 @@ export type Snowflake = string;
|
||||
*/
|
||||
export type Permissions = string;
|
||||
|
||||
const timestampStyles = 'DFRSTdfst';
|
||||
const timestampLength = 13;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/reference#message-formatting-formats}
|
||||
*/
|
||||
@@ -76,21 +79,19 @@ export const FormattingPatterns = {
|
||||
*
|
||||
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
// eslint-disable-next-line prefer-named-capture-group, unicorn/better-regex
|
||||
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRSTdfst]))?>/,
|
||||
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
|
||||
*/
|
||||
// eslint-disable-next-line unicorn/better-regex
|
||||
StyledTimestamp: /<t:(?<timestamp>-?\d{1,13}):(?<style>[DFRSTdfst])>/,
|
||||
StyledTimestamp: new RegExp(`<t:(?<timestamp>-?\\d{1,${timestampLength}}):(?<style>[${timestampStyles}])>`),
|
||||
/**
|
||||
* Regular expression for matching a guild navigation mention
|
||||
*
|
||||
|
||||
11
deno/payloads/common.ts
generated
11
deno/payloads/common.ts
generated
@@ -17,7 +17,6 @@ export const PermissionFlagsBits = {
|
||||
/**
|
||||
* Allows kicking members
|
||||
*/
|
||||
|
||||
KickMembers: 1n << 1n,
|
||||
/**
|
||||
* Allows banning members
|
||||
@@ -38,7 +37,7 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
ManageGuild: 1n << 5n,
|
||||
/**
|
||||
* Allows for the addition of reactions to messages
|
||||
* Allows for the addition of reactions to messages. This permission does not apply to reacting with an existing reaction on a message
|
||||
*
|
||||
* Applies to channel types: Text, Voice, Stage
|
||||
*/
|
||||
@@ -234,9 +233,9 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
SendMessagesInThreads: 1n << 38n,
|
||||
/**
|
||||
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag) in a voice channel
|
||||
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag)
|
||||
*
|
||||
* Applies to channel types: Voice
|
||||
* Applies to channel types: Text, Voice
|
||||
*/
|
||||
UseEmbeddedActivities: 1n << 39n,
|
||||
/**
|
||||
@@ -295,9 +294,9 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
PinMessages: 1n << 51n,
|
||||
/**
|
||||
* @unstable Allows for bypassing slowmode restrictions. Not (yet) documented.
|
||||
* Allows bypassing slowmode restrictions
|
||||
*
|
||||
* Applies to text-based and thread-based channel types.
|
||||
* Applies to channel types: Text, Voice, Stage
|
||||
*/
|
||||
BypassSlowmode: 1n << 52n,
|
||||
} as const;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import type { Snowflake } from '../../../../../globals.ts';
|
||||
import type { ChannelType } from '../../../channel.ts';
|
||||
import type { ApplicationCommandOptionAllowedChannelType } from '../../../channel.ts';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandChannelOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory>[];
|
||||
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
channel_types?: ApplicationCommandOptionAllowedChannelType[];
|
||||
}
|
||||
|
||||
export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandIntegerOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
|
||||
export interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
*/
|
||||
@@ -23,10 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption<Type extends InteractionType = InteractionType>
|
||||
extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Integer,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Integer,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandNumberOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
|
||||
export interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
*/
|
||||
@@ -23,10 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataNumberOption<Type extends InteractionType = InteractionType>
|
||||
extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Number,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
export interface APIApplicationCommandInteractionDataNumberOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Number,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandStringOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
|
||||
export interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
|
||||
/**
|
||||
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
|
||||
*/
|
||||
@@ -22,7 +21,9 @@ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithA
|
||||
APIApplicationCommandOptionChoice<string>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataStringOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
|
||||
export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.String,
|
||||
string
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@ import type { APIApplicationCommandBasicOption, APIApplicationCommandInteraction
|
||||
import type { APIApplicationCommandOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandSubcommandOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
options?: APIApplicationCommandBasicOption[];
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
APIApplicationCommandSubcommandOption,
|
||||
} from './subcommand.ts';
|
||||
|
||||
export interface APIApplicationCommandSubcommandGroupOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
options?: APIApplicationCommandSubcommandOption[];
|
||||
}
|
||||
|
||||
|
||||
@@ -105,8 +105,7 @@ export type APIApplicationCommandInteractionDataBasicOption<Type extends Interac
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIChatInputApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
@@ -114,8 +113,7 @@ export interface APIChatInputApplicationCommandInteractionData
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIAutocompleteApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
|
||||
@@ -7,8 +7,7 @@ import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIUserApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
target_id: Snowflake;
|
||||
resolved: APIUserInteractionDataResolved;
|
||||
}
|
||||
@@ -16,8 +15,7 @@ export interface APIUserApplicationCommandInteractionData
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIMessageApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
target_id: Snowflake;
|
||||
resolved: APIMessageApplicationCommandInteractionDataResolved;
|
||||
}
|
||||
|
||||
12
deno/payloads/v10/_interactions/base.ts
generated
12
deno/payloads/v10/_interactions/base.ts
generated
@@ -48,8 +48,7 @@ export interface APIBaseInteractionMetadata<Type extends InteractionType> {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure}
|
||||
*/
|
||||
export interface APIApplicationCommandInteractionMetadata
|
||||
extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
|
||||
export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
|
||||
/**
|
||||
* The user the command was run on, present only on user commands interactions
|
||||
*/
|
||||
@@ -64,8 +63,7 @@ export interface APIApplicationCommandInteractionMetadata
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure}
|
||||
*/
|
||||
export interface APIMessageComponentInteractionMetadata
|
||||
extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
|
||||
export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
|
||||
/**
|
||||
* ID of the message that contained the interactive component
|
||||
*/
|
||||
@@ -254,10 +252,7 @@ export type APIInteractionDataResolvedChannel =
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIInteractionDataResolvedGuildMember
|
||||
extends APIBaseGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
APIGuildMemberJoined {
|
||||
extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined {
|
||||
permissions: Permissions;
|
||||
}
|
||||
|
||||
@@ -269,6 +264,7 @@ export interface APIInteractionDataResolved {
|
||||
roles?: Record<Snowflake, APIRole>;
|
||||
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
|
||||
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
|
||||
messages?: Record<Snowflake, APIMessage>;
|
||||
attachments?: Record<Snowflake, APIAttachment>;
|
||||
}
|
||||
|
||||
|
||||
19
deno/payloads/v10/_interactions/messageComponents.ts
generated
19
deno/payloads/v10/_interactions/messageComponents.ts
generated
@@ -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'>>;
|
||||
}
|
||||
|
||||
18
deno/payloads/v10/_interactions/modalSubmit.ts
generated
18
deno/payloads/v10/_interactions/modalSubmit.ts
generated
@@ -28,8 +28,7 @@ export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitCom
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitMentionableSelectComponent
|
||||
extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
|
||||
export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
@@ -41,10 +40,25 @@ export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitCom
|
||||
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
|
||||
|
||||
26
deno/payloads/v10/channel.ts
generated
26
deno/payloads/v10/channel.ts
generated
@@ -75,10 +75,15 @@ export type TextChannelType =
|
||||
|
||||
export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
|
||||
|
||||
export type ApplicationCommandOptionAllowedChannelType = Exclude<
|
||||
ChannelType,
|
||||
ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory
|
||||
>;
|
||||
|
||||
export interface APISlowmodeChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
/**
|
||||
* Amount of seconds a user has to wait before sending another message (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
|
||||
*
|
||||
@@ -138,10 +143,7 @@ export interface APIGuildChannel<T extends GuildChannelType = GuildChannelType>
|
||||
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
|
||||
|
||||
export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia | GuildTextChannelType>
|
||||
extends APITextBasedChannel<T>,
|
||||
APIGuildChannel<T>,
|
||||
APISortableChannel,
|
||||
APIPinChannel<T> {
|
||||
extends APITextBasedChannel<T>, APIGuildChannel<T>, APISortableChannel, APIPinChannel<T> {
|
||||
/**
|
||||
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
|
||||
*/
|
||||
@@ -164,10 +166,7 @@ export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.Gui
|
||||
}
|
||||
|
||||
export interface APIVoiceChannelBase<T extends GuildChannelType>
|
||||
extends APIGuildChannel<T>,
|
||||
APISortableChannel,
|
||||
APITextBasedChannel<T>,
|
||||
APISlowmodeChannel<T> {
|
||||
extends APIGuildChannel<T>, APISortableChannel, APITextBasedChannel<T>, APISlowmodeChannel<T> {
|
||||
/**
|
||||
* The bitrate (in bits) of the voice or stage channel
|
||||
*/
|
||||
@@ -240,9 +239,7 @@ export interface APIGroupDMChannel extends APIDMChannelBase<ChannelType.GroupDM>
|
||||
export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread;
|
||||
|
||||
export interface APIThreadChannel<Type extends ThreadChannelType = ThreadChannelType>
|
||||
extends APITextBasedChannel<Type>,
|
||||
APIGuildChannel<Type>,
|
||||
APIPinChannel<Type> {
|
||||
extends APITextBasedChannel<Type>, APIGuildChannel<Type>, APIPinChannel<Type> {
|
||||
/**
|
||||
* The client users member for the thread, only included in select endpoints
|
||||
*/
|
||||
@@ -358,8 +355,7 @@ export enum ForumLayoutType {
|
||||
}
|
||||
|
||||
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
|
||||
extends APIGuildChannel<T>,
|
||||
APISortableChannel {
|
||||
extends APIGuildChannel<T>, APISortableChannel {
|
||||
/**
|
||||
* The channel topic (0-4096 characters)
|
||||
*/
|
||||
@@ -370,7 +366,7 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
|
||||
last_message_id?: Snowflake | null;
|
||||
/**
|
||||
* Amount of seconds a user has to wait before creating another thread (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
|
||||
51
deno/payloads/v10/gateway.ts
generated
51
deno/payloads/v10/gateway.ts
generated
@@ -350,14 +350,57 @@ export interface GatewayActivityParty {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
|
||||
*/
|
||||
export type GatewayActivityAssets = Partial<
|
||||
Record<'large_image' | 'large_text' | 'large_url' | 'small_image' | 'small_text' | 'small_url', string>
|
||||
>;
|
||||
export interface GatewayActivityAssets {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
|
||||
*/
|
||||
large_image?: string;
|
||||
/**
|
||||
* Text displayed when hovering over the large image of the activity
|
||||
*/
|
||||
large_text?: string;
|
||||
/**
|
||||
* URL that is opened when clicking on the large image
|
||||
*/
|
||||
large_url?: string;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
|
||||
*/
|
||||
small_image?: string;
|
||||
/**
|
||||
* Text displayed when hovering over the small image of the activity
|
||||
*/
|
||||
small_text?: string;
|
||||
/**
|
||||
* URL that is opened when clicking on the small image
|
||||
*/
|
||||
small_url?: string;
|
||||
/**
|
||||
* Displayed as a banner on a Game Invite.
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image | Activity Asset Image}
|
||||
* @see {@link https://discord.com/developers/docs/discord-social-sdk/development-guides/managing-game-invites | Game Invite}
|
||||
*/
|
||||
invite_cover_image?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
|
||||
*/
|
||||
export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>;
|
||||
export interface GatewayActivitySecrets {
|
||||
/**
|
||||
* The secret for joining a party
|
||||
*/
|
||||
join?: string;
|
||||
/**
|
||||
* The secret for spectating a game
|
||||
*/
|
||||
spectate?: string;
|
||||
/**
|
||||
* The secret for a specific instance of a match
|
||||
*/
|
||||
match?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}
|
||||
|
||||
17
deno/payloads/v10/guild.ts
generated
17
deno/payloads/v10/guild.ts
generated
@@ -9,7 +9,7 @@ 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';
|
||||
|
||||
export interface APIBaseGuild {
|
||||
/**
|
||||
@@ -127,7 +127,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
|
||||
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
|
||||
*/
|
||||
region: string;
|
||||
region?: string | null;
|
||||
/**
|
||||
* ID of afk channel
|
||||
*/
|
||||
@@ -275,7 +275,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
|
||||
*/
|
||||
stickers: APISticker[];
|
||||
stickers?: APISticker[];
|
||||
/**
|
||||
* Whether the guild has the boost progress bar enabled.
|
||||
*/
|
||||
@@ -638,7 +638,7 @@ export interface APIGuildPreview {
|
||||
/**
|
||||
* The description for the guild
|
||||
*/
|
||||
description: string;
|
||||
description: string | null;
|
||||
/**
|
||||
* Custom guild stickers
|
||||
*/
|
||||
@@ -695,6 +695,12 @@ export interface APIBaseGuildMember {
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -765,7 +771,8 @@ export interface APIGuildMemberUser {
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMember
|
||||
extends APIBaseGuildMember,
|
||||
extends
|
||||
APIBaseGuildMember,
|
||||
APIBaseVoiceGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
|
||||
6
deno/payloads/v10/guildScheduledEvent.ts
generated
6
deno/payloads/v10/guildScheduledEvent.ts
generated
@@ -181,8 +181,7 @@ export interface APIGuildScheduledEventRecurrenceRuleNWeekday {
|
||||
*/
|
||||
export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday;
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
@@ -192,8 +191,7 @@ export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
export interface APIExternalGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
channel_id: null;
|
||||
entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
|
||||
}
|
||||
|
||||
199
deno/payloads/v10/message.ts
generated
199
deno/payloads/v10/message.ts
generated
@@ -253,6 +253,10 @@ export interface APIBaseMessageNoChannel {
|
||||
* The call associated with the message
|
||||
*/
|
||||
call?: APIMessageCall;
|
||||
/**
|
||||
* The custom client-side theme shared via the message
|
||||
*/
|
||||
shared_client_theme?: APIMessageSharedClientTheme;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -463,6 +467,38 @@ export interface APIMessageCall {
|
||||
ended_timestamp?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://docs.discord.com/developers/resources/message#base-theme-types
|
||||
*/
|
||||
export enum BaseThemeType {
|
||||
Dark = 1,
|
||||
Light,
|
||||
Darker,
|
||||
Midnight,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://docs.discord.com/developers/resources/message#shared-client-theme-object
|
||||
*/
|
||||
export interface APIMessageSharedClientTheme {
|
||||
/**
|
||||
* The hexadecimal-encoded colors of the theme (max of 5)
|
||||
*/
|
||||
colors: string[];
|
||||
/**
|
||||
* The direction of the theme's colors (max of 360)
|
||||
*/
|
||||
gradient_angle: number;
|
||||
/**
|
||||
* The intensity of the theme's colors (max of 100)
|
||||
*/
|
||||
base_mix: number;
|
||||
/**
|
||||
* The mode of the theme
|
||||
*/
|
||||
base_theme?: BaseThemeType | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#role-subscription-data-object-role-subscription-data-object-structure}
|
||||
*/
|
||||
@@ -810,7 +846,10 @@ export interface APIAttachment {
|
||||
*/
|
||||
filename: string;
|
||||
/**
|
||||
* The title of the file
|
||||
* The original filename of the upload with special characters preserved
|
||||
*
|
||||
* This will be present when the filename contains special characters (e.g. Cyrillic),
|
||||
* in which case the `filename` field will be a sanitized version without those characters
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
@@ -1031,6 +1070,18 @@ export enum ComponentType {
|
||||
* Component for uploading files
|
||||
*/
|
||||
FileUpload,
|
||||
/**
|
||||
* Single-choice set of radio group option
|
||||
*/
|
||||
RadioGroup = 21,
|
||||
/**
|
||||
* Multi-select group of checkboxes
|
||||
*/
|
||||
CheckboxGroup,
|
||||
/**
|
||||
* Single checkbox for binary choice
|
||||
*/
|
||||
Checkbox,
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
|
||||
|
||||
/**
|
||||
@@ -1046,8 +1097,9 @@ export enum ComponentType {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#action-row}
|
||||
*/
|
||||
export interface APIActionRowComponent<T extends APIComponentInActionRow>
|
||||
extends APIBaseComponent<ComponentType.ActionRow> {
|
||||
export interface APIActionRowComponent<
|
||||
T extends APIComponentInActionRow,
|
||||
> extends APIBaseComponent<ComponentType.ActionRow> {
|
||||
/**
|
||||
* The components in the ActionRow
|
||||
*/
|
||||
@@ -1097,10 +1149,9 @@ export interface APIMessageComponentEmoji {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#button}
|
||||
*/
|
||||
export interface APIButtonComponentWithCustomId
|
||||
extends APIButtonComponentBase<
|
||||
ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success
|
||||
> {
|
||||
export interface APIButtonComponentWithCustomId extends APIButtonComponentBase<
|
||||
ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success
|
||||
> {
|
||||
/**
|
||||
* The custom_id to be sent in the interaction when clicked
|
||||
*/
|
||||
@@ -1312,8 +1363,10 @@ export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuCompon
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#channel-select}
|
||||
*/
|
||||
export interface APIChannelSelectComponent
|
||||
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
|
||||
export interface APIChannelSelectComponent extends APIBaseAutoPopulatedSelectMenuComponent<
|
||||
ComponentType.ChannelSelect,
|
||||
SelectMenuDefaultValueType.Channel
|
||||
> {
|
||||
/**
|
||||
* List of channel types to include in the ChannelSelect component
|
||||
*/
|
||||
@@ -1685,11 +1738,129 @@ export interface APIFileUploadComponent extends APIBaseComponent<ComponentType.F
|
||||
*/
|
||||
max_values?: number;
|
||||
/**
|
||||
* Whether the file upload requires files to be uploaded before submitting the modal (defaults to `true`)
|
||||
* Whether the file upload requires files to be uploaded before submitting the modal
|
||||
*
|
||||
* @defaultValue `true`
|
||||
*/
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#radio-group}
|
||||
*/
|
||||
export interface APIRadioGroupComponent extends APIBaseComponent<ComponentType.RadioGroup> {
|
||||
/**
|
||||
* Id for the radio group; max 100 characters
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* 2-10 radio group options within the radio group component
|
||||
*/
|
||||
options: APIRadioGroupOption[];
|
||||
/**
|
||||
* Whether the radio group requires selection before submitting the modal
|
||||
*
|
||||
* @defaultValue `true`
|
||||
*/
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#radio-group-option-structure}
|
||||
*/
|
||||
export interface APIRadioGroupOption {
|
||||
/**
|
||||
* The value of the radio group option; max 100 characters
|
||||
*/
|
||||
value: string;
|
||||
/**
|
||||
* The label text; max 100 characters
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* An optional description for the radio group option; max 100 characters
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Whether this option is selected by default
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
default?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group}
|
||||
*/
|
||||
export interface APICheckboxGroupComponent extends APIBaseComponent<ComponentType.CheckboxGroup> {
|
||||
/**
|
||||
* Id for the checkbox group; max 100 characters
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Checkbox group option within the component; max 10
|
||||
*/
|
||||
options: APICheckboxGroupOption[];
|
||||
/**
|
||||
* Minimum number of checkbox that can be selected; min 0, max 10
|
||||
*
|
||||
* @defaultValue `1`
|
||||
*/
|
||||
min_values?: number;
|
||||
/**
|
||||
* Maximum number of checkbox that can be selected; min 1, max 10
|
||||
*
|
||||
* @defaultValue {@link APICheckboxGroupComponent.options} length
|
||||
*/
|
||||
max_values?: number;
|
||||
/**
|
||||
* Whether selecting within the group is required before submitting the modal
|
||||
*
|
||||
* @defaultValue `true`
|
||||
*/
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group-option-structure}
|
||||
*/
|
||||
export interface APICheckboxGroupOption {
|
||||
/**
|
||||
* The value of the checkbox group option; max 100 characters
|
||||
*/
|
||||
value: string;
|
||||
/**
|
||||
* The label text; max 100 characters
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* An optional description for the checkbox group option; max 100 characters;
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Whether this option is selected by default
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
default?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox}
|
||||
*/
|
||||
export interface APICheckboxComponent extends APIBaseComponent<ComponentType.Checkbox> {
|
||||
/**
|
||||
* Id for the checkbox; max 100 characters
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Whether this checkbox is selected by default
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
default?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-snapshot-object}
|
||||
*/
|
||||
@@ -1770,7 +1941,13 @@ export type APIComponentInModalActionRow = APITextInputComponent;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#label-label-child-components}
|
||||
*/
|
||||
export type APIComponentInLabel = APIFileUploadComponent | APISelectMenuComponent | APITextInputComponent;
|
||||
export type APIComponentInLabel =
|
||||
| APICheckboxComponent
|
||||
| APICheckboxGroupComponent
|
||||
| APIFileUploadComponent
|
||||
| APIRadioGroupComponent
|
||||
| APISelectMenuComponent
|
||||
| APITextInputComponent;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#section}
|
||||
|
||||
3
deno/payloads/v10/permissions.ts
generated
3
deno/payloads/v10/permissions.ts
generated
@@ -19,13 +19,14 @@ export interface APIRole {
|
||||
/**
|
||||
* 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;
|
||||
colors: APIRoleColors;
|
||||
/**
|
||||
* If this role is pinned in the user listing
|
||||
*/
|
||||
|
||||
2
deno/payloads/v10/poll.ts
generated
2
deno/payloads/v10/poll.ts
generated
@@ -37,7 +37,7 @@ export interface APIPoll extends APIBasePoll, APIPollDefaults {
|
||||
/**
|
||||
* The time when the poll ends (IS08601 timestamp)
|
||||
*/
|
||||
expiry: string;
|
||||
expiry: string | null;
|
||||
/**
|
||||
* The results of the poll
|
||||
*/
|
||||
|
||||
10
deno/payloads/v10/webhook.ts
generated
10
deno/payloads/v10/webhook.ts
generated
@@ -123,14 +123,8 @@ export interface APIWebhookEventApplicationDeauthorizedData {
|
||||
|
||||
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventQuestUserEnrollmentData = never;
|
||||
@@ -201,14 +195,10 @@ export enum ApplicationWebhookEventType {
|
||||
EntitlementCreate = 'ENTITLEMENT_CREATE',
|
||||
/**
|
||||
* Entitlement was updated
|
||||
*
|
||||
* @unstable This event is not yet documented but can be enabled from the developer portal
|
||||
*/
|
||||
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
|
||||
/**
|
||||
* Entitlement was deleted
|
||||
*
|
||||
* @unstable This event is not yet documented but can be enabled from the developer portal
|
||||
*/
|
||||
EntitlementDelete = 'ENTITLEMENT_DELETE',
|
||||
/**
|
||||
|
||||
@@ -3,8 +3,7 @@ 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> {
|
||||
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory>[];
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandIntegerOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
|
||||
export interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
*/
|
||||
@@ -23,10 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption<Type extends InteractionType = InteractionType>
|
||||
extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Integer,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Integer,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandNumberOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
|
||||
export interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
*/
|
||||
@@ -23,10 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataNumberOption<Type extends InteractionType = InteractionType>
|
||||
extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Number,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
export interface APIApplicationCommandInteractionDataNumberOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Number,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@ import type {
|
||||
} from './base.ts';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandStringOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
|
||||
export interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
|
||||
/**
|
||||
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
|
||||
*/
|
||||
@@ -22,7 +21,9 @@ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithA
|
||||
APIApplicationCommandOptionChoice<string>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataStringOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
|
||||
export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.String,
|
||||
string
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@ import type { APIApplicationCommandBasicOption, APIApplicationCommandInteraction
|
||||
import type { APIApplicationCommandOptionBase } from './base.ts';
|
||||
import type { ApplicationCommandOptionType } from './shared.ts';
|
||||
|
||||
export interface APIApplicationCommandSubcommandOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
options?: APIApplicationCommandBasicOption[];
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
APIApplicationCommandSubcommandOption,
|
||||
} from './subcommand.ts';
|
||||
|
||||
export interface APIApplicationCommandSubcommandGroupOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
options?: APIApplicationCommandSubcommandOption[];
|
||||
}
|
||||
|
||||
|
||||
@@ -105,8 +105,7 @@ export type APIApplicationCommandInteractionDataBasicOption<Type extends Interac
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIChatInputApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
@@ -114,8 +113,7 @@ export interface APIChatInputApplicationCommandInteractionData
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIAutocompleteApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
|
||||
@@ -7,8 +7,7 @@ import type { APIBaseApplicationCommandInteractionData } from './internals.ts';
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIUserApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
target_id: Snowflake;
|
||||
resolved: APIUserInteractionDataResolved;
|
||||
}
|
||||
@@ -16,8 +15,7 @@ export interface APIUserApplicationCommandInteractionData
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIMessageApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
target_id: Snowflake;
|
||||
resolved: APIMessageApplicationCommandInteractionDataResolved;
|
||||
}
|
||||
|
||||
12
deno/payloads/v9/_interactions/base.ts
generated
12
deno/payloads/v9/_interactions/base.ts
generated
@@ -51,8 +51,7 @@ export interface APIBaseInteractionMetadata<Type extends InteractionType> {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure}
|
||||
*/
|
||||
export interface APIApplicationCommandInteractionMetadata
|
||||
extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
|
||||
export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
|
||||
/**
|
||||
* The user the command was run on, present only on user commands interactions
|
||||
*/
|
||||
@@ -67,8 +66,7 @@ export interface APIApplicationCommandInteractionMetadata
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure}
|
||||
*/
|
||||
export interface APIMessageComponentInteractionMetadata
|
||||
extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
|
||||
export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
|
||||
/**
|
||||
* ID of the message that contained the interactive component
|
||||
*/
|
||||
@@ -257,10 +255,7 @@ export type APIInteractionDataResolvedChannel =
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIInteractionDataResolvedGuildMember
|
||||
extends APIBaseGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
APIGuildMemberJoined {
|
||||
extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined {
|
||||
permissions: Permissions;
|
||||
}
|
||||
|
||||
@@ -272,6 +267,7 @@ export interface APIInteractionDataResolved {
|
||||
roles?: Record<Snowflake, APIRole>;
|
||||
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
|
||||
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
|
||||
messages?: Record<Snowflake, APIMessage>;
|
||||
attachments?: Record<Snowflake, APIAttachment>;
|
||||
}
|
||||
|
||||
|
||||
19
deno/payloads/v9/_interactions/messageComponents.ts
generated
19
deno/payloads/v9/_interactions/messageComponents.ts
generated
@@ -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'>>;
|
||||
}
|
||||
|
||||
18
deno/payloads/v9/_interactions/modalSubmit.ts
generated
18
deno/payloads/v9/_interactions/modalSubmit.ts
generated
@@ -28,8 +28,7 @@ export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitCom
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitMentionableSelectComponent
|
||||
extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
|
||||
export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
@@ -41,10 +40,25 @@ export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitCom
|
||||
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
|
||||
|
||||
21
deno/payloads/v9/channel.ts
generated
21
deno/payloads/v9/channel.ts
generated
@@ -78,7 +78,7 @@ export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType
|
||||
export interface APISlowmodeChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
/**
|
||||
* Amount of seconds a user has to wait before sending another message (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
|
||||
*
|
||||
@@ -138,10 +138,7 @@ export interface APIGuildChannel<T extends GuildChannelType = GuildChannelType>
|
||||
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
|
||||
|
||||
export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia | GuildTextChannelType>
|
||||
extends APITextBasedChannel<T>,
|
||||
APISortableChannel,
|
||||
APIGuildChannel<T>,
|
||||
APIPinChannel<T> {
|
||||
extends APITextBasedChannel<T>, APISortableChannel, APIGuildChannel<T>, APIPinChannel<T> {
|
||||
/**
|
||||
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
|
||||
*/
|
||||
@@ -164,10 +161,7 @@ export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.Gui
|
||||
}
|
||||
|
||||
export interface APIVoiceChannelBase<T extends GuildChannelType = GuildChannelType>
|
||||
extends APIGuildChannel<T>,
|
||||
APISortableChannel,
|
||||
APITextBasedChannel<T>,
|
||||
APISlowmodeChannel<T> {
|
||||
extends APIGuildChannel<T>, APISortableChannel, APITextBasedChannel<T>, APISlowmodeChannel<T> {
|
||||
/**
|
||||
* The bitrate (in bits) of the voice or stage channel
|
||||
*/
|
||||
@@ -240,9 +234,7 @@ export interface APIGroupDMChannel extends APIDMChannelBase<ChannelType.GroupDM>
|
||||
export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread;
|
||||
|
||||
export interface APIThreadChannel<Type extends ThreadChannelType = ThreadChannelType>
|
||||
extends APITextBasedChannel<Type>,
|
||||
APIGuildChannel<Type>,
|
||||
APIPinChannel<Type> {
|
||||
extends APITextBasedChannel<Type>, APIGuildChannel<Type>, APIPinChannel<Type> {
|
||||
/**
|
||||
* The client users member for the thread, only included in select endpoints
|
||||
*/
|
||||
@@ -358,8 +350,7 @@ export enum ForumLayoutType {
|
||||
}
|
||||
|
||||
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
|
||||
extends APIGuildChannel<T>,
|
||||
APISortableChannel {
|
||||
extends APIGuildChannel<T>, APISortableChannel {
|
||||
/**
|
||||
* The channel topic (0-4096 characters)
|
||||
*/
|
||||
@@ -370,7 +361,7 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
|
||||
last_message_id?: Snowflake | null;
|
||||
/**
|
||||
* Amount of seconds a user has to wait before creating another thread (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
|
||||
51
deno/payloads/v9/gateway.ts
generated
51
deno/payloads/v9/gateway.ts
generated
@@ -338,14 +338,57 @@ export interface GatewayActivityParty {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
|
||||
*/
|
||||
export type GatewayActivityAssets = Partial<
|
||||
Record<'large_image' | 'large_text' | 'large_url' | 'small_image' | 'small_text' | 'small_url', string>
|
||||
>;
|
||||
export interface GatewayActivityAssets {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
|
||||
*/
|
||||
large_image?: string;
|
||||
/**
|
||||
* Text displayed when hovering over the large image of the activity
|
||||
*/
|
||||
large_text?: string;
|
||||
/**
|
||||
* URL that is opened when clicking on the large image
|
||||
*/
|
||||
large_url?: string;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
|
||||
*/
|
||||
small_image?: string;
|
||||
/**
|
||||
* Text displayed when hovering over the small image of the activity
|
||||
*/
|
||||
small_text?: string;
|
||||
/**
|
||||
* URL that is opened when clicking on the small image
|
||||
*/
|
||||
small_url?: string;
|
||||
/**
|
||||
* Displayed as a banner on a Game Invite.
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image | Activity Asset Image}
|
||||
* @see {@link https://discord.com/developers/docs/discord-social-sdk/development-guides/managing-game-invites | Game Invite}
|
||||
*/
|
||||
invite_cover_image?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
|
||||
*/
|
||||
export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>;
|
||||
export interface GatewayActivitySecrets {
|
||||
/**
|
||||
* The secret for joining a party
|
||||
*/
|
||||
join?: string;
|
||||
/**
|
||||
* The secret for spectating a game
|
||||
*/
|
||||
spectate?: string;
|
||||
/**
|
||||
* The secret for a specific instance of a match
|
||||
*/
|
||||
match?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}
|
||||
|
||||
17
deno/payloads/v9/guild.ts
generated
17
deno/payloads/v9/guild.ts
generated
@@ -9,7 +9,7 @@ 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';
|
||||
|
||||
export interface APIBaseGuild {
|
||||
/**
|
||||
@@ -127,7 +127,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
|
||||
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
|
||||
*/
|
||||
region: string;
|
||||
region?: string | null;
|
||||
/**
|
||||
* ID of afk channel
|
||||
*/
|
||||
@@ -275,7 +275,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
|
||||
*/
|
||||
stickers: APISticker[];
|
||||
stickers?: APISticker[];
|
||||
/**
|
||||
* Whether the guild has the boost progress bar enabled.
|
||||
*/
|
||||
@@ -630,7 +630,7 @@ export interface APIGuildPreview {
|
||||
/**
|
||||
* The description for the guild
|
||||
*/
|
||||
description: string;
|
||||
description: string | null;
|
||||
/**
|
||||
* Custom guild stickers
|
||||
*/
|
||||
@@ -687,6 +687,12 @@ export interface APIBaseGuildMember {
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -757,7 +763,8 @@ export interface APIGuildMemberUser {
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMember
|
||||
extends APIBaseGuildMember,
|
||||
extends
|
||||
APIBaseGuildMember,
|
||||
APIBaseVoiceGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
|
||||
6
deno/payloads/v9/guildScheduledEvent.ts
generated
6
deno/payloads/v9/guildScheduledEvent.ts
generated
@@ -181,8 +181,7 @@ export interface APIGuildScheduledEventRecurrenceRuleNWeekday {
|
||||
*/
|
||||
export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday;
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
@@ -192,8 +191,7 @@ export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
export interface APIExternalGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
channel_id: null;
|
||||
entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
|
||||
}
|
||||
|
||||
200
deno/payloads/v9/message.ts
generated
200
deno/payloads/v9/message.ts
generated
@@ -248,6 +248,10 @@ export interface APIBaseMessageNoChannel {
|
||||
* The call associated with the message
|
||||
*/
|
||||
call?: APIMessageCall;
|
||||
/**
|
||||
* The custom client-side theme shared via the message
|
||||
*/
|
||||
shared_client_theme?: APIMessageSharedClientTheme;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -458,6 +462,38 @@ export interface APIMessageCall {
|
||||
ended_timestamp?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://docs.discord.com/developers/resources/message#base-theme-types
|
||||
*/
|
||||
export enum BaseThemeType {
|
||||
Dark = 1,
|
||||
Light,
|
||||
Darker,
|
||||
Midnight,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://docs.discord.com/developers/resources/message#shared-client-theme-object
|
||||
*/
|
||||
export interface APIMessageSharedClientTheme {
|
||||
/**
|
||||
* The hexadecimal-encoded colors of the theme (max of 5)
|
||||
*/
|
||||
colors: string[];
|
||||
/**
|
||||
* The direction of the theme's colors (max of 360)
|
||||
*/
|
||||
gradient_angle: number;
|
||||
/**
|
||||
* The intensity of the theme's colors (max of 100)
|
||||
*/
|
||||
base_mix: number;
|
||||
/**
|
||||
* The mode of the theme
|
||||
*/
|
||||
base_theme?: BaseThemeType | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#role-subscription-data-object-role-subscription-data-object-structure}
|
||||
*/
|
||||
@@ -805,7 +841,10 @@ export interface APIAttachment {
|
||||
*/
|
||||
filename: string;
|
||||
/**
|
||||
* The title of the file
|
||||
* The original filename of the upload with special characters preserved
|
||||
*
|
||||
* This will be present when the filename contains special characters (e.g. Cyrillic),
|
||||
* in which case the `filename` field will be a sanitized version without those characters
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
@@ -1026,6 +1065,18 @@ export enum ComponentType {
|
||||
* Component for uploading files
|
||||
*/
|
||||
FileUpload,
|
||||
/**
|
||||
* Single-choice set of radio group option
|
||||
*/
|
||||
RadioGroup = 21,
|
||||
/**
|
||||
* Multi-select group of checkboxes
|
||||
*/
|
||||
CheckboxGroup,
|
||||
/**
|
||||
* Single checkbox for binary choice
|
||||
*/
|
||||
Checkbox,
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
|
||||
|
||||
/**
|
||||
@@ -1041,8 +1092,9 @@ export enum ComponentType {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#action-row}
|
||||
*/
|
||||
export interface APIActionRowComponent<T extends APIComponentInActionRow>
|
||||
extends APIBaseComponent<ComponentType.ActionRow> {
|
||||
export interface APIActionRowComponent<
|
||||
T extends APIComponentInActionRow,
|
||||
> extends APIBaseComponent<ComponentType.ActionRow> {
|
||||
/**
|
||||
* The components in the ActionRow
|
||||
*/
|
||||
@@ -1092,10 +1144,9 @@ export interface APIMessageComponentEmoji {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#button}
|
||||
*/
|
||||
export interface APIButtonComponentWithCustomId
|
||||
extends APIButtonComponentBase<
|
||||
ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success
|
||||
> {
|
||||
export interface APIButtonComponentWithCustomId extends APIButtonComponentBase<
|
||||
ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success
|
||||
> {
|
||||
/**
|
||||
* The custom_id to be sent in the interaction when clicked
|
||||
*/
|
||||
@@ -1307,8 +1358,10 @@ export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuCompon
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#channel-select}
|
||||
*/
|
||||
export interface APIChannelSelectComponent
|
||||
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
|
||||
export interface APIChannelSelectComponent extends APIBaseAutoPopulatedSelectMenuComponent<
|
||||
ComponentType.ChannelSelect,
|
||||
SelectMenuDefaultValueType.Channel
|
||||
> {
|
||||
/**
|
||||
* List of channel types to include in the ChannelSelect component
|
||||
*/
|
||||
@@ -1680,11 +1733,130 @@ export interface APIFileUploadComponent extends APIBaseComponent<ComponentType.F
|
||||
*/
|
||||
max_values?: number;
|
||||
/**
|
||||
* Whether the file upload requires files to be uploaded before submitting the modal (defaults to `true`)
|
||||
* Whether the file upload requires files to be uploaded before submitting the modal
|
||||
*
|
||||
* @defaultValue `true`
|
||||
*/
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#radio-group}
|
||||
*/
|
||||
export interface APIRadioGroupComponent extends APIBaseComponent<ComponentType.RadioGroup> {
|
||||
/**
|
||||
* Id for the radio group; max 100 characters
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* 2-10 radio group options within the radio group component
|
||||
*/
|
||||
options: APIRadioGroupOption[];
|
||||
/**
|
||||
* Whether the radio group requires selection before submitting the modal
|
||||
*
|
||||
* @defaultValue `true`
|
||||
*/
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#radio-group-option-structure}
|
||||
* @unstable This feature is not publicly released and is currently in preview.
|
||||
*/
|
||||
export interface APIRadioGroupOption {
|
||||
/**
|
||||
* The value of the radio group option; max 100 characters
|
||||
*/
|
||||
value: string;
|
||||
/**
|
||||
* The label text; max 100 characters
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* An optional description for the radio group option; max 100 characters
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Whether this option is selected by default
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
default?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group}
|
||||
*/
|
||||
export interface APICheckboxGroupComponent extends APIBaseComponent<ComponentType.CheckboxGroup> {
|
||||
/**
|
||||
* Id for the checkbox group; max 100 characters
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Checkbox group option within the component; max 10
|
||||
*/
|
||||
options: APICheckboxGroupOption[];
|
||||
/**
|
||||
* Minimum number of checkbox that can be selected; min 0, max 10
|
||||
*
|
||||
* @defaultValue `1`
|
||||
*/
|
||||
min_values?: number;
|
||||
/**
|
||||
* Maximum number of checkbox that can be selected; min 1, max 10
|
||||
*
|
||||
* @defaultValue {@link APICheckboxGroupComponent.options} length
|
||||
*/
|
||||
max_values?: number;
|
||||
/**
|
||||
* Whether selecting within the group is required before submitting the modal
|
||||
*
|
||||
* @defaultValue `true`
|
||||
*/
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group-option-structure}
|
||||
*/
|
||||
export interface APICheckboxGroupOption {
|
||||
/**
|
||||
* The value of the checkbox group option; max 100 characters
|
||||
*/
|
||||
value: string;
|
||||
/**
|
||||
* The label text; max 100 characters
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* An optional description for the checkbox group option; max 100 characters;
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Whether this option is selected by default
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
default?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox}
|
||||
*/
|
||||
export interface APICheckboxComponent extends APIBaseComponent<ComponentType.Checkbox> {
|
||||
/**
|
||||
* Id for the checkbox; max 100 characters
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Whether this checkbox is selected by default
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
default?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-snapshot-object}
|
||||
*/
|
||||
@@ -1765,7 +1937,13 @@ export type APIComponentInModalActionRow = APITextInputComponent;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#label-label-child-components}
|
||||
*/
|
||||
export type APIComponentInLabel = APIFileUploadComponent | APISelectMenuComponent | APITextInputComponent;
|
||||
export type APIComponentInLabel =
|
||||
| APICheckboxComponent
|
||||
| APICheckboxGroupComponent
|
||||
| APIFileUploadComponent
|
||||
| APIRadioGroupComponent
|
||||
| APISelectMenuComponent
|
||||
| APITextInputComponent;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#section}
|
||||
|
||||
3
deno/payloads/v9/permissions.ts
generated
3
deno/payloads/v9/permissions.ts
generated
@@ -19,13 +19,14 @@ export interface APIRole {
|
||||
/**
|
||||
* 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;
|
||||
colors: APIRoleColors;
|
||||
/**
|
||||
* If this role is pinned in the user listing
|
||||
*/
|
||||
|
||||
2
deno/payloads/v9/poll.ts
generated
2
deno/payloads/v9/poll.ts
generated
@@ -37,7 +37,7 @@ export interface APIPoll extends APIBasePoll, APIPollDefaults {
|
||||
/**
|
||||
* The time when the poll ends (IS08601 timestamp)
|
||||
*/
|
||||
expiry: string;
|
||||
expiry: string | null;
|
||||
/**
|
||||
* The results of the poll
|
||||
*/
|
||||
|
||||
10
deno/payloads/v9/webhook.ts
generated
10
deno/payloads/v9/webhook.ts
generated
@@ -123,14 +123,8 @@ export interface APIWebhookEventApplicationDeauthorizedData {
|
||||
|
||||
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventQuestUserEnrollmentData = never;
|
||||
@@ -201,14 +195,10 @@ export enum ApplicationWebhookEventType {
|
||||
EntitlementCreate = 'ENTITLEMENT_CREATE',
|
||||
/**
|
||||
* Entitlement was updated
|
||||
*
|
||||
* @unstable This event is not yet documented but can be enabled from the developer portal
|
||||
*/
|
||||
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
|
||||
/**
|
||||
* Entitlement was deleted
|
||||
*
|
||||
* @unstable This event is not yet documented but can be enabled from the developer portal
|
||||
*/
|
||||
EntitlementDelete = 'ENTITLEMENT_DELETE',
|
||||
/**
|
||||
|
||||
4
deno/rest/v10/application.ts
generated
4
deno/rest/v10/application.ts
generated
@@ -25,11 +25,13 @@ export type RESTGetCurrentApplicationResult = APIApplication;
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<
|
||||
_Nullable<Pick<APIApplication, 'cover_image' | 'icon'>> &
|
||||
_Nullable<Pick<APIApplication, 'cover_image' | 'event_webhooks_url' | 'icon'>> &
|
||||
Pick<
|
||||
APIApplication,
|
||||
| 'custom_install_url'
|
||||
| 'description'
|
||||
| 'event_webhooks_status'
|
||||
| 'event_webhooks_types'
|
||||
| 'flags'
|
||||
| 'install_params'
|
||||
| 'integration_types_config'
|
||||
|
||||
12
deno/rest/v10/channel.ts
generated
12
deno/rest/v10/channel.ts
generated
@@ -7,6 +7,7 @@ import type {
|
||||
APIFollowedChannel,
|
||||
APIMessage,
|
||||
APIMessageReference,
|
||||
APIMessageSharedClientTheme,
|
||||
APIThreadList,
|
||||
APIThreadMember,
|
||||
APIUser,
|
||||
@@ -84,8 +85,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
nsfw?: boolean | null | undefined;
|
||||
/**
|
||||
* Amount of seconds a user has to wait before sending another message (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
|
||||
* are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* Channel types: text, newsThread, publicThread, privateThread, forum, media
|
||||
*/
|
||||
@@ -149,7 +149,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: text, news, forum, media
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | null | undefined;
|
||||
/**
|
||||
* Channel flags combined as a bit field.
|
||||
*/
|
||||
@@ -171,7 +171,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined;
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | null | undefined;
|
||||
/**
|
||||
* The initial `rate_limit_per_user` to set on newly created threads in a channel.
|
||||
* This field is copied to the thread at creation time and does not live update
|
||||
@@ -338,6 +338,10 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
* A poll!
|
||||
*/
|
||||
poll?: RESTAPIPoll | undefined;
|
||||
/**
|
||||
* The custom client-side theme to share via the message
|
||||
*/
|
||||
shared_client_theme?: APIMessageSharedClientTheme | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
22
deno/rest/v10/guild.ts
generated
22
deno/rest/v10/guild.ts
generated
@@ -20,6 +20,7 @@ import type {
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildFeature,
|
||||
GuildMemberFlags,
|
||||
GuildMFALevel,
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
@@ -381,11 +382,11 @@ export type RESTPatchAPIGuildChannelPositionsJSONBody = {
|
||||
/**
|
||||
* Sorting position of the channel
|
||||
*/
|
||||
position: number;
|
||||
position?: number | null | undefined;
|
||||
/**
|
||||
* Sync channel overwrites with the new parent, when moving to a new `parent_id`
|
||||
*/
|
||||
lock_permissions?: boolean | undefined;
|
||||
lock_permissions?: boolean | null | undefined;
|
||||
/**
|
||||
* The new parent id of this channel
|
||||
*/
|
||||
@@ -522,6 +523,12 @@ export interface RESTPatchAPIGuildMemberJSONBody {
|
||||
* Timestamp of when the time out will be removed; until then, they cannot interact with the guild
|
||||
*/
|
||||
communication_disabled_until?: string | null | undefined;
|
||||
/**
|
||||
* Guild member flags (only {@link GuildMemberFlags.BypassesVerification} can be set)
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
|
||||
*/
|
||||
flags?: GuildMemberFlags | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -814,7 +821,10 @@ export type RESTPatchAPIGuildRoleResult = APIRole;
|
||||
export type RESTDeleteAPIGuildRoleResult = never;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
* A record mapping role IDs to the number of members that have that role.
|
||||
*
|
||||
* @remarks This does not include the `@everyone` role.
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role-member-counts}
|
||||
*/
|
||||
export type RESTGetAPIGuildRoleMemberCountsResult = Record<Snowflake, number>;
|
||||
|
||||
@@ -1004,7 +1014,8 @@ export type RESTPutAPIGuildOnboardingJSONBody = _AddUndefinedToPossiblyUndefined
|
||||
};
|
||||
|
||||
export interface RESTAPIGuildOnboardingPrompt
|
||||
extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
extends
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPrompt, 'guild_id' | 'id' | 'options' | 'title'>>
|
||||
>,
|
||||
Pick<APIGuildOnboardingPrompt, 'id' | 'title'> {
|
||||
@@ -1020,7 +1031,8 @@ export interface RESTAPIGuildOnboardingPrompt
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt;
|
||||
|
||||
export interface RESTAPIGuildOnboardingPromptOption
|
||||
extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
extends
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPromptOption, 'emoji' | 'guild_id' | 'title'>>
|
||||
>,
|
||||
Pick<APIGuildOnboardingPromptOption, 'title'> {
|
||||
|
||||
13
deno/rest/v10/guildScheduledEvent.ts
generated
13
deno/rest/v10/guildScheduledEvent.ts
generated
@@ -56,7 +56,7 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
|
||||
/**
|
||||
* The scheduled entity type of the guild event
|
||||
*/
|
||||
entity_type?: GuildScheduledEventEntityType | undefined;
|
||||
entity_type: GuildScheduledEventEntityType;
|
||||
/**
|
||||
* The entity metadata of the scheduled event
|
||||
*/
|
||||
@@ -95,12 +95,15 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}
|
||||
*/
|
||||
export interface RESTPatchAPIGuildScheduledEventJSONBody
|
||||
extends _Nullable<
|
||||
Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
>,
|
||||
extends
|
||||
_Nullable<Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>>,
|
||||
_StrictPartial<
|
||||
Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
Omit<
|
||||
RESTPostAPIGuildScheduledEventJSONBody,
|
||||
'channel_id' | 'description' | 'entity_metadata' | 'recurrence_rule'
|
||||
>
|
||||
> {
|
||||
channel_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
|
||||
6
deno/rest/v10/interactions.ts
generated
6
deno/rest/v10/interactions.ts
generated
@@ -48,7 +48,8 @@ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[];
|
||||
export type RESTGetAPIApplicationCommandResult = APIApplicationCommand;
|
||||
|
||||
export interface RESTPostAPIBaseApplicationCommandsJSONBody
|
||||
extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
extends
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Omit<
|
||||
APIApplicationCommand,
|
||||
| 'application_id'
|
||||
@@ -89,8 +90,7 @@ export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTP
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
|
||||
*/
|
||||
export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody
|
||||
extends RESTPostAPIBaseApplicationCommandsJSONBody {
|
||||
export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody {
|
||||
type: ApplicationCommandType.PrimaryEntryPoint;
|
||||
}
|
||||
|
||||
|
||||
2
deno/rest/v10/mod.ts
generated
2
deno/rest/v10/mod.ts
generated
@@ -383,8 +383,6 @@ export const Routes = {
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/roles/member-counts`
|
||||
*
|
||||
* @unstable
|
||||
*/
|
||||
guildRoleMemberCounts(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/roles/member-counts` as const;
|
||||
|
||||
2
deno/rest/v10/soundboard.ts
generated
2
deno/rest/v10/soundboard.ts
generated
@@ -4,7 +4,7 @@ import type { APISoundboardSound } from '../../payloads/v10/mod.ts';
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound}
|
||||
*/
|
||||
export type RESTPostAPISendSoundboardSoundResult = APISoundboardSound;
|
||||
export type RESTPostAPISendSoundboardSoundResult = never;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound-json-params}
|
||||
|
||||
4
deno/rest/v9/application.ts
generated
4
deno/rest/v9/application.ts
generated
@@ -25,11 +25,13 @@ export type RESTGetCurrentApplicationResult = APIApplication;
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#edit-current-application}
|
||||
*/
|
||||
export type RESTPatchCurrentApplicationJSONBody = _StrictPartial<
|
||||
_Nullable<Pick<APIApplication, 'cover_image' | 'icon'>> &
|
||||
_Nullable<Pick<APIApplication, 'cover_image' | 'event_webhooks_url' | 'icon'>> &
|
||||
Pick<
|
||||
APIApplication,
|
||||
| 'custom_install_url'
|
||||
| 'description'
|
||||
| 'event_webhooks_status'
|
||||
| 'event_webhooks_types'
|
||||
| 'flags'
|
||||
| 'install_params'
|
||||
| 'integration_types_config'
|
||||
|
||||
12
deno/rest/v9/channel.ts
generated
12
deno/rest/v9/channel.ts
generated
@@ -7,6 +7,7 @@ import type {
|
||||
APIFollowedChannel,
|
||||
APIMessage,
|
||||
APIMessageReference,
|
||||
APIMessageSharedClientTheme,
|
||||
APIThreadList,
|
||||
APIThreadMember,
|
||||
APIUser,
|
||||
@@ -84,8 +85,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
nsfw?: boolean | null | undefined;
|
||||
/**
|
||||
* Amount of seconds a user has to wait before sending another message (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
|
||||
* are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* Channel types: text, newsThread, publicThread, privateThread, forum, media
|
||||
*/
|
||||
@@ -149,7 +149,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: text, news, forum, media
|
||||
*/
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
|
||||
default_auto_archive_duration?: ThreadAutoArchiveDuration | null | undefined;
|
||||
/**
|
||||
* Channel flags combined as a bit field.
|
||||
*/
|
||||
@@ -171,7 +171,7 @@ export interface RESTPatchAPIChannelJSONBody {
|
||||
*
|
||||
* Channel types: forum, media
|
||||
*/
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined;
|
||||
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | null | undefined;
|
||||
/**
|
||||
* The initial `rate_limit_per_user` to set on newly created threads in a channel.
|
||||
* This field is copied to the thread at creation time and does not live update
|
||||
@@ -345,6 +345,10 @@ export interface RESTPostAPIChannelMessageJSONBody {
|
||||
* A poll!
|
||||
*/
|
||||
poll?: RESTAPIPoll | undefined;
|
||||
/**
|
||||
* The custom client-side theme to share via the message
|
||||
*/
|
||||
shared_client_theme?: APIMessageSharedClientTheme | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
25
deno/rest/v9/guild.ts
generated
25
deno/rest/v9/guild.ts
generated
@@ -18,6 +18,7 @@ import type {
|
||||
GuildDefaultMessageNotifications,
|
||||
GuildExplicitContentFilter,
|
||||
GuildFeature,
|
||||
GuildMemberFlags,
|
||||
GuildMFALevel,
|
||||
GuildSystemChannelFlags,
|
||||
GuildVerificationLevel,
|
||||
@@ -381,11 +382,11 @@ export type RESTPatchAPIGuildChannelPositionsJSONBody = {
|
||||
/**
|
||||
* Sorting position of the channel
|
||||
*/
|
||||
position: number;
|
||||
position?: number | null | undefined;
|
||||
/**
|
||||
* Sync channel overwrites with the new parent, when moving to a new `parent_id`
|
||||
*/
|
||||
lock_permissions?: boolean | undefined;
|
||||
lock_permissions?: boolean | null | undefined;
|
||||
/**
|
||||
* The new parent id of this channel
|
||||
*/
|
||||
@@ -522,6 +523,12 @@ export interface RESTPatchAPIGuildMemberJSONBody {
|
||||
* Timestamp of when the time out will be removed; until then, they cannot interact with the guild
|
||||
*/
|
||||
communication_disabled_until?: string | null | undefined;
|
||||
/**
|
||||
* Guild member flags (only {@link GuildMemberFlags.BypassesVerification} can be set)
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags}
|
||||
*/
|
||||
flags?: GuildMemberFlags | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -819,6 +826,14 @@ export type RESTPatchAPIGuildRoleResult = APIRole;
|
||||
*/
|
||||
export type RESTDeleteAPIGuildRoleResult = never;
|
||||
|
||||
/**
|
||||
* A record mapping role IDs to the number of members that have that role.
|
||||
*
|
||||
* @remarks This does not include the `@everyone` role.
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-role-member-counts}
|
||||
*/
|
||||
export type RESTGetAPIGuildRoleMemberCountsResult = Record<Snowflake, number>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}
|
||||
*/
|
||||
@@ -1005,7 +1020,8 @@ export type RESTPutAPIGuildOnboardingJSONBody = _AddUndefinedToPossiblyUndefined
|
||||
};
|
||||
|
||||
export interface RESTAPIGuildOnboardingPrompt
|
||||
extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
extends
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPrompt, 'guild_id' | 'id' | 'options' | 'title'>>
|
||||
>,
|
||||
Pick<APIGuildOnboardingPrompt, 'id' | 'title'> {
|
||||
@@ -1021,7 +1037,8 @@ export interface RESTAPIGuildOnboardingPrompt
|
||||
export type RESTAPIModifyGuildOnboardingPromptData = RESTAPIGuildOnboardingPrompt;
|
||||
|
||||
export interface RESTAPIGuildOnboardingPromptOption
|
||||
extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
extends
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Partial<Omit<APIGuildOnboardingPromptOption, 'emoji' | 'guild_id' | 'title'>>
|
||||
>,
|
||||
Pick<APIGuildOnboardingPromptOption, 'title'> {
|
||||
|
||||
13
deno/rest/v9/guildScheduledEvent.ts
generated
13
deno/rest/v9/guildScheduledEvent.ts
generated
@@ -56,7 +56,7 @@ export interface RESTPostAPIGuildScheduledEventJSONBody {
|
||||
/**
|
||||
* The scheduled entity type of the guild event
|
||||
*/
|
||||
entity_type?: GuildScheduledEventEntityType | undefined;
|
||||
entity_type: GuildScheduledEventEntityType;
|
||||
/**
|
||||
* The entity metadata of the scheduled event
|
||||
*/
|
||||
@@ -95,12 +95,15 @@ export type RESTGetAPIGuildScheduledEventResult = APIGuildScheduledEvent;
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}
|
||||
*/
|
||||
export interface RESTPatchAPIGuildScheduledEventJSONBody
|
||||
extends _Nullable<
|
||||
Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
>,
|
||||
extends
|
||||
_Nullable<Pick<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>>,
|
||||
_StrictPartial<
|
||||
Omit<RESTPostAPIGuildScheduledEventJSONBody, 'description' | 'entity_metadata' | 'recurrence_rule'>
|
||||
Omit<
|
||||
RESTPostAPIGuildScheduledEventJSONBody,
|
||||
'channel_id' | 'description' | 'entity_metadata' | 'recurrence_rule'
|
||||
>
|
||||
> {
|
||||
channel_id?: Snowflake | null | undefined;
|
||||
/**
|
||||
* The status of the scheduled event
|
||||
*/
|
||||
|
||||
6
deno/rest/v9/interactions.ts
generated
6
deno/rest/v9/interactions.ts
generated
@@ -48,7 +48,8 @@ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[];
|
||||
export type RESTGetAPIApplicationCommandResult = APIApplicationCommand;
|
||||
|
||||
export interface RESTPostAPIBaseApplicationCommandsJSONBody
|
||||
extends _AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
extends
|
||||
_AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
|
||||
Omit<
|
||||
APIApplicationCommand,
|
||||
| 'application_id'
|
||||
@@ -89,8 +90,7 @@ export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTP
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}
|
||||
*/
|
||||
export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody
|
||||
extends RESTPostAPIBaseApplicationCommandsJSONBody {
|
||||
export interface RESTPostAPIPrimaryEntryPointApplicationCommandJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody {
|
||||
type: ApplicationCommandType.PrimaryEntryPoint;
|
||||
}
|
||||
|
||||
|
||||
8
deno/rest/v9/mod.ts
generated
8
deno/rest/v9/mod.ts
generated
@@ -380,6 +380,14 @@ export const Routes = {
|
||||
return `/guilds/${guildId}/roles/${roleId}` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/roles/member-counts`
|
||||
*/
|
||||
guildRoleMemberCounts(guildId: Snowflake) {
|
||||
return `/guilds/${guildId}/roles/member-counts` as const;
|
||||
},
|
||||
|
||||
/**
|
||||
* Route for:
|
||||
* - GET `/guilds/{guild.id}/prune`
|
||||
|
||||
2
deno/rest/v9/soundboard.ts
generated
2
deno/rest/v9/soundboard.ts
generated
@@ -4,7 +4,7 @@ import type { APISoundboardSound } from '../../payloads/v9/mod.ts';
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound}
|
||||
*/
|
||||
export type RESTPostAPISendSoundboardSoundResult = APISoundboardSound;
|
||||
export type RESTPostAPISendSoundboardSoundResult = never;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound-json-params}
|
||||
|
||||
21
deno/rpc/v10.ts
generated
21
deno/rpc/v10.ts
generated
@@ -1923,8 +1923,7 @@ export interface RPCCommandActivityInviteUserPayload extends RPCCommandMessage<R
|
||||
args: RPCActivityInviteUserArgs;
|
||||
}
|
||||
|
||||
export interface RPCCommandBraintreePopupBridgeCallbackPayload
|
||||
extends RPCCommandMessage<RPCCommands.BraintreePopupBridgeCallback> {
|
||||
export interface RPCCommandBraintreePopupBridgeCallbackPayload extends RPCCommandMessage<RPCCommands.BraintreePopupBridgeCallback> {
|
||||
args: RPCBraintreePopupBridgeCallbackArgs;
|
||||
}
|
||||
|
||||
@@ -1932,8 +1931,7 @@ export interface RPCCommandBrowserPayload extends RPCCommandMessage<RPCCommands.
|
||||
args: RPCBrowserHandoffArgs;
|
||||
}
|
||||
|
||||
export interface RPCCommandCloseActivityJoinRequestPayload
|
||||
extends RPCCommandMessage<RPCCommands.CloseActivityJoinRequest> {
|
||||
export interface RPCCommandCloseActivityJoinRequestPayload extends RPCCommandMessage<RPCCommands.CloseActivityJoinRequest> {
|
||||
args: RPCCloseActivityJoinRequestArgs;
|
||||
}
|
||||
|
||||
@@ -1973,8 +1971,7 @@ export interface RPCCommandGetRelationshipsPayload extends RPCCommandMessage<RPC
|
||||
args: RPCGetRelationshipsArgs;
|
||||
}
|
||||
|
||||
export interface RPCCommandGetSelectedVoiceChannelPayload
|
||||
extends RPCCommandMessage<RPCCommands.GetSelectedVoiceChannel> {
|
||||
export interface RPCCommandGetSelectedVoiceChannelPayload extends RPCCommandMessage<RPCCommands.GetSelectedVoiceChannel> {
|
||||
args: RPCGetSelectedVoiceChannelArgs;
|
||||
}
|
||||
|
||||
@@ -2002,13 +1999,11 @@ export interface RPCCommandNetworkingPeerMetricsPayload extends RPCCommandMessag
|
||||
args: RPCNetworkingPeerMetricsArgs;
|
||||
}
|
||||
|
||||
export interface RPCCommandNetworkingSystemMetricsPayload
|
||||
extends RPCCommandMessage<RPCCommands.NetworkingSystemMetrics> {
|
||||
export interface RPCCommandNetworkingSystemMetricsPayload extends RPCCommandMessage<RPCCommands.NetworkingSystemMetrics> {
|
||||
args: RPCNetworkingSystemMetricsArgs;
|
||||
}
|
||||
|
||||
export interface RPCCommandOpenOverlayActivityInvitePayload
|
||||
extends RPCCommandMessage<RPCCommands.OpenOverlayActivityInvite> {
|
||||
export interface RPCCommandOpenOverlayActivityInvitePayload extends RPCCommandMessage<RPCCommands.OpenOverlayActivityInvite> {
|
||||
args: RPCOpenOverlayActivityInviteArgs;
|
||||
}
|
||||
|
||||
@@ -2016,8 +2011,7 @@ export interface RPCCommandOpenOverlayGuildInvitePayload extends RPCCommandMessa
|
||||
args: RPCOpenOverlayGuildInviteArgs;
|
||||
}
|
||||
|
||||
export interface RPCCommandOpenOverlayVoiceSettingsPayload
|
||||
extends RPCCommandMessage<RPCCommands.OpenOverlayVoiceSettings> {
|
||||
export interface RPCCommandOpenOverlayVoiceSettingsPayload extends RPCCommandMessage<RPCCommands.OpenOverlayVoiceSettings> {
|
||||
args: RPCOpenOverlayVoiceSettingsArgs;
|
||||
}
|
||||
|
||||
@@ -2261,8 +2255,7 @@ export interface RPCActivityInviteUserResult extends RPCCommandMessage<RPCComman
|
||||
data: RPCActivityInviteUserResultData;
|
||||
}
|
||||
|
||||
export interface RPCBraintreePopupBridgeCallbackResult
|
||||
extends RPCCommandMessage<RPCCommands.BraintreePopupBridgeCallback> {
|
||||
export interface RPCBraintreePopupBridgeCallbackResult extends RPCCommandMessage<RPCCommands.BraintreePopupBridgeCallback> {
|
||||
data: RPCBraintreePopupBridgeCallbackResultData;
|
||||
}
|
||||
|
||||
|
||||
4
deno/voice/v4.ts
generated
4
deno/voice/v4.ts
generated
@@ -156,6 +156,10 @@ export enum VoiceCloseCodes {
|
||||
* We didn't recognize your encryption
|
||||
*/
|
||||
UnknownEncryptionMode,
|
||||
/**
|
||||
* E2EE/DAVE protocol required
|
||||
*/
|
||||
EndToEndEncryptionDAVEProtocolRequired,
|
||||
/**
|
||||
* You sent a malformed request
|
||||
*/
|
||||
|
||||
4
deno/voice/v8.ts
generated
4
deno/voice/v8.ts
generated
@@ -152,6 +152,10 @@ export enum VoiceCloseCodes {
|
||||
* We didn't recognize your encryption
|
||||
*/
|
||||
UnknownEncryptionMode,
|
||||
/**
|
||||
* E2EE/DAVE protocol required
|
||||
*/
|
||||
EndToEndEncryptionDAVEProtocolRequired,
|
||||
/**
|
||||
* You sent a malformed request
|
||||
*/
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
export interface GatewayURLQuery {
|
||||
v: string;
|
||||
encoding: 'etf' | 'json';
|
||||
compress?: 'zlib-stream';
|
||||
compress?: 'zlib-stream' | 'zstd-stream';
|
||||
}
|
||||
|
||||
108
gateway/v10.ts
108
gateway/v10.ts
@@ -331,12 +331,17 @@ export type GatewayDispatchPayload =
|
||||
| GatewayAutoModerationActionExecutionDispatch
|
||||
| GatewayAutoModerationRuleCreateDispatch
|
||||
| GatewayAutoModerationRuleDeleteDispatch
|
||||
| GatewayAutoModerationRuleModifyDispatch
|
||||
| GatewayChannelModifyDispatch
|
||||
| GatewayAutoModerationRuleUpdateDispatch
|
||||
| GatewayChannelCreateDispatch
|
||||
| GatewayChannelDeleteDispatch
|
||||
| GatewayChannelPinsUpdateDispatch
|
||||
| GatewayEntitlementModifyDispatch
|
||||
| GatewayChannelUpdateDispatch
|
||||
| GatewayEntitlementCreateDispatch
|
||||
| GatewayEntitlementDeleteDispatch
|
||||
| GatewayEntitlementUpdateDispatch
|
||||
| GatewayGuildAuditLogEntryCreateDispatch
|
||||
| GatewayGuildBanModifyDispatch
|
||||
| GatewayGuildBanAddDispatch
|
||||
| GatewayGuildBanRemoveDispatch
|
||||
| GatewayGuildCreateDispatch
|
||||
| GatewayGuildDeleteDispatch
|
||||
| GatewayGuildEmojisUpdateDispatch
|
||||
@@ -346,8 +351,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayGuildMembersChunkDispatch
|
||||
| GatewayGuildMemberUpdateDispatch
|
||||
| GatewayGuildModifyDispatch
|
||||
| GatewayGuildRoleCreateDispatch
|
||||
| GatewayGuildRoleDeleteDispatch
|
||||
| GatewayGuildRoleModifyDispatch
|
||||
| GatewayGuildRoleUpdateDispatch
|
||||
| GatewayGuildScheduledEventCreateDispatch
|
||||
| GatewayGuildScheduledEventDeleteDispatch
|
||||
| GatewayGuildScheduledEventUpdateDispatch
|
||||
@@ -382,7 +388,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayStageInstanceCreateDispatch
|
||||
| GatewayStageInstanceDeleteDispatch
|
||||
| GatewayStageInstanceUpdateDispatch
|
||||
| GatewaySubscriptionModifyDispatch
|
||||
| GatewaySubscriptionCreateDispatch
|
||||
| GatewaySubscriptionDeleteDispatch
|
||||
| GatewaySubscriptionUpdateDispatch
|
||||
| GatewayThreadCreateDispatch
|
||||
| GatewayThreadDeleteDispatch
|
||||
| GatewayThreadListSyncDispatch
|
||||
@@ -529,7 +537,10 @@ export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleCreate,
|
||||
GatewayAutoModerationRuleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
@@ -539,7 +550,10 @@ export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleUpdate,
|
||||
GatewayAutoModerationRuleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
@@ -549,7 +563,10 @@ export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleDelete,
|
||||
GatewayAutoModerationRuleDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
@@ -674,7 +691,10 @@ export type GatewaySubscriptionModifyDispatchData = APISubscription;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
*/
|
||||
export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionCreate,
|
||||
GatewaySubscriptionCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
@@ -684,7 +704,10 @@ export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
*/
|
||||
export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionUpdate,
|
||||
GatewaySubscriptionUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
@@ -694,7 +717,10 @@ export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
*/
|
||||
export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionDelete,
|
||||
GatewaySubscriptionDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
@@ -724,7 +750,10 @@ export type GatewayChannelModifyDispatchData = APIChannel & {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
*/
|
||||
export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelCreate,
|
||||
GatewayChannelCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
@@ -734,7 +763,10 @@ export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
*/
|
||||
export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelUpdate,
|
||||
GatewayChannelUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
@@ -744,7 +776,10 @@ export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
*/
|
||||
export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelDelete,
|
||||
GatewayChannelDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
@@ -804,7 +839,10 @@ export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create}
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementCreate,
|
||||
GatewayEntitlementCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
@@ -814,7 +852,10 @@ export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementUpdate,
|
||||
GatewayEntitlementUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
@@ -824,7 +865,10 @@ export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementDelete,
|
||||
GatewayEntitlementDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update}
|
||||
@@ -999,7 +1043,10 @@ export interface GatewayGuildBanModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
*/
|
||||
export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanAddDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanAdd,
|
||||
GatewayGuildBanAddDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
@@ -1009,7 +1056,10 @@ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
*/
|
||||
export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanRemove,
|
||||
GatewayGuildBanRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
@@ -1136,7 +1186,8 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload<
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update}
|
||||
*/
|
||||
export interface GatewayGuildMemberUpdateDispatchData
|
||||
extends APIGuildMemberJoined,
|
||||
extends
|
||||
APIGuildMemberJoined,
|
||||
APIBaseGuildMember,
|
||||
Partial<APIBaseVoiceGuildMember>,
|
||||
Partial<APIFlaggedGuildMember>,
|
||||
@@ -1225,7 +1276,10 @@ export interface GatewayGuildRoleModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
*/
|
||||
export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleCreate,
|
||||
GatewayGuildRoleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
@@ -1235,7 +1289,10 @@ export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchD
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
*/
|
||||
export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleUpdate,
|
||||
GatewayGuildRoleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
@@ -1519,7 +1576,7 @@ export interface GatewayInviteCreateDispatchData {
|
||||
/**
|
||||
* The time at which the invite was created
|
||||
*/
|
||||
created_at: number;
|
||||
created_at: string;
|
||||
/**
|
||||
* The guild of the invite
|
||||
*/
|
||||
@@ -1623,7 +1680,8 @@ export type GatewayMessageUpdateDispatch = _DataPayload<
|
||||
export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {}
|
||||
|
||||
export interface APIGuildMemberNoUser
|
||||
extends APIBaseGuildMember,
|
||||
extends
|
||||
APIBaseGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
NonNullable<APIGuildMemberJoined>,
|
||||
|
||||
108
gateway/v9.ts
108
gateway/v9.ts
@@ -330,12 +330,17 @@ export type GatewayDispatchPayload =
|
||||
| GatewayAutoModerationActionExecutionDispatch
|
||||
| GatewayAutoModerationRuleCreateDispatch
|
||||
| GatewayAutoModerationRuleDeleteDispatch
|
||||
| GatewayAutoModerationRuleModifyDispatch
|
||||
| GatewayChannelModifyDispatch
|
||||
| GatewayAutoModerationRuleUpdateDispatch
|
||||
| GatewayChannelCreateDispatch
|
||||
| GatewayChannelDeleteDispatch
|
||||
| GatewayChannelPinsUpdateDispatch
|
||||
| GatewayEntitlementModifyDispatch
|
||||
| GatewayChannelUpdateDispatch
|
||||
| GatewayEntitlementCreateDispatch
|
||||
| GatewayEntitlementDeleteDispatch
|
||||
| GatewayEntitlementUpdateDispatch
|
||||
| GatewayGuildAuditLogEntryCreateDispatch
|
||||
| GatewayGuildBanModifyDispatch
|
||||
| GatewayGuildBanAddDispatch
|
||||
| GatewayGuildBanRemoveDispatch
|
||||
| GatewayGuildCreateDispatch
|
||||
| GatewayGuildDeleteDispatch
|
||||
| GatewayGuildEmojisUpdateDispatch
|
||||
@@ -345,8 +350,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayGuildMembersChunkDispatch
|
||||
| GatewayGuildMemberUpdateDispatch
|
||||
| GatewayGuildModifyDispatch
|
||||
| GatewayGuildRoleCreateDispatch
|
||||
| GatewayGuildRoleDeleteDispatch
|
||||
| GatewayGuildRoleModifyDispatch
|
||||
| GatewayGuildRoleUpdateDispatch
|
||||
| GatewayGuildScheduledEventCreateDispatch
|
||||
| GatewayGuildScheduledEventDeleteDispatch
|
||||
| GatewayGuildScheduledEventUpdateDispatch
|
||||
@@ -381,7 +387,9 @@ export type GatewayDispatchPayload =
|
||||
| GatewayStageInstanceCreateDispatch
|
||||
| GatewayStageInstanceDeleteDispatch
|
||||
| GatewayStageInstanceUpdateDispatch
|
||||
| GatewaySubscriptionModifyDispatch
|
||||
| GatewaySubscriptionCreateDispatch
|
||||
| GatewaySubscriptionDeleteDispatch
|
||||
| GatewaySubscriptionUpdateDispatch
|
||||
| GatewayThreadCreateDispatch
|
||||
| GatewayThreadDeleteDispatch
|
||||
| GatewayThreadListSyncDispatch
|
||||
@@ -528,7 +536,10 @@ export type GatewayAutoModerationRuleModifyDispatchData = APIAutoModerationRule;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleCreateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleCreate,
|
||||
GatewayAutoModerationRuleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create}
|
||||
@@ -538,7 +549,10 @@ export type GatewayAutoModerationRuleCreateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleUpdate,
|
||||
GatewayAutoModerationRuleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-update}
|
||||
@@ -548,7 +562,10 @@ export type GatewayAutoModerationRuleUpdateDispatchData = GatewayAutoModerationR
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
*/
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = GatewayAutoModerationRuleModifyDispatch;
|
||||
export type GatewayAutoModerationRuleDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.AutoModerationRuleDelete,
|
||||
GatewayAutoModerationRuleDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete}
|
||||
@@ -673,7 +690,10 @@ export type GatewaySubscriptionModifyDispatchData = APISubscription;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
*/
|
||||
export type GatewaySubscriptionCreateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionCreate,
|
||||
GatewaySubscriptionCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-create}
|
||||
@@ -683,7 +703,10 @@ export type GatewaySubscriptionCreateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
*/
|
||||
export type GatewaySubscriptionUpdateDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionUpdate,
|
||||
GatewaySubscriptionUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-update}
|
||||
@@ -693,7 +716,10 @@ export type GatewaySubscriptionUpdateDispatchData = GatewaySubscriptionModifyDis
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
*/
|
||||
export type GatewaySubscriptionDeleteDispatch = GatewaySubscriptionModifyDispatch;
|
||||
export type GatewaySubscriptionDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.SubscriptionDelete,
|
||||
GatewaySubscriptionDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#subscription-delete}
|
||||
@@ -723,7 +749,10 @@ export type GatewayChannelModifyDispatchData = APIChannel & {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
*/
|
||||
export type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelCreate,
|
||||
GatewayChannelCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-create}
|
||||
@@ -733,7 +762,10 @@ export type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
*/
|
||||
export type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelUpdate,
|
||||
GatewayChannelUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-update}
|
||||
@@ -743,7 +775,10 @@ export type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
*/
|
||||
export type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch;
|
||||
export type GatewayChannelDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.ChannelDelete,
|
||||
GatewayChannelDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#channel-delete}
|
||||
@@ -803,7 +838,10 @@ export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-create}
|
||||
*/
|
||||
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementCreate,
|
||||
GatewayEntitlementCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
@@ -813,7 +851,10 @@ export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-update}
|
||||
*/
|
||||
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementUpdate,
|
||||
GatewayEntitlementUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
@@ -823,7 +864,10 @@ export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispa
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#entitlement-delete}
|
||||
*/
|
||||
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
|
||||
export type GatewayEntitlementDeleteDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.EntitlementDelete,
|
||||
GatewayEntitlementDeleteDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-update}
|
||||
@@ -998,7 +1042,10 @@ export interface GatewayGuildBanModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
*/
|
||||
export type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanAddDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanAdd,
|
||||
GatewayGuildBanAddDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-add}
|
||||
@@ -1008,7 +1055,10 @@ export type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
*/
|
||||
export type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch;
|
||||
export type GatewayGuildBanRemoveDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildBanRemove,
|
||||
GatewayGuildBanRemoveDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove}
|
||||
@@ -1135,7 +1185,8 @@ export type GatewayGuildMemberUpdateDispatch = _DataPayload<
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-member-update}
|
||||
*/
|
||||
export interface GatewayGuildMemberUpdateDispatchData
|
||||
extends APIGuildMemberJoined,
|
||||
extends
|
||||
APIGuildMemberJoined,
|
||||
APIBaseGuildMember,
|
||||
Partial<APIBaseVoiceGuildMember>,
|
||||
Partial<APIFlaggedGuildMember>,
|
||||
@@ -1224,7 +1275,10 @@ export interface GatewayGuildRoleModifyDispatchData {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
*/
|
||||
export type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleCreateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleCreate,
|
||||
GatewayGuildRoleCreateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-create}
|
||||
@@ -1234,7 +1288,10 @@ export type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchD
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
*/
|
||||
export type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch;
|
||||
export type GatewayGuildRoleUpdateDispatch = _DataPayload<
|
||||
GatewayDispatchEvents.GuildRoleUpdate,
|
||||
GatewayGuildRoleUpdateDispatchData
|
||||
>;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#guild-role-update}
|
||||
@@ -1518,7 +1575,7 @@ export interface GatewayInviteCreateDispatchData {
|
||||
/**
|
||||
* The time at which the invite was created
|
||||
*/
|
||||
created_at: number;
|
||||
created_at: string;
|
||||
/**
|
||||
* The guild of the invite
|
||||
*/
|
||||
@@ -1622,7 +1679,8 @@ export type GatewayMessageUpdateDispatch = _DataPayload<
|
||||
export interface GatewayMessageUpdateDispatchData extends GatewayMessageEventExtraFields, APIBaseMessage {}
|
||||
|
||||
export interface APIGuildMemberNoUser
|
||||
extends APIBaseGuildMember,
|
||||
extends
|
||||
APIBaseGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
NonNullable<APIGuildMemberJoined>,
|
||||
|
||||
11
globals.ts
11
globals.ts
@@ -8,6 +8,9 @@ export type Snowflake = string;
|
||||
*/
|
||||
export type Permissions = string;
|
||||
|
||||
const timestampStyles = 'DFRSTdfst';
|
||||
const timestampLength = 13;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/reference#message-formatting-formats}
|
||||
*/
|
||||
@@ -76,21 +79,19 @@ export const FormattingPatterns = {
|
||||
*
|
||||
* The `timestamp` and `style` group properties are present on the `exec` result of this expression
|
||||
*/
|
||||
// eslint-disable-next-line prefer-named-capture-group, unicorn/better-regex
|
||||
Timestamp: /<t:(?<timestamp>-?\d{1,13})(:(?<style>[DFRSTdfst]))?>/,
|
||||
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
|
||||
*/
|
||||
// eslint-disable-next-line unicorn/better-regex
|
||||
StyledTimestamp: /<t:(?<timestamp>-?\d{1,13}):(?<style>[DFRSTdfst])>/,
|
||||
StyledTimestamp: new RegExp(`<t:(?<timestamp>-?\\d{1,${timestampLength}}):(?<style>[${timestampStyles}])>`),
|
||||
/**
|
||||
* Regular expression for matching a guild navigation mention
|
||||
*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.38.35",
|
||||
"version": "0.38.42",
|
||||
"description": "Discord API typings that are kept up to date for use in bot library creation.",
|
||||
"homepage": "https://discord-api-types.dev",
|
||||
"workspaces": [
|
||||
@@ -144,7 +144,7 @@
|
||||
"conventional-changelog": "^7.0.2",
|
||||
"conventional-changelog-angular": "^8.0.0",
|
||||
"conventional-recommended-bump": "^11.1.0",
|
||||
"eslint": "^9.28.0",
|
||||
"eslint": "^10.0.0",
|
||||
"eslint-config-neon": "^0.2.7",
|
||||
"eslint-formatter-pretty": "^7.0.0",
|
||||
"eslint-import-resolver-typescript": "^4.4.2",
|
||||
@@ -154,7 +154,7 @@
|
||||
"lint-staged": "^16.1.0",
|
||||
"lodash.merge": "^4.6.2",
|
||||
"npm-run-all2": "^8.0.4",
|
||||
"prettier": "^3.5.3",
|
||||
"prettier": "^3.7.4",
|
||||
"pretty-quick": "^4.1.1",
|
||||
"rimraf": "^6.0.1",
|
||||
"ts-morph": "^27.0.0",
|
||||
@@ -209,7 +209,7 @@
|
||||
},
|
||||
"packageManager": "yarn@4.12.0",
|
||||
"volta": {
|
||||
"node": "24.11.1",
|
||||
"node": "24.14.0",
|
||||
"yarn": "4.12.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ export const PermissionFlagsBits = {
|
||||
/**
|
||||
* Allows kicking members
|
||||
*/
|
||||
|
||||
KickMembers: 1n << 1n,
|
||||
/**
|
||||
* Allows banning members
|
||||
@@ -38,7 +37,7 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
ManageGuild: 1n << 5n,
|
||||
/**
|
||||
* Allows for the addition of reactions to messages
|
||||
* Allows for the addition of reactions to messages. This permission does not apply to reacting with an existing reaction on a message
|
||||
*
|
||||
* Applies to channel types: Text, Voice, Stage
|
||||
*/
|
||||
@@ -234,9 +233,9 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
SendMessagesInThreads: 1n << 38n,
|
||||
/**
|
||||
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag) in a voice channel
|
||||
* Allows for using Activities (applications with the {@link ApplicationFlags.Embedded} flag)
|
||||
*
|
||||
* Applies to channel types: Voice
|
||||
* Applies to channel types: Text, Voice
|
||||
*/
|
||||
UseEmbeddedActivities: 1n << 39n,
|
||||
/**
|
||||
@@ -295,9 +294,9 @@ export const PermissionFlagsBits = {
|
||||
*/
|
||||
PinMessages: 1n << 51n,
|
||||
/**
|
||||
* @unstable Allows for bypassing slowmode restrictions. Not (yet) documented.
|
||||
* Allows bypassing slowmode restrictions
|
||||
*
|
||||
* Applies to text-based and thread-based channel types.
|
||||
* Applies to channel types: Text, Voice, Stage
|
||||
*/
|
||||
BypassSlowmode: 1n << 52n,
|
||||
} as const;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import type { Snowflake } from '../../../../../globals';
|
||||
import type { ChannelType } from '../../../channel';
|
||||
import type { ApplicationCommandOptionAllowedChannelType } from '../../../channel';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
|
||||
import type { ApplicationCommandOptionType } from './shared';
|
||||
|
||||
export interface APIApplicationCommandChannelOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory>[];
|
||||
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
channel_types?: ApplicationCommandOptionAllowedChannelType[];
|
||||
}
|
||||
|
||||
export type APIApplicationCommandInteractionDataChannelOption = APIInteractionDataOptionBase<
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
} from './base';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
|
||||
export interface APIApplicationCommandIntegerOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
|
||||
export interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
*/
|
||||
@@ -23,10 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption<Type extends InteractionType = InteractionType>
|
||||
extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Integer,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Integer,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
} from './base';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
|
||||
export interface APIApplicationCommandNumberOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
|
||||
export interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
*/
|
||||
@@ -23,10 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataNumberOption<Type extends InteractionType = InteractionType>
|
||||
extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Number,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
export interface APIApplicationCommandInteractionDataNumberOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Number,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@ import type {
|
||||
} from './base';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
|
||||
export interface APIApplicationCommandStringOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
|
||||
export interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
|
||||
/**
|
||||
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
|
||||
*/
|
||||
@@ -22,7 +21,9 @@ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithA
|
||||
APIApplicationCommandOptionChoice<string>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataStringOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
|
||||
export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.String,
|
||||
string
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@ import type { APIApplicationCommandBasicOption, APIApplicationCommandInteraction
|
||||
import type { APIApplicationCommandOptionBase } from './base';
|
||||
import type { ApplicationCommandOptionType } from './shared';
|
||||
|
||||
export interface APIApplicationCommandSubcommandOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
options?: APIApplicationCommandBasicOption[];
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
APIApplicationCommandSubcommandOption,
|
||||
} from './subcommand';
|
||||
|
||||
export interface APIApplicationCommandSubcommandGroupOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
options?: APIApplicationCommandSubcommandOption[];
|
||||
}
|
||||
|
||||
|
||||
@@ -105,8 +105,7 @@ export type APIApplicationCommandInteractionDataBasicOption<Type extends Interac
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIChatInputApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
@@ -114,8 +113,7 @@ export interface APIChatInputApplicationCommandInteractionData
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIAutocompleteApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
|
||||
@@ -7,8 +7,7 @@ import type { APIBaseApplicationCommandInteractionData } from './internals';
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIUserApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
export interface APIUserApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.User> {
|
||||
target_id: Snowflake;
|
||||
resolved: APIUserInteractionDataResolved;
|
||||
}
|
||||
@@ -16,8 +15,7 @@ export interface APIUserApplicationCommandInteractionData
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIMessageApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
export interface APIMessageApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.Message> {
|
||||
target_id: Snowflake;
|
||||
resolved: APIMessageApplicationCommandInteractionDataResolved;
|
||||
}
|
||||
|
||||
@@ -48,8 +48,7 @@ export interface APIBaseInteractionMetadata<Type extends InteractionType> {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-application-command-interaction-metadata-structure}
|
||||
*/
|
||||
export interface APIApplicationCommandInteractionMetadata
|
||||
extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
|
||||
export interface APIApplicationCommandInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.ApplicationCommand> {
|
||||
/**
|
||||
* The user the command was run on, present only on user commands interactions
|
||||
*/
|
||||
@@ -64,8 +63,7 @@ export interface APIApplicationCommandInteractionMetadata
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-command-interaction-metadata-structure}
|
||||
*/
|
||||
export interface APIMessageComponentInteractionMetadata
|
||||
extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
|
||||
export interface APIMessageComponentInteractionMetadata extends APIBaseInteractionMetadata<InteractionType.MessageComponent> {
|
||||
/**
|
||||
* ID of the message that contained the interactive component
|
||||
*/
|
||||
@@ -254,10 +252,7 @@ export type APIInteractionDataResolvedChannel =
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIInteractionDataResolvedGuildMember
|
||||
extends APIBaseGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
APIGuildMemberJoined {
|
||||
extends APIBaseGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined {
|
||||
permissions: Permissions;
|
||||
}
|
||||
|
||||
@@ -269,6 +264,7 @@ export interface APIInteractionDataResolved {
|
||||
roles?: Record<Snowflake, APIRole>;
|
||||
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
|
||||
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
|
||||
messages?: Record<Snowflake, APIMessage>;
|
||||
attachments?: Record<Snowflake, APIAttachment>;
|
||||
}
|
||||
|
||||
|
||||
@@ -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'>>;
|
||||
}
|
||||
|
||||
@@ -28,8 +28,7 @@ export interface APIModalSubmitRoleSelectComponent extends APIBaseModalSubmitCom
|
||||
values: string[];
|
||||
}
|
||||
|
||||
export interface APIModalSubmitMentionableSelectComponent
|
||||
extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
|
||||
export interface APIModalSubmitMentionableSelectComponent extends APIBaseModalSubmitComponent<ComponentType.MentionableSelect> {
|
||||
values: string[];
|
||||
}
|
||||
|
||||
@@ -41,10 +40,25 @@ export interface APIModalSubmitFileUploadComponent extends APIBaseModalSubmitCom
|
||||
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
|
||||
|
||||
@@ -75,10 +75,15 @@ export type TextChannelType =
|
||||
|
||||
export type GuildChannelType = Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM>;
|
||||
|
||||
export type ApplicationCommandOptionAllowedChannelType = Exclude<
|
||||
ChannelType,
|
||||
ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory
|
||||
>;
|
||||
|
||||
export interface APISlowmodeChannel<T extends ChannelType> extends APIChannelBase<T> {
|
||||
/**
|
||||
* Amount of seconds a user has to wait before sending another message (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval.
|
||||
*
|
||||
@@ -138,10 +143,7 @@ export interface APIGuildChannel<T extends GuildChannelType = GuildChannelType>
|
||||
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
|
||||
|
||||
export interface APIGuildTextChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia | GuildTextChannelType>
|
||||
extends APITextBasedChannel<T>,
|
||||
APIGuildChannel<T>,
|
||||
APISortableChannel,
|
||||
APIPinChannel<T> {
|
||||
extends APITextBasedChannel<T>, APIGuildChannel<T>, APISortableChannel, APIPinChannel<T> {
|
||||
/**
|
||||
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
|
||||
*/
|
||||
@@ -164,10 +166,7 @@ export interface APIGuildCategoryChannel extends APIGuildChannel<ChannelType.Gui
|
||||
}
|
||||
|
||||
export interface APIVoiceChannelBase<T extends GuildChannelType>
|
||||
extends APIGuildChannel<T>,
|
||||
APISortableChannel,
|
||||
APITextBasedChannel<T>,
|
||||
APISlowmodeChannel<T> {
|
||||
extends APIGuildChannel<T>, APISortableChannel, APITextBasedChannel<T>, APISlowmodeChannel<T> {
|
||||
/**
|
||||
* The bitrate (in bits) of the voice or stage channel
|
||||
*/
|
||||
@@ -240,9 +239,7 @@ export interface APIGroupDMChannel extends APIDMChannelBase<ChannelType.GroupDM>
|
||||
export type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread;
|
||||
|
||||
export interface APIThreadChannel<Type extends ThreadChannelType = ThreadChannelType>
|
||||
extends APITextBasedChannel<Type>,
|
||||
APIGuildChannel<Type>,
|
||||
APIPinChannel<Type> {
|
||||
extends APITextBasedChannel<Type>, APIGuildChannel<Type>, APIPinChannel<Type> {
|
||||
/**
|
||||
* The client users member for the thread, only included in select endpoints
|
||||
*/
|
||||
@@ -358,8 +355,7 @@ export enum ForumLayoutType {
|
||||
}
|
||||
|
||||
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
|
||||
extends APIGuildChannel<T>,
|
||||
APISortableChannel {
|
||||
extends APIGuildChannel<T>, APISortableChannel {
|
||||
/**
|
||||
* The channel topic (0-4096 characters)
|
||||
*/
|
||||
@@ -370,7 +366,7 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
|
||||
last_message_id?: Snowflake | null;
|
||||
/**
|
||||
* Amount of seconds a user has to wait before creating another thread (0-21600);
|
||||
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
|
||||
* bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected
|
||||
*
|
||||
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
|
||||
*/
|
||||
|
||||
@@ -350,14 +350,57 @@ export interface GatewayActivityParty {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets}
|
||||
*/
|
||||
export type GatewayActivityAssets = Partial<
|
||||
Record<'large_image' | 'large_text' | 'large_url' | 'small_image' | 'small_text' | 'small_url', string>
|
||||
>;
|
||||
export interface GatewayActivityAssets {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
|
||||
*/
|
||||
large_image?: string;
|
||||
/**
|
||||
* Text displayed when hovering over the large image of the activity
|
||||
*/
|
||||
large_text?: string;
|
||||
/**
|
||||
* URL that is opened when clicking on the large image
|
||||
*/
|
||||
large_url?: string;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image}
|
||||
*/
|
||||
small_image?: string;
|
||||
/**
|
||||
* Text displayed when hovering over the small image of the activity
|
||||
*/
|
||||
small_text?: string;
|
||||
/**
|
||||
* URL that is opened when clicking on the small image
|
||||
*/
|
||||
small_url?: string;
|
||||
/**
|
||||
* Displayed as a banner on a Game Invite.
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image | Activity Asset Image}
|
||||
* @see {@link https://discord.com/developers/docs/discord-social-sdk/development-guides/managing-game-invites | Game Invite}
|
||||
*/
|
||||
invite_cover_image?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets}
|
||||
*/
|
||||
export type GatewayActivitySecrets = Partial<Record<'join' | 'match' | 'spectate', string>>;
|
||||
export interface GatewayActivitySecrets {
|
||||
/**
|
||||
* The secret for joining a party
|
||||
*/
|
||||
join?: string;
|
||||
/**
|
||||
* The secret for spectating a game
|
||||
*/
|
||||
spectate?: string;
|
||||
/**
|
||||
* The secret for a specific instance of a match
|
||||
*/
|
||||
match?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { PresenceUpdateReceiveStatus } from './gateway';
|
||||
import type { OAuth2Scopes } from './oauth2';
|
||||
import type { APIRole } from './permissions';
|
||||
import type { APISticker } from './sticker';
|
||||
import type { APIAvatarDecorationData, APIUser } from './user';
|
||||
import type { APIAvatarDecorationData, APICollectibles, APIUser } from './user';
|
||||
|
||||
export interface APIBaseGuild {
|
||||
/**
|
||||
@@ -127,7 +127,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
* @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object}
|
||||
* @deprecated This field has been deprecated in favor of `rtc_region` on the channel.
|
||||
*/
|
||||
region: string;
|
||||
region?: string | null;
|
||||
/**
|
||||
* ID of afk channel
|
||||
*/
|
||||
@@ -275,7 +275,7 @@ export interface APIGuild extends APIPartialGuild {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object}
|
||||
*/
|
||||
stickers: APISticker[];
|
||||
stickers?: APISticker[];
|
||||
/**
|
||||
* Whether the guild has the boost progress bar enabled.
|
||||
*/
|
||||
@@ -638,7 +638,7 @@ export interface APIGuildPreview {
|
||||
/**
|
||||
* The description for the guild
|
||||
*/
|
||||
description: string;
|
||||
description: string | null;
|
||||
/**
|
||||
* Custom guild stickers
|
||||
*/
|
||||
@@ -695,6 +695,12 @@ export interface APIBaseGuildMember {
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -765,7 +771,8 @@ export interface APIGuildMemberUser {
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object}
|
||||
*/
|
||||
export interface APIGuildMember
|
||||
extends APIBaseGuildMember,
|
||||
extends
|
||||
APIBaseGuildMember,
|
||||
APIBaseVoiceGuildMember,
|
||||
APIFlaggedGuildMember,
|
||||
APIGuildMemberAvatar,
|
||||
|
||||
@@ -181,8 +181,7 @@ export interface APIGuildScheduledEventRecurrenceRuleNWeekday {
|
||||
*/
|
||||
export type GuildScheduledEventRecurrenceRuleNWeekday = APIGuildScheduledEventRecurrenceRuleNWeekday;
|
||||
|
||||
export interface APIStageInstanceGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
export interface APIStageInstanceGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.StageInstance> {
|
||||
channel_id: Snowflake;
|
||||
entity_metadata: null;
|
||||
}
|
||||
@@ -192,8 +191,7 @@ export interface APIVoiceGuildScheduledEvent extends APIGuildScheduledEventBase<
|
||||
entity_metadata: null;
|
||||
}
|
||||
|
||||
export interface APIExternalGuildScheduledEvent
|
||||
extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
export interface APIExternalGuildScheduledEvent extends APIGuildScheduledEventBase<GuildScheduledEventEntityType.External> {
|
||||
channel_id: null;
|
||||
entity_metadata: Required<APIGuildScheduledEventEntityMetadata>;
|
||||
}
|
||||
|
||||
@@ -253,6 +253,10 @@ export interface APIBaseMessageNoChannel {
|
||||
* The call associated with the message
|
||||
*/
|
||||
call?: APIMessageCall;
|
||||
/**
|
||||
* The custom client-side theme shared via the message
|
||||
*/
|
||||
shared_client_theme?: APIMessageSharedClientTheme;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -463,6 +467,38 @@ export interface APIMessageCall {
|
||||
ended_timestamp?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://docs.discord.com/developers/resources/message#base-theme-types
|
||||
*/
|
||||
export enum BaseThemeType {
|
||||
Dark = 1,
|
||||
Light,
|
||||
Darker,
|
||||
Midnight,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://docs.discord.com/developers/resources/message#shared-client-theme-object
|
||||
*/
|
||||
export interface APIMessageSharedClientTheme {
|
||||
/**
|
||||
* The hexadecimal-encoded colors of the theme (max of 5)
|
||||
*/
|
||||
colors: string[];
|
||||
/**
|
||||
* The direction of the theme's colors (max of 360)
|
||||
*/
|
||||
gradient_angle: number;
|
||||
/**
|
||||
* The intensity of the theme's colors (max of 100)
|
||||
*/
|
||||
base_mix: number;
|
||||
/**
|
||||
* The mode of the theme
|
||||
*/
|
||||
base_theme?: BaseThemeType | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#role-subscription-data-object-role-subscription-data-object-structure}
|
||||
*/
|
||||
@@ -810,7 +846,10 @@ export interface APIAttachment {
|
||||
*/
|
||||
filename: string;
|
||||
/**
|
||||
* The title of the file
|
||||
* The original filename of the upload with special characters preserved
|
||||
*
|
||||
* This will be present when the filename contains special characters (e.g. Cyrillic),
|
||||
* in which case the `filename` field will be a sanitized version without those characters
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
@@ -1031,6 +1070,18 @@ export enum ComponentType {
|
||||
* Component for uploading files
|
||||
*/
|
||||
FileUpload,
|
||||
/**
|
||||
* Single-choice set of radio group option
|
||||
*/
|
||||
RadioGroup = 21,
|
||||
/**
|
||||
* Multi-select group of checkboxes
|
||||
*/
|
||||
CheckboxGroup,
|
||||
/**
|
||||
* Single checkbox for binary choice
|
||||
*/
|
||||
Checkbox,
|
||||
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
|
||||
|
||||
/**
|
||||
@@ -1046,8 +1097,9 @@ export enum ComponentType {
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#action-row}
|
||||
*/
|
||||
export interface APIActionRowComponent<T extends APIComponentInActionRow>
|
||||
extends APIBaseComponent<ComponentType.ActionRow> {
|
||||
export interface APIActionRowComponent<
|
||||
T extends APIComponentInActionRow,
|
||||
> extends APIBaseComponent<ComponentType.ActionRow> {
|
||||
/**
|
||||
* The components in the ActionRow
|
||||
*/
|
||||
@@ -1097,10 +1149,9 @@ export interface APIMessageComponentEmoji {
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#button}
|
||||
*/
|
||||
export interface APIButtonComponentWithCustomId
|
||||
extends APIButtonComponentBase<
|
||||
ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success
|
||||
> {
|
||||
export interface APIButtonComponentWithCustomId extends APIButtonComponentBase<
|
||||
ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success
|
||||
> {
|
||||
/**
|
||||
* The custom_id to be sent in the interaction when clicked
|
||||
*/
|
||||
@@ -1312,8 +1363,10 @@ export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuCompon
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#channel-select}
|
||||
*/
|
||||
export interface APIChannelSelectComponent
|
||||
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
|
||||
export interface APIChannelSelectComponent extends APIBaseAutoPopulatedSelectMenuComponent<
|
||||
ComponentType.ChannelSelect,
|
||||
SelectMenuDefaultValueType.Channel
|
||||
> {
|
||||
/**
|
||||
* List of channel types to include in the ChannelSelect component
|
||||
*/
|
||||
@@ -1685,11 +1738,129 @@ export interface APIFileUploadComponent extends APIBaseComponent<ComponentType.F
|
||||
*/
|
||||
max_values?: number;
|
||||
/**
|
||||
* Whether the file upload requires files to be uploaded before submitting the modal (defaults to `true`)
|
||||
* Whether the file upload requires files to be uploaded before submitting the modal
|
||||
*
|
||||
* @defaultValue `true`
|
||||
*/
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#radio-group}
|
||||
*/
|
||||
export interface APIRadioGroupComponent extends APIBaseComponent<ComponentType.RadioGroup> {
|
||||
/**
|
||||
* Id for the radio group; max 100 characters
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* 2-10 radio group options within the radio group component
|
||||
*/
|
||||
options: APIRadioGroupOption[];
|
||||
/**
|
||||
* Whether the radio group requires selection before submitting the modal
|
||||
*
|
||||
* @defaultValue `true`
|
||||
*/
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#radio-group-option-structure}
|
||||
*/
|
||||
export interface APIRadioGroupOption {
|
||||
/**
|
||||
* The value of the radio group option; max 100 characters
|
||||
*/
|
||||
value: string;
|
||||
/**
|
||||
* The label text; max 100 characters
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* An optional description for the radio group option; max 100 characters
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Whether this option is selected by default
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
default?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group}
|
||||
*/
|
||||
export interface APICheckboxGroupComponent extends APIBaseComponent<ComponentType.CheckboxGroup> {
|
||||
/**
|
||||
* Id for the checkbox group; max 100 characters
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Checkbox group option within the component; max 10
|
||||
*/
|
||||
options: APICheckboxGroupOption[];
|
||||
/**
|
||||
* Minimum number of checkbox that can be selected; min 0, max 10
|
||||
*
|
||||
* @defaultValue `1`
|
||||
*/
|
||||
min_values?: number;
|
||||
/**
|
||||
* Maximum number of checkbox that can be selected; min 1, max 10
|
||||
*
|
||||
* @defaultValue {@link APICheckboxGroupComponent.options} length
|
||||
*/
|
||||
max_values?: number;
|
||||
/**
|
||||
* Whether selecting within the group is required before submitting the modal
|
||||
*
|
||||
* @defaultValue `true`
|
||||
*/
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox-group-option-structure}
|
||||
*/
|
||||
export interface APICheckboxGroupOption {
|
||||
/**
|
||||
* The value of the checkbox group option; max 100 characters
|
||||
*/
|
||||
value: string;
|
||||
/**
|
||||
* The label text; max 100 characters
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* An optional description for the checkbox group option; max 100 characters;
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Whether this option is selected by default
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
default?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#checkbox}
|
||||
*/
|
||||
export interface APICheckboxComponent extends APIBaseComponent<ComponentType.Checkbox> {
|
||||
/**
|
||||
* Id for the checkbox; max 100 characters
|
||||
*/
|
||||
custom_id: string;
|
||||
/**
|
||||
* Whether this checkbox is selected by default
|
||||
*
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
default?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#message-snapshot-object}
|
||||
*/
|
||||
@@ -1770,7 +1941,13 @@ export type APIComponentInModalActionRow = APITextInputComponent;
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#label-label-child-components}
|
||||
*/
|
||||
export type APIComponentInLabel = APIFileUploadComponent | APISelectMenuComponent | APITextInputComponent;
|
||||
export type APIComponentInLabel =
|
||||
| APICheckboxComponent
|
||||
| APICheckboxGroupComponent
|
||||
| APIFileUploadComponent
|
||||
| APIRadioGroupComponent
|
||||
| APISelectMenuComponent
|
||||
| APITextInputComponent;
|
||||
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/components/reference#section}
|
||||
|
||||
@@ -19,13 +19,14 @@ export interface APIRole {
|
||||
/**
|
||||
* 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;
|
||||
colors: APIRoleColors;
|
||||
/**
|
||||
* If this role is pinned in the user listing
|
||||
*/
|
||||
|
||||
@@ -37,7 +37,7 @@ export interface APIPoll extends APIBasePoll, APIPollDefaults {
|
||||
/**
|
||||
* The time when the poll ends (IS08601 timestamp)
|
||||
*/
|
||||
expiry: string;
|
||||
expiry: string | null;
|
||||
/**
|
||||
* The results of the poll
|
||||
*/
|
||||
|
||||
@@ -123,14 +123,8 @@ export interface APIWebhookEventApplicationDeauthorizedData {
|
||||
|
||||
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementDeleteData = APIEntitlement;
|
||||
|
||||
/**
|
||||
* @unstable
|
||||
*/
|
||||
export type APIWebhookEventEntitlementUpdateData = APIEntitlement;
|
||||
|
||||
export type APIWebhookEventQuestUserEnrollmentData = never;
|
||||
@@ -201,14 +195,10 @@ export enum ApplicationWebhookEventType {
|
||||
EntitlementCreate = 'ENTITLEMENT_CREATE',
|
||||
/**
|
||||
* Entitlement was updated
|
||||
*
|
||||
* @unstable This event is not yet documented but can be enabled from the developer portal
|
||||
*/
|
||||
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
|
||||
/**
|
||||
* Entitlement was deleted
|
||||
*
|
||||
* @unstable This event is not yet documented but can be enabled from the developer portal
|
||||
*/
|
||||
EntitlementDelete = 'ENTITLEMENT_DELETE',
|
||||
/**
|
||||
|
||||
@@ -3,8 +3,7 @@ import type { ChannelType } from '../../../channel';
|
||||
import type { APIApplicationCommandOptionBase, APIInteractionDataOptionBase } from './base';
|
||||
import type { ApplicationCommandOptionType } from './shared';
|
||||
|
||||
export interface APIApplicationCommandChannelOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
export interface APIApplicationCommandChannelOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Channel> {
|
||||
channel_types?: Exclude<ChannelType, ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildDirectory>[];
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
} from './base';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
|
||||
export interface APIApplicationCommandIntegerOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
|
||||
export interface APIApplicationCommandIntegerOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Integer> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
*/
|
||||
@@ -23,10 +22,11 @@ export type APIApplicationCommandIntegerOption = APIApplicationCommandOptionWith
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption<Type extends InteractionType = InteractionType>
|
||||
extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Integer,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
export interface APIApplicationCommandInteractionDataIntegerOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Integer,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
} from './base';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
|
||||
export interface APIApplicationCommandNumberOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
|
||||
export interface APIApplicationCommandNumberOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Number> {
|
||||
/**
|
||||
* If the option is an `INTEGER` or `NUMBER` type, the minimum value permitted.
|
||||
*/
|
||||
@@ -23,10 +22,11 @@ export type APIApplicationCommandNumberOption = APIApplicationCommandOptionWithA
|
||||
APIApplicationCommandOptionChoice<number>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataNumberOption<Type extends InteractionType = InteractionType>
|
||||
extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Number,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
export interface APIApplicationCommandInteractionDataNumberOption<
|
||||
Type extends InteractionType = InteractionType,
|
||||
> extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.Number,
|
||||
Type extends InteractionType.ApplicationCommandAutocomplete ? string : number
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@ import type {
|
||||
} from './base';
|
||||
import type { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from './shared';
|
||||
|
||||
export interface APIApplicationCommandStringOptionBase
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
|
||||
export interface APIApplicationCommandStringOptionBase extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.String> {
|
||||
/**
|
||||
* For option type `STRING`, the minimum allowed length (minimum of `0`, maximum of `6000`).
|
||||
*/
|
||||
@@ -22,7 +21,9 @@ export type APIApplicationCommandStringOption = APIApplicationCommandOptionWithA
|
||||
APIApplicationCommandOptionChoice<string>
|
||||
>;
|
||||
|
||||
export interface APIApplicationCommandInteractionDataStringOption
|
||||
extends APIInteractionDataOptionBase<ApplicationCommandOptionType.String, string> {
|
||||
export interface APIApplicationCommandInteractionDataStringOption extends APIInteractionDataOptionBase<
|
||||
ApplicationCommandOptionType.String,
|
||||
string
|
||||
> {
|
||||
focused?: boolean;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@ import type { APIApplicationCommandBasicOption, APIApplicationCommandInteraction
|
||||
import type { APIApplicationCommandOptionBase } from './base';
|
||||
import type { ApplicationCommandOptionType } from './shared';
|
||||
|
||||
export interface APIApplicationCommandSubcommandOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
export interface APIApplicationCommandSubcommandOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.Subcommand> {
|
||||
options?: APIApplicationCommandBasicOption[];
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ import type {
|
||||
APIApplicationCommandSubcommandOption,
|
||||
} from './subcommand';
|
||||
|
||||
export interface APIApplicationCommandSubcommandGroupOption
|
||||
extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
export interface APIApplicationCommandSubcommandGroupOption extends APIApplicationCommandOptionBase<ApplicationCommandOptionType.SubcommandGroup> {
|
||||
options?: APIApplicationCommandSubcommandOption[];
|
||||
}
|
||||
|
||||
|
||||
@@ -105,8 +105,7 @@ export type APIApplicationCommandInteractionDataBasicOption<Type extends Interac
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIChatInputApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
export interface APIChatInputApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommand>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
@@ -114,8 +113,7 @@ export interface APIChatInputApplicationCommandInteractionData
|
||||
/**
|
||||
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data}
|
||||
*/
|
||||
export interface APIAutocompleteApplicationCommandInteractionData
|
||||
extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
export interface APIAutocompleteApplicationCommandInteractionData extends APIBaseApplicationCommandInteractionData<ApplicationCommandType.ChatInput> {
|
||||
options?: APIApplicationCommandInteractionDataOption<InteractionType.ApplicationCommandAutocomplete>[];
|
||||
resolved?: APIInteractionDataResolved;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user