chapterjs 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/asset.d.ts +46 -0
- package/dist/assets/asset.js +86 -0
- package/dist/assets/public.d.ts +19 -0
- package/dist/assets/public.js +120 -0
- package/dist/cache/cache.d.ts +62 -0
- package/dist/cache/cache.js +80 -0
- package/dist/cache/store.d.ts +45 -0
- package/dist/cache/store.js +53 -0
- package/dist/cli/build.d.ts +41 -0
- package/dist/cli/build.js +205 -0
- package/dist/cli/cli.js +108 -25
- package/dist/cli/cluster.d.ts +70 -0
- package/dist/cli/cluster.js +213 -0
- package/dist/cli/dev.d.ts +18 -1
- package/dist/cli/dev.js +253 -198
- package/dist/cli/env.d.ts +31 -0
- package/dist/cli/env.js +93 -0
- package/dist/cli/log.d.ts +13 -0
- package/dist/cli/log.js +17 -0
- package/dist/cli/node-version.d.ts +8 -0
- package/dist/cli/node-version.js +13 -0
- package/dist/cli/preflight.d.ts +36 -0
- package/dist/cli/preflight.js +122 -0
- package/dist/cli/project.d.ts +135 -0
- package/dist/cli/project.js +517 -0
- package/dist/cli/start.d.ts +25 -0
- package/dist/cli/start.js +225 -0
- package/dist/commands/autocomplete.d.ts +13 -0
- package/dist/commands/autocomplete.js +159 -0
- package/dist/commands/command.d.ts +360 -0
- package/dist/commands/command.js +28 -0
- package/dist/commands/declaration.d.ts +77 -0
- package/dist/commands/declaration.js +492 -0
- package/dist/commands/register.d.ts +18 -0
- package/dist/commands/register.js +42 -0
- package/dist/commands/router.d.ts +20 -0
- package/dist/commands/router.js +228 -0
- package/dist/commands/tree.d.ts +47 -0
- package/dist/commands/tree.js +216 -0
- package/dist/commands/twins.d.ts +15 -0
- package/dist/commands/twins.js +78 -0
- package/dist/components/button.d.ts +79 -0
- package/dist/components/button.js +106 -0
- package/dist/components/component.d.ts +140 -0
- package/dist/components/component.js +39 -0
- package/dist/components/custom-id.d.ts +72 -0
- package/dist/components/custom-id.js +128 -0
- package/dist/components/declaration.d.ts +42 -0
- package/dist/components/declaration.js +342 -0
- package/dist/components/declared.d.ts +29 -0
- package/dist/components/declared.js +49 -0
- package/dist/components/embed.d.ts +29 -0
- package/dist/components/embed.js +11 -0
- package/dist/components/instance.d.ts +100 -0
- package/dist/components/instance.js +86 -0
- package/dist/components/layout.d.ts +103 -0
- package/dist/components/layout.js +279 -0
- package/dist/components/modal.d.ts +245 -0
- package/dist/components/modal.js +398 -0
- package/dist/components/options.d.ts +41 -0
- package/dist/components/options.js +101 -0
- package/dist/components/render.d.ts +12 -0
- package/dist/components/render.js +58 -0
- package/dist/components/router.d.ts +19 -0
- package/dist/components/router.js +251 -0
- package/dist/components/select.d.ts +146 -0
- package/dist/components/select.js +179 -0
- package/dist/core/bot.d.ts +99 -0
- package/dist/core/bot.js +174 -0
- package/dist/core/memory.d.ts +66 -0
- package/dist/core/memory.js +115 -0
- package/dist/discord/api.d.ts +112 -0
- package/dist/discord/api.js +115 -0
- package/dist/discord/cdn.d.ts +67 -0
- package/dist/discord/cdn.js +100 -0
- package/dist/discord/codes.d.ts +171 -0
- package/dist/discord/codes.js +421 -0
- package/dist/discord/endpoint.d.ts +56 -0
- package/dist/discord/endpoint.js +53 -0
- package/dist/discord/endpoints.d.ts +1529 -0
- package/dist/discord/endpoints.js +1139 -0
- package/dist/discord/formatting.d.ts +67 -0
- package/dist/discord/formatting.js +87 -0
- package/dist/discord/index.d.ts +10 -0
- package/dist/discord/index.js +13 -0
- package/dist/discord/intents.d.ts +48 -0
- package/dist/discord/intents.js +128 -0
- package/dist/discord/permissions.d.ts +94 -0
- package/dist/discord/permissions.js +185 -0
- package/dist/discord/snowflake.d.ts +21 -0
- package/dist/discord/snowflake.js +36 -0
- package/dist/discord/types/application-command.d.ts +332 -0
- package/dist/discord/types/application-command.js +48 -0
- package/dist/discord/types/application-role-connection-metadata.d.ts +42 -0
- package/dist/discord/types/application-role-connection-metadata.js +22 -0
- package/dist/discord/types/application.d.ts +208 -0
- package/dist/discord/types/application.js +48 -0
- package/dist/discord/types/audit-log.d.ts +255 -0
- package/dist/discord/types/audit-log.js +144 -0
- package/dist/discord/types/auto-moderation.d.ts +167 -0
- package/dist/discord/types/auto-moderation.js +52 -0
- package/dist/discord/types/channel.d.ts +557 -0
- package/dist/discord/types/channel.js +88 -0
- package/dist/discord/types/common.d.ts +54 -0
- package/dist/discord/types/common.js +38 -0
- package/dist/discord/types/component.d.ts +775 -0
- package/dist/discord/types/component.js +76 -0
- package/dist/discord/types/emoji.d.ts +74 -0
- package/dist/discord/types/emoji.js +1 -0
- package/dist/discord/types/entitlement.d.ts +84 -0
- package/dist/discord/types/entitlement.js +22 -0
- package/dist/discord/types/gateway-events.d.ts +1148 -0
- package/dist/discord/types/gateway-events.js +54 -0
- package/dist/discord/types/gateway.d.ts +38 -0
- package/dist/discord/types/gateway.js +1 -0
- package/dist/discord/types/guild-scheduled-event.d.ts +257 -0
- package/dist/discord/types/guild-scheduled-event.js +68 -0
- package/dist/discord/types/guild-template.d.ts +51 -0
- package/dist/discord/types/guild-template.js +1 -0
- package/dist/discord/types/guild.d.ts +910 -0
- package/dist/discord/types/guild.js +153 -0
- package/dist/discord/types/index.d.ts +31 -0
- package/dist/discord/types/index.js +31 -0
- package/dist/discord/types/interaction.d.ts +321 -0
- package/dist/discord/types/interaction.js +47 -0
- package/dist/discord/types/invite.d.ts +158 -0
- package/dist/discord/types/invite.js +39 -0
- package/dist/discord/types/message.d.ts +834 -0
- package/dist/discord/types/message.js +159 -0
- package/dist/discord/types/oauth2.d.ts +22 -0
- package/dist/discord/types/oauth2.js +1 -0
- package/dist/discord/types/permissions.d.ts +183 -0
- package/dist/discord/types/permissions.js +118 -0
- package/dist/discord/types/poll.d.ts +106 -0
- package/dist/discord/types/poll.js +8 -0
- package/dist/discord/types/sku.d.ts +47 -0
- package/dist/discord/types/sku.js +26 -0
- package/dist/discord/types/soundboard.d.ts +71 -0
- package/dist/discord/types/soundboard.js +1 -0
- package/dist/discord/types/stage-instance.d.ts +58 -0
- package/dist/discord/types/stage-instance.js +10 -0
- package/dist/discord/types/sticker.d.ts +115 -0
- package/dist/discord/types/sticker.js +20 -0
- package/dist/discord/types/subscription.d.ts +54 -0
- package/dist/discord/types/subscription.js +12 -0
- package/dist/discord/types/team.d.ts +55 -0
- package/dist/discord/types/team.js +21 -0
- package/dist/discord/types/user.d.ts +273 -0
- package/dist/discord/types/user.js +83 -0
- package/dist/discord/types/voice.d.ts +72 -0
- package/dist/discord/types/voice.js +1 -0
- package/dist/discord/types/webhook.d.ts +184 -0
- package/dist/discord/types/webhook.js +12 -0
- package/dist/events/declaration.d.ts +16 -0
- package/dist/events/declaration.js +80 -0
- package/dist/events/event.d.ts +45 -0
- package/dist/events/event.js +34 -0
- package/dist/events/registry.d.ts +697 -0
- package/dist/events/registry.js +839 -0
- package/dist/events/router.d.ts +46 -0
- package/dist/events/router.js +133 -0
- package/dist/gateway/errors.d.ts +18 -0
- package/dist/gateway/errors.js +47 -0
- package/dist/gateway/gateway.d.ts +64 -0
- package/dist/gateway/gateway.js +117 -0
- package/dist/gateway/identify-queue.d.ts +25 -0
- package/dist/gateway/identify-queue.js +29 -0
- package/dist/gateway/shard.d.ts +94 -0
- package/dist/gateway/shard.js +414 -0
- package/dist/gateway/state.d.ts +11 -0
- package/dist/gateway/state.js +184 -0
- package/dist/index.d.ts +57 -18
- package/dist/index.js +40 -12
- package/dist/interactions/cooldown.d.ts +33 -0
- package/dist/interactions/cooldown.js +74 -0
- package/dist/interactions/dispatch.d.ts +91 -0
- package/dist/interactions/dispatch.js +110 -0
- package/dist/loader/generated.d.ts +10 -0
- package/dist/loader/generated.js +80 -0
- package/dist/loader/hot.d.ts +13 -0
- package/dist/loader/hot.js +85 -0
- package/dist/loader/loader.d.ts +85 -0
- package/dist/loader/loader.js +119 -0
- package/dist/loader/locate.d.ts +10 -0
- package/dist/loader/locate.js +36 -0
- package/dist/loader/watch.d.ts +17 -0
- package/dist/loader/watch.js +66 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +5 -0
- package/dist/messages/commands.d.ts +23 -0
- package/dist/messages/commands.js +142 -0
- package/dist/messages/declaration.d.ts +89 -0
- package/dist/messages/declaration.js +455 -0
- package/dist/messages/messages.d.ts +241 -0
- package/dist/messages/messages.js +31 -0
- package/dist/messages/phrases.d.ts +23 -0
- package/dist/messages/phrases.js +44 -0
- package/dist/messages/translate.d.ts +100 -0
- package/dist/messages/translate.js +249 -0
- package/dist/presence/declaration.d.ts +19 -0
- package/dist/presence/declaration.js +118 -0
- package/dist/presence/presence.d.ts +57 -0
- package/dist/presence/presence.js +27 -0
- package/dist/rest/errors.d.ts +55 -0
- package/dist/rest/errors.js +92 -0
- package/dist/rest/rate-limiter.d.ts +46 -0
- package/dist/rest/rate-limiter.js +153 -0
- package/dist/rest/rest.d.ts +63 -0
- package/dist/rest/rest.js +194 -0
- package/dist/structures/base.d.ts +48 -0
- package/dist/structures/base.js +84 -0
- package/dist/structures/channel.d.ts +380 -0
- package/dist/structures/channel.js +627 -0
- package/dist/structures/context.d.ts +30 -0
- package/dist/structures/context.js +7 -0
- package/dist/structures/emoji.d.ts +46 -0
- package/dist/structures/emoji.js +65 -0
- package/dist/structures/entities.d.ts +62 -0
- package/dist/structures/entities.js +226 -0
- package/dist/structures/guild.d.ts +348 -0
- package/dist/structures/guild.js +466 -0
- package/dist/structures/interaction.d.ts +197 -0
- package/dist/structures/interaction.js +396 -0
- package/dist/structures/invite.d.ts +38 -0
- package/dist/structures/invite.js +57 -0
- package/dist/structures/known.d.ts +28 -0
- package/dist/structures/known.js +58 -0
- package/dist/structures/member.d.ts +140 -0
- package/dist/structures/member.js +260 -0
- package/dist/structures/message.d.ts +197 -0
- package/dist/structures/message.js +268 -0
- package/dist/structures/payload.d.ts +91 -0
- package/dist/structures/payload.js +184 -0
- package/dist/structures/role.d.ts +69 -0
- package/dist/structures/role.js +112 -0
- package/dist/structures/user.d.ts +59 -0
- package/dist/structures/user.js +94 -0
- package/dist/structures/webhook.d.ts +46 -0
- package/dist/structures/webhook.js +79 -0
- package/dist/tasks/declaration.d.ts +16 -0
- package/dist/tasks/declaration.js +56 -0
- package/dist/tasks/schedule.d.ts +54 -0
- package/dist/tasks/schedule.js +236 -0
- package/dist/tasks/scheduler.d.ts +35 -0
- package/dist/tasks/scheduler.js +107 -0
- package/dist/tasks/task.d.ts +75 -0
- package/dist/tasks/task.js +27 -0
- package/dist/util/case.d.ts +13 -0
- package/dist/util/case.js +54 -0
- package/dist/util/duration.d.ts +8 -0
- package/dist/util/duration.js +29 -0
- package/dist/util/websocket.d.ts +9 -0
- package/dist/util/websocket.js +31 -0
- package/dist/voice/connection.d.ts +90 -0
- package/dist/voice/connection.js +494 -0
- package/dist/voice/dave.d.ts +109 -0
- package/dist/voice/dave.js +245 -0
- package/dist/voice/opus.d.ts +19 -0
- package/dist/voice/opus.js +273 -0
- package/dist/voice/session.d.ts +55 -0
- package/dist/voice/session.js +405 -0
- package/dist/voice/source.d.ts +22 -0
- package/dist/voice/source.js +195 -0
- package/dist/voice/transport.d.ts +43 -0
- package/dist/voice/transport.js +140 -0
- package/dist/voice/usage.d.ts +4 -0
- package/dist/voice/usage.js +33 -0
- package/package.json +26 -7
- package/vendor/dave/LICENSE +231 -0
- package/vendor/dave/libdave.d.mts +99 -0
- package/vendor/dave/libdave.mjs +2 -0
- package/vendor/dave/libdave.wasm +0 -0
- package/dist/components.d.ts +0 -97
- package/dist/components.js +0 -260
- package/dist/context.d.ts +0 -72
- package/dist/context.js +0 -273
- package/dist/discord/client.d.ts +0 -35
- package/dist/discord/client.js +0 -66
- package/dist/discord/constants.d.ts +0 -49
- package/dist/discord/constants.js +0 -61
- package/dist/discord/events.d.ts +0 -129
- package/dist/discord/events.js +0 -102
- package/dist/discord/gateway.d.ts +0 -61
- package/dist/discord/gateway.js +0 -320
- package/dist/discord/payloads.d.ts +0 -275
- package/dist/discord/payloads.js +0 -3
- package/dist/discord/presence.d.ts +0 -42
- package/dist/discord/presence.js +0 -51
- package/dist/discord/rest.d.ts +0 -49
- package/dist/discord/rest.js +0 -271
- package/dist/discord/types.d.ts +0 -334
- package/dist/discord/types.js +0 -4
- package/dist/events.d.ts +0 -94
- package/dist/events.js +0 -255
- package/dist/presence.d.ts +0 -92
- package/dist/presence.js +0 -250
- package/dist/structures/Channel.d.ts +0 -110
- package/dist/structures/Channel.js +0 -171
- package/dist/structures/Guild.d.ts +0 -70
- package/dist/structures/Guild.js +0 -105
- package/dist/structures/Interaction.d.ts +0 -113
- package/dist/structures/Interaction.js +0 -274
- package/dist/structures/Member.d.ts +0 -70
- package/dist/structures/Member.js +0 -124
- package/dist/structures/Message.d.ts +0 -87
- package/dist/structures/Message.js +0 -182
- package/dist/structures/Reaction.d.ts +0 -38
- package/dist/structures/Reaction.js +0 -64
- package/dist/structures/Role.d.ts +0 -43
- package/dist/structures/Role.js +0 -77
- package/dist/structures/User.d.ts +0 -41
- package/dist/structures/User.js +0 -79
- package/dist/structures/utils.d.ts +0 -72
- package/dist/structures/utils.js +0 -59
- package/dist/utils/errors.d.ts +0 -5
- package/dist/utils/errors.js +0 -28
- package/dist/utils/modules.d.ts +0 -39
- package/dist/utils/modules.js +0 -156
|
@@ -0,0 +1,1139 @@
|
|
|
1
|
+
// Every REST endpoint of the Discord API: method, path and the types of what
|
|
2
|
+
// it takes and returns, as described by the official documentation. Nothing
|
|
3
|
+
// here sends a request: the REST client does, from these descriptions.
|
|
4
|
+
import { endpoint } from './endpoint.js';
|
|
5
|
+
// --------------------------------------------------------------------------
|
|
6
|
+
// https://docs.discord.com/developers/resources/user
|
|
7
|
+
// --------------------------------------------------------------------------
|
|
8
|
+
/**
|
|
9
|
+
* Returns the user object of the requester's account. For OAuth2, this requires the `identify` scope, which will return the object *without* an email, and optionally the `email` scope, which returns the object *with* an email if the user has one.
|
|
10
|
+
* @see https://docs.discord.com/developers/resources/user#get-current-user
|
|
11
|
+
*/
|
|
12
|
+
export const GetCurrentUser = endpoint()('GET', '/users/@me');
|
|
13
|
+
/**
|
|
14
|
+
* Returns a user object for a given user ID.
|
|
15
|
+
* @see https://docs.discord.com/developers/resources/user#get-user
|
|
16
|
+
*/
|
|
17
|
+
export const GetUser = endpoint()('GET', '/users/{user.id}');
|
|
18
|
+
/**
|
|
19
|
+
* Modify the requester's user account settings. Returns a user object on success. Fires a User Update Gateway event.
|
|
20
|
+
* @see https://docs.discord.com/developers/resources/user#modify-current-user
|
|
21
|
+
*/
|
|
22
|
+
export const ModifyCurrentUser = endpoint()('PATCH', '/users/@me');
|
|
23
|
+
/**
|
|
24
|
+
* Returns a list of partial guild objects the current user is a member of. For OAuth2, requires the `guilds` scope.
|
|
25
|
+
* @see https://docs.discord.com/developers/resources/user#get-current-user-guilds
|
|
26
|
+
*/
|
|
27
|
+
export const GetCurrentUserGuilds = endpoint()('GET', '/users/@me/guilds');
|
|
28
|
+
/**
|
|
29
|
+
* Returns a guild member object for the current user. Requires the `guilds.members.read` OAuth2 scope.
|
|
30
|
+
* @see https://docs.discord.com/developers/resources/user#get-current-user-guild-member
|
|
31
|
+
*/
|
|
32
|
+
export const GetCurrentUserGuildMember = endpoint()('GET', '/users/@me/guilds/{guild.id}/member');
|
|
33
|
+
/**
|
|
34
|
+
* Leave a guild. Returns a 204 empty response on success. Fires a Guild Delete Gateway event and a Guild Member Remove Gateway event.
|
|
35
|
+
* @see https://docs.discord.com/developers/resources/user#leave-guild
|
|
36
|
+
*/
|
|
37
|
+
export const LeaveGuild = endpoint()('DELETE', '/users/@me/guilds/{guild.id}');
|
|
38
|
+
/**
|
|
39
|
+
* Create a new DM channel with a user. Returns a DM channel object (if one already exists, it will be returned instead).
|
|
40
|
+
* @see https://docs.discord.com/developers/resources/user#create-dm
|
|
41
|
+
*/
|
|
42
|
+
export const CreateDm = endpoint()('POST', '/users/@me/channels');
|
|
43
|
+
/**
|
|
44
|
+
* Create a new group DM channel with multiple users. Returns a DM channel object. This endpoint was intended to be used with the now-deprecated GameBridge SDK. Fires a Channel Create Gateway event.
|
|
45
|
+
* @see https://docs.discord.com/developers/resources/user#create-group-dm
|
|
46
|
+
*/
|
|
47
|
+
export const CreateGroupDm = endpoint()('POST', '/users/@me/channels');
|
|
48
|
+
/**
|
|
49
|
+
* Returns a list of connection objects. Requires the `connections` OAuth2 scope.
|
|
50
|
+
* @see https://docs.discord.com/developers/resources/user#get-current-user-connections
|
|
51
|
+
*/
|
|
52
|
+
export const GetCurrentUserConnections = endpoint()('GET', '/users/@me/connections');
|
|
53
|
+
/**
|
|
54
|
+
* Returns the application role connection for the user. Requires an OAuth2 access token with `role_connections.write` scope for the application specified in the path.
|
|
55
|
+
* @see https://docs.discord.com/developers/resources/user#get-current-user-application-role-connection
|
|
56
|
+
*/
|
|
57
|
+
export const GetCurrentUserApplicationRoleConnection = endpoint()('GET', '/users/@me/applications/{application.id}/role-connection');
|
|
58
|
+
/**
|
|
59
|
+
* Updates and returns the application role connection for the user. Requires an OAuth2 access token with `role_connections.write` scope for the application specified in the path.
|
|
60
|
+
* @see https://docs.discord.com/developers/resources/user#update-current-user-application-role-connection
|
|
61
|
+
*/
|
|
62
|
+
export const UpdateCurrentUserApplicationRoleConnection = endpoint()('PUT', '/users/@me/applications/{application.id}/role-connection');
|
|
63
|
+
/**
|
|
64
|
+
* Deletes the application role connection for the user. Requires an OAuth2 access token with `role_connections.write` scope for the application specified in the path.
|
|
65
|
+
* @see https://docs.discord.com/developers/resources/user#delete-current-user-application-role-connection
|
|
66
|
+
*/
|
|
67
|
+
export const DeleteCurrentUserApplicationRoleConnection = endpoint()('DELETE', '/users/@me/applications/{application.id}/role-connection');
|
|
68
|
+
// --------------------------------------------------------------------------
|
|
69
|
+
// https://docs.discord.com/developers/resources/guild
|
|
70
|
+
// --------------------------------------------------------------------------
|
|
71
|
+
/**
|
|
72
|
+
* Returns the guild object for the given id. If `with_counts` is set to `true`, this endpoint will also return `approximate_member_count` and `approximate_presence_count` for the guild.
|
|
73
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild
|
|
74
|
+
*/
|
|
75
|
+
export const GetGuild = endpoint()('GET', '/guilds/{guild.id}');
|
|
76
|
+
/**
|
|
77
|
+
* Returns the guild preview object for the given id.
|
|
78
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-preview
|
|
79
|
+
*/
|
|
80
|
+
export const GetGuildPreview = endpoint()('GET', '/guilds/{guild.id}/preview');
|
|
81
|
+
/**
|
|
82
|
+
* Modify a guild's settings. Requires the `MANAGE_GUILD` permission. Returns the updated guild object on success. Fires a Guild Update Gateway event.
|
|
83
|
+
* @see https://docs.discord.com/developers/resources/guild#modify-guild
|
|
84
|
+
*/
|
|
85
|
+
export const ModifyGuild = endpoint()('PATCH', '/guilds/{guild.id}');
|
|
86
|
+
/**
|
|
87
|
+
* Returns a list of guild channel objects. Does not include threads.
|
|
88
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-channels
|
|
89
|
+
*/
|
|
90
|
+
export const GetGuildChannels = endpoint()('GET', '/guilds/{guild.id}/channels');
|
|
91
|
+
/**
|
|
92
|
+
* Create a new channel object for the guild. Requires the `MANAGE_CHANNELS` permission. If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. Setting `MANAGE_ROLES` permission in channels is only possible for guild administrators. Returns the new channel object on success. Fires a Channel Create Gateway event.
|
|
93
|
+
* @see https://docs.discord.com/developers/resources/guild#create-guild-channel
|
|
94
|
+
*/
|
|
95
|
+
export const CreateGuildChannel = endpoint()('POST', '/guilds/{guild.id}/channels');
|
|
96
|
+
/**
|
|
97
|
+
* Modify the positions of a set of channel objects for the guild. Requires `MANAGE_CHANNELS` permission. Returns a 204 empty response on success. Fires multiple Channel Update Gateway events.
|
|
98
|
+
* @see https://docs.discord.com/developers/resources/guild#modify-guild-channel-positions
|
|
99
|
+
*/
|
|
100
|
+
export const ModifyGuildChannelPositions = endpoint()('PATCH', '/guilds/{guild.id}/channels');
|
|
101
|
+
/**
|
|
102
|
+
* Returns all active threads in the guild, including public and private threads. Threads are ordered by their `id`, in descending order.
|
|
103
|
+
* @see https://docs.discord.com/developers/resources/guild#list-active-guild-threads
|
|
104
|
+
*/
|
|
105
|
+
export const ListActiveGuildThreads = endpoint()('GET', '/guilds/{guild.id}/threads/active');
|
|
106
|
+
/**
|
|
107
|
+
* Returns a guild member object for the specified user.
|
|
108
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-member
|
|
109
|
+
*/
|
|
110
|
+
export const GetGuildMember = endpoint()('GET', '/guilds/{guild.id}/members/{user.id}');
|
|
111
|
+
/**
|
|
112
|
+
* Returns a list of guild member objects that are members of the guild.
|
|
113
|
+
* @see https://docs.discord.com/developers/resources/guild#list-guild-members
|
|
114
|
+
*/
|
|
115
|
+
export const ListGuildMembers = endpoint()('GET', '/guilds/{guild.id}/members');
|
|
116
|
+
/**
|
|
117
|
+
* Returns a list of guild member objects whose username or nickname starts with a provided string.
|
|
118
|
+
* @see https://docs.discord.com/developers/resources/guild#search-guild-members
|
|
119
|
+
*/
|
|
120
|
+
export const SearchGuildMembers = endpoint()('GET', '/guilds/{guild.id}/members/search');
|
|
121
|
+
/**
|
|
122
|
+
* Adds a user to the guild, provided you have a valid oauth2 access token for the user with the `guilds.join` scope. Returns a 201 Created with the guild member as the body, or 204 No Content if the user is already a member of the guild. Fires a Guild Member Add Gateway event.
|
|
123
|
+
* @see https://docs.discord.com/developers/resources/guild#add-guild-member
|
|
124
|
+
*/
|
|
125
|
+
export const AddGuildMember = endpoint()('PUT', '/guilds/{guild.id}/members/{user.id}');
|
|
126
|
+
/**
|
|
127
|
+
* Modify attributes of a guild member. Returns a 200 OK with the guild member as the body. Fires a Guild Member Update Gateway event. If the `channel_id` is set to null, this will force the target user to be disconnected from voice.
|
|
128
|
+
* @see https://docs.discord.com/developers/resources/guild#modify-guild-member
|
|
129
|
+
*/
|
|
130
|
+
export const ModifyGuildMember = endpoint()('PATCH', '/guilds/{guild.id}/members/{user.id}');
|
|
131
|
+
/**
|
|
132
|
+
* Modifies the current member in a guild. Returns a 200 with the updated member object on success. Fires a Guild Member Update Gateway event.
|
|
133
|
+
* @see https://docs.discord.com/developers/resources/guild#modify-current-member
|
|
134
|
+
*/
|
|
135
|
+
export const ModifyCurrentMember = endpoint()('PATCH', '/guilds/{guild.id}/members/@me');
|
|
136
|
+
/**
|
|
137
|
+
* Adds a role to a guild member. Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event.
|
|
138
|
+
* @see https://docs.discord.com/developers/resources/guild#add-guild-member-role
|
|
139
|
+
*/
|
|
140
|
+
export const AddGuildMemberRole = endpoint()('PUT', '/guilds/{guild.id}/members/{user.id}/roles/{role.id}');
|
|
141
|
+
/**
|
|
142
|
+
* Removes a role from a guild member. Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event.
|
|
143
|
+
* @see https://docs.discord.com/developers/resources/guild#remove-guild-member-role
|
|
144
|
+
*/
|
|
145
|
+
export const RemoveGuildMemberRole = endpoint()('DELETE', '/guilds/{guild.id}/members/{user.id}/roles/{role.id}');
|
|
146
|
+
/**
|
|
147
|
+
* Remove a member from a guild. Requires `KICK_MEMBERS` permission. Returns a 204 empty response on success. Fires a Guild Member Remove Gateway event.
|
|
148
|
+
* @see https://docs.discord.com/developers/resources/guild#remove-guild-member
|
|
149
|
+
*/
|
|
150
|
+
export const RemoveGuildMember = endpoint()('DELETE', '/guilds/{guild.id}/members/{user.id}');
|
|
151
|
+
/**
|
|
152
|
+
* Returns a list of ban objects for the users banned from this guild. Requires the `BAN_MEMBERS` or `VIEW_AUDIT_LOG` permission.
|
|
153
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-bans
|
|
154
|
+
*/
|
|
155
|
+
export const GetGuildBans = endpoint()('GET', '/guilds/{guild.id}/bans');
|
|
156
|
+
/**
|
|
157
|
+
* Returns a ban object for the given user or a 404 not found if the ban cannot be found. Requires the `BAN_MEMBERS` or `VIEW_AUDIT_LOG` permission.
|
|
158
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-ban
|
|
159
|
+
*/
|
|
160
|
+
export const GetGuildBan = endpoint()('GET', '/guilds/{guild.id}/bans/{user.id}');
|
|
161
|
+
/**
|
|
162
|
+
* Create a guild ban, and optionally delete previous messages sent by the banned user. Requires the `BAN_MEMBERS` permission. Returns a 204 empty response on success. Fires a Guild Ban Add Gateway event.
|
|
163
|
+
* @see https://docs.discord.com/developers/resources/guild#create-guild-ban
|
|
164
|
+
*/
|
|
165
|
+
export const CreateGuildBan = endpoint()('PUT', '/guilds/{guild.id}/bans/{user.id}');
|
|
166
|
+
/**
|
|
167
|
+
* Remove the ban for a user. Requires the `BAN_MEMBERS` permissions. Returns a 204 empty response on success. Fires a Guild Ban Remove Gateway event.
|
|
168
|
+
* @see https://docs.discord.com/developers/resources/guild#remove-guild-ban
|
|
169
|
+
*/
|
|
170
|
+
export const RemoveGuildBan = endpoint()('DELETE', '/guilds/{guild.id}/bans/{user.id}');
|
|
171
|
+
/**
|
|
172
|
+
* Ban up to 200 users from a guild, and optionally delete previous messages sent by the banned users. Requires both the `BAN_MEMBERS` and `MANAGE_GUILD` permissions. Returns a 200 response on success, including the fields `banned_users` with the IDs of the banned users and `failed_users` with IDs that could not be banned or were already banned.
|
|
173
|
+
* @see https://docs.discord.com/developers/resources/guild#bulk-guild-ban
|
|
174
|
+
*/
|
|
175
|
+
export const BulkGuildBan = endpoint()('POST', '/guilds/{guild.id}/bulk-ban');
|
|
176
|
+
/**
|
|
177
|
+
* Returns a list of role objects for the guild.
|
|
178
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-roles
|
|
179
|
+
*/
|
|
180
|
+
export const GetGuildRoles = endpoint()('GET', '/guilds/{guild.id}/roles');
|
|
181
|
+
/**
|
|
182
|
+
* Returns a role object for the specified role.
|
|
183
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-role
|
|
184
|
+
*/
|
|
185
|
+
export const GetGuildRole = endpoint()('GET', '/guilds/{guild.id}/roles/{role.id}');
|
|
186
|
+
/**
|
|
187
|
+
* Returns a map of role IDs to the number of members with the role. Does not include the @everyone role.
|
|
188
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-role-member-counts
|
|
189
|
+
*/
|
|
190
|
+
export const GetGuildRoleMemberCounts = endpoint()('GET', '/guilds/{guild.id}/roles/member-counts');
|
|
191
|
+
/**
|
|
192
|
+
* Create a new role for the guild. Requires the `MANAGE_ROLES` permission. Returns the new role object on success. Fires a Guild Role Create Gateway event. All JSON params are optional.
|
|
193
|
+
* @see https://docs.discord.com/developers/resources/guild#create-guild-role
|
|
194
|
+
*/
|
|
195
|
+
export const CreateGuildRole = endpoint()('POST', '/guilds/{guild.id}/roles');
|
|
196
|
+
/**
|
|
197
|
+
* Modify the positions of a set of role objects for the guild. Requires the `MANAGE_ROLES` permission. Returns a list of all of the guild's role objects on success. Fires multiple Guild Role Update Gateway events.
|
|
198
|
+
* @see https://docs.discord.com/developers/resources/guild#modify-guild-role-positions
|
|
199
|
+
*/
|
|
200
|
+
export const ModifyGuildRolePositions = endpoint()('PATCH', '/guilds/{guild.id}/roles');
|
|
201
|
+
/**
|
|
202
|
+
* Modify a guild role. Requires the `MANAGE_ROLES` permission. Returns the updated role on success. Fires a Guild Role Update Gateway event.
|
|
203
|
+
* @see https://docs.discord.com/developers/resources/guild#modify-guild-role
|
|
204
|
+
*/
|
|
205
|
+
export const ModifyGuildRole = endpoint()('PATCH', '/guilds/{guild.id}/roles/{role.id}');
|
|
206
|
+
/**
|
|
207
|
+
* Delete a guild role. Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a Guild Role Delete Gateway event.
|
|
208
|
+
* @see https://docs.discord.com/developers/resources/guild#delete-guild-role
|
|
209
|
+
*/
|
|
210
|
+
export const DeleteGuildRole = endpoint()('DELETE', '/guilds/{guild.id}/roles/{role.id}');
|
|
211
|
+
/**
|
|
212
|
+
* Returns an object with one `pruned` key indicating the number of members that would be removed in a prune operation. Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions, unless the guild has the `PRUNE_REQUIRES_ADMIN` guild feature, in which case it requires the `ADMINISTRATOR` permission.
|
|
213
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-prune-count
|
|
214
|
+
*/
|
|
215
|
+
export const GetGuildPruneCount = endpoint()('GET', '/guilds/{guild.id}/prune');
|
|
216
|
+
/**
|
|
217
|
+
* Begin a prune operation. Requires the `MANAGE_GUILD` and `KICK_MEMBERS` permissions, unless the guild has the `PRUNE_REQUIRES_ADMIN` guild feature, in which case it requires the `ADMINISTRATOR` permission. Returns an object with one `pruned` key indicating the number of members that were removed in the prune operation. For large guilds it's recommended to set the `compute_prune_count` option to `false`, forcing `pruned` to `null`. Fires multiple Guild Member Remove Gateway events.
|
|
218
|
+
* @see https://docs.discord.com/developers/resources/guild#begin-guild-prune
|
|
219
|
+
*/
|
|
220
|
+
export const BeginGuildPrune = endpoint()('POST', '/guilds/{guild.id}/prune');
|
|
221
|
+
/**
|
|
222
|
+
* Returns a list of voice region objects for the guild. Unlike the similar `/voice` route, this returns VIP servers when the guild is VIP-enabled.
|
|
223
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-voice-regions
|
|
224
|
+
*/
|
|
225
|
+
export const GetGuildVoiceRegions = endpoint()('GET', '/guilds/{guild.id}/regions');
|
|
226
|
+
/**
|
|
227
|
+
* Returns a list of invite objects. Requires the `MANAGE_GUILD` or `VIEW_AUDIT_LOG` permission. Invite Metadata is included with the `MANAGE_GUILD` permission.
|
|
228
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-invites
|
|
229
|
+
*/
|
|
230
|
+
export const GetGuildInvites = endpoint()('GET', '/guilds/{guild.id}/invites');
|
|
231
|
+
/**
|
|
232
|
+
* Returns a list of integration objects for the guild. Requires the `MANAGE_GUILD` permission.
|
|
233
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-integrations
|
|
234
|
+
*/
|
|
235
|
+
export const GetGuildIntegrations = endpoint()('GET', '/guilds/{guild.id}/integrations');
|
|
236
|
+
/**
|
|
237
|
+
* Delete the attached integration object for the guild. Deletes any associated webhooks and kicks the associated bot if there is one. Requires the `MANAGE_GUILD` permission. Returns a 204 empty response on success. Fires Guild Integrations Update and Integration Delete Gateway events.
|
|
238
|
+
* @see https://docs.discord.com/developers/resources/guild#delete-guild-integration
|
|
239
|
+
*/
|
|
240
|
+
export const DeleteGuildIntegration = endpoint()('DELETE', '/guilds/{guild.id}/integrations/{integration.id}');
|
|
241
|
+
/**
|
|
242
|
+
* Returns a guild widget settings object. Requires the `MANAGE_GUILD` permission.
|
|
243
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-widget-settings
|
|
244
|
+
*/
|
|
245
|
+
export const GetGuildWidgetSettings = endpoint()('GET', '/guilds/{guild.id}/widget');
|
|
246
|
+
/**
|
|
247
|
+
* Modify a guild widget settings object for the guild. All attributes may be passed in with JSON and modified. Requires the `MANAGE_GUILD` permission. Returns the updated guild widget settings object. Fires a Guild Update Gateway event.
|
|
248
|
+
* @see https://docs.discord.com/developers/resources/guild#modify-guild-widget
|
|
249
|
+
*/
|
|
250
|
+
export const ModifyGuildWidget = endpoint()('PATCH', '/guilds/{guild.id}/widget');
|
|
251
|
+
/**
|
|
252
|
+
* Returns the widget for the guild. Fires an Invite Create Gateway event when an invite channel is defined and a new Invite is generated.
|
|
253
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-widget
|
|
254
|
+
*/
|
|
255
|
+
export const GetGuildWidget = endpoint()('GET', '/guilds/{guild.id}/widget.json');
|
|
256
|
+
/**
|
|
257
|
+
* Returns a partial invite object for guilds with that feature enabled. Requires the `MANAGE_GUILD` permission. `code` will be null if a vanity url for the guild is not set.
|
|
258
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-vanity-url
|
|
259
|
+
*/
|
|
260
|
+
export const GetGuildVanityUrl = endpoint()('GET', '/guilds/{guild.id}/vanity-url');
|
|
261
|
+
/**
|
|
262
|
+
* Returns the Welcome Screen object for the guild. If the welcome screen is not enabled, the `MANAGE_GUILD` permission is required.
|
|
263
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-welcome-screen
|
|
264
|
+
*/
|
|
265
|
+
export const GetGuildWelcomeScreen = endpoint()('GET', '/guilds/{guild.id}/welcome-screen');
|
|
266
|
+
/**
|
|
267
|
+
* Modify the guild's Welcome Screen. Requires the `MANAGE_GUILD` permission. Returns the updated Welcome Screen object. May fire a Guild Update Gateway event.
|
|
268
|
+
* @see https://docs.discord.com/developers/resources/guild#modify-guild-welcome-screen
|
|
269
|
+
*/
|
|
270
|
+
export const ModifyGuildWelcomeScreen = endpoint()('PATCH', '/guilds/{guild.id}/welcome-screen');
|
|
271
|
+
/**
|
|
272
|
+
* Returns the Onboarding object for the guild.
|
|
273
|
+
* @see https://docs.discord.com/developers/resources/guild#get-guild-onboarding
|
|
274
|
+
*/
|
|
275
|
+
export const GetGuildOnboarding = endpoint()('GET', '/guilds/{guild.id}/onboarding');
|
|
276
|
+
/**
|
|
277
|
+
* Modifies the onboarding configuration of the guild. Returns a 200 with the Onboarding object for the guild. Requires the `MANAGE_GUILD` and `MANAGE_ROLES` permissions.
|
|
278
|
+
* @see https://docs.discord.com/developers/resources/guild#modify-guild-onboarding
|
|
279
|
+
*/
|
|
280
|
+
export const ModifyGuildOnboarding = endpoint()('PUT', '/guilds/{guild.id}/onboarding');
|
|
281
|
+
/**
|
|
282
|
+
* Modifies the incident actions of the guild. Returns a 200 with the Incidents Data object for the guild. Requires the `MANAGE_GUILD` permission.
|
|
283
|
+
* @see https://docs.discord.com/developers/resources/guild#modify-guild-incident-actions
|
|
284
|
+
*/
|
|
285
|
+
export const ModifyGuildIncidentActions = endpoint()('PUT', '/guilds/{guild.id}/incident-actions');
|
|
286
|
+
// --------------------------------------------------------------------------
|
|
287
|
+
// https://docs.discord.com/developers/resources/channel
|
|
288
|
+
// --------------------------------------------------------------------------
|
|
289
|
+
/**
|
|
290
|
+
* Get a channel by ID. Returns a channel object. If the channel is a thread, a thread member object is included in the returned result.
|
|
291
|
+
* @see https://docs.discord.com/developers/resources/channel#get-channel
|
|
292
|
+
*/
|
|
293
|
+
export const GetChannel = endpoint()('GET', '/channels/{channel.id}');
|
|
294
|
+
/**
|
|
295
|
+
* Update a channel's settings. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters.
|
|
296
|
+
* @see https://docs.discord.com/developers/resources/channel#modify-channel
|
|
297
|
+
*/
|
|
298
|
+
export const ModifyChannel = endpoint()('PATCH', '/channels/{channel.id}');
|
|
299
|
+
/**
|
|
300
|
+
* Set a voice channel's status. Requires the `SET_VOICE_CHANNEL_STATUS` permission, and additionally the `MANAGE_CHANNELS` permission if the current user is not connected to the voice channel. Fires a Voice Channel Status Update Gateway event.
|
|
301
|
+
* @see https://docs.discord.com/developers/resources/channel#set-voice-channel-status
|
|
302
|
+
*/
|
|
303
|
+
export const SetVoiceChannelStatus = endpoint()('PUT', '/channels/{channel.id}/voice-status');
|
|
304
|
+
/**
|
|
305
|
+
* Delete a channel, or close a private message. Requires the `MANAGE_CHANNELS` permission for the guild, or `MANAGE_THREADS` if the channel is a thread. Deleting a category does not delete its child channels; they will have their `parent_id` removed and a Channel Update Gateway event will fire for each of them. Returns a channel object on success. Fires a Channel Delete Gateway event (or Thread Delete if the channel was a thread).
|
|
306
|
+
* @see https://docs.discord.com/developers/resources/channel#deleteclose-channel
|
|
307
|
+
*/
|
|
308
|
+
export const DeleteCloseChannel = endpoint()('DELETE', '/channels/{channel.id}');
|
|
309
|
+
/**
|
|
310
|
+
* Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the `MANAGE_ROLES` permission. Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a `MANAGE_ROLES` overwrite in the channel). Returns a 204 empty response on success. Fires a Channel Update Gateway event. For more information about permissions, see permissions.
|
|
311
|
+
* @see https://docs.discord.com/developers/resources/channel#edit-channel-permissions
|
|
312
|
+
*/
|
|
313
|
+
export const EditChannelPermissions = endpoint()('PUT', '/channels/{channel.id}/permissions/{overwrite.id}');
|
|
314
|
+
/**
|
|
315
|
+
* Returns a list of invite objects (with invite metadata) for the channel. Only usable for guild channels. Requires the `MANAGE_CHANNELS` permission.
|
|
316
|
+
* @see https://docs.discord.com/developers/resources/channel#get-channel-invites
|
|
317
|
+
*/
|
|
318
|
+
export const GetChannelInvites = endpoint()('GET', '/channels/{channel.id}/invites');
|
|
319
|
+
/**
|
|
320
|
+
* Create a new invite object for the channel. Only usable for guild channels. Requires the `CREATE_INSTANT_INVITE` permission. All JSON parameters for this route are optional, however the request body is not. If you are not sending any fields, you still have to send an empty JSON object (`{}`). Returns an invite object. Fires an Invite Create Gateway event.
|
|
321
|
+
* @see https://docs.discord.com/developers/resources/channel#create-channel-invite
|
|
322
|
+
*/
|
|
323
|
+
export const CreateChannelInvite = endpoint()('POST', '/channels/{channel.id}/invites');
|
|
324
|
+
/**
|
|
325
|
+
* Delete a channel permission overwrite for a user or role in a channel. Only usable for guild channels. Requires the `MANAGE_ROLES` permission. Returns a 204 empty response on success. Fires a Channel Update Gateway event. For more information about permissions, see permissions
|
|
326
|
+
* @see https://docs.discord.com/developers/resources/channel#delete-channel-permission
|
|
327
|
+
*/
|
|
328
|
+
export const DeleteChannelPermission = endpoint()('DELETE', '/channels/{channel.id}/permissions/{overwrite.id}');
|
|
329
|
+
/**
|
|
330
|
+
* Follow an Announcement Channel to send messages to a target channel. Requires the `MANAGE_WEBHOOKS` permission in the target channel. Returns a followed channel object. Fires a Webhooks Update Gateway event for the target channel.
|
|
331
|
+
* @see https://docs.discord.com/developers/resources/channel#follow-announcement-channel
|
|
332
|
+
*/
|
|
333
|
+
export const FollowAnnouncementChannel = endpoint()('POST', '/channels/{channel.id}/followers');
|
|
334
|
+
/**
|
|
335
|
+
* Post a typing indicator for the specified channel, which expires after 10 seconds. Returns a 204 empty response on success. Fires a Typing Start Gateway event.
|
|
336
|
+
* @see https://docs.discord.com/developers/resources/channel#trigger-typing-indicator
|
|
337
|
+
*/
|
|
338
|
+
export const TriggerTypingIndicator = endpoint()('POST', '/channels/{channel.id}/typing');
|
|
339
|
+
/**
|
|
340
|
+
* Adds a recipient to a Group DM using their access token.
|
|
341
|
+
* @see https://docs.discord.com/developers/resources/channel#group-dm-add-recipient
|
|
342
|
+
*/
|
|
343
|
+
export const GroupDmAddRecipient = endpoint()('PUT', '/channels/{channel.id}/recipients/{user.id}');
|
|
344
|
+
/**
|
|
345
|
+
* Removes a recipient from a Group DM.
|
|
346
|
+
* @see https://docs.discord.com/developers/resources/channel#group-dm-remove-recipient
|
|
347
|
+
*/
|
|
348
|
+
export const GroupDmRemoveRecipient = endpoint()('DELETE', '/channels/{channel.id}/recipients/{user.id}');
|
|
349
|
+
/**
|
|
350
|
+
* Creates a new thread from an existing message. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create and a Message Update Gateway event.
|
|
351
|
+
* @see https://docs.discord.com/developers/resources/channel#start-thread-from-message
|
|
352
|
+
*/
|
|
353
|
+
export const StartThreadFromMessage = endpoint()('POST', '/channels/{channel.id}/messages/{message.id}/threads');
|
|
354
|
+
/**
|
|
355
|
+
* Creates a new thread that is not connected to an existing message. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create Gateway event.
|
|
356
|
+
* @see https://docs.discord.com/developers/resources/channel#start-thread-without-message
|
|
357
|
+
*/
|
|
358
|
+
export const StartThreadWithoutMessage = endpoint()('POST', '/channels/{channel.id}/threads');
|
|
359
|
+
/**
|
|
360
|
+
* Creates a new thread in a forum or a media channel, and sends a message within the created thread. Returns a channel, with a nested message object, on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create and Message Create Gateway event.
|
|
361
|
+
* @see https://docs.discord.com/developers/resources/channel#start-thread-in-forum-or-media-channel
|
|
362
|
+
*/
|
|
363
|
+
export const StartThreadInForumOrMediaChannel = endpoint()('POST', '/channels/{channel.id}/threads');
|
|
364
|
+
/**
|
|
365
|
+
* Adds the current user to a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update and a Thread Create Gateway event.
|
|
366
|
+
* @see https://docs.discord.com/developers/resources/channel#join-thread
|
|
367
|
+
*/
|
|
368
|
+
export const JoinThread = endpoint()('PUT', '/channels/{channel.id}/thread-members/@me');
|
|
369
|
+
/**
|
|
370
|
+
* Adds another member to a thread. Requires the ability to send messages in the thread. Also requires the thread is not archived. Returns a 204 empty response if the member is successfully added or was already a member of the thread. Fires a Thread Members Update Gateway event.
|
|
371
|
+
* @see https://docs.discord.com/developers/resources/channel#add-thread-member
|
|
372
|
+
*/
|
|
373
|
+
export const AddThreadMember = endpoint()('PUT', '/channels/{channel.id}/thread-members/{user.id}');
|
|
374
|
+
/**
|
|
375
|
+
* Removes the current user from a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event.
|
|
376
|
+
* @see https://docs.discord.com/developers/resources/channel#leave-thread
|
|
377
|
+
*/
|
|
378
|
+
export const LeaveThread = endpoint()('DELETE', '/channels/{channel.id}/thread-members/@me');
|
|
379
|
+
/**
|
|
380
|
+
* Removes another member from a thread. Requires the `MANAGE_THREADS` permission, or the creator of the thread if it is a `PRIVATE_THREAD`. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event.
|
|
381
|
+
* @see https://docs.discord.com/developers/resources/channel#remove-thread-member
|
|
382
|
+
*/
|
|
383
|
+
export const RemoveThreadMember = endpoint()('DELETE', '/channels/{channel.id}/thread-members/{user.id}');
|
|
384
|
+
/**
|
|
385
|
+
* Returns a thread member object for the specified user if they are a member of the thread, returns a 404 response otherwise.
|
|
386
|
+
* @see https://docs.discord.com/developers/resources/channel#get-thread-member
|
|
387
|
+
*/
|
|
388
|
+
export const GetThreadMember = endpoint()('GET', '/channels/{channel.id}/thread-members/{user.id}');
|
|
389
|
+
/**
|
|
390
|
+
*
|
|
391
|
+
* @see https://docs.discord.com/developers/resources/channel#list-thread-members
|
|
392
|
+
*/
|
|
393
|
+
export const ListThreadMembers = endpoint()('GET', '/channels/{channel.id}/thread-members');
|
|
394
|
+
/**
|
|
395
|
+
* Returns archived threads in the channel that are public. When called on a `GUILD_TEXT` channel, returns threads of type `PUBLIC_THREAD`. When called on a `GUILD_ANNOUNCEMENT` channel returns threads of type `ANNOUNCEMENT_THREAD`. Threads are ordered by `archive_timestamp`, in descending order. Requires the `READ_MESSAGE_HISTORY` permission.
|
|
396
|
+
* @see https://docs.discord.com/developers/resources/channel#list-public-archived-threads
|
|
397
|
+
*/
|
|
398
|
+
export const ListPublicArchivedThreads = endpoint()('GET', '/channels/{channel.id}/threads/archived/public');
|
|
399
|
+
/**
|
|
400
|
+
* Returns archived threads in the channel that are of type `PRIVATE_THREAD`. Threads are ordered by `archive_timestamp`, in descending order. Requires both the `READ_MESSAGE_HISTORY` and `MANAGE_THREADS` permissions.
|
|
401
|
+
* @see https://docs.discord.com/developers/resources/channel#list-private-archived-threads
|
|
402
|
+
*/
|
|
403
|
+
export const ListPrivateArchivedThreads = endpoint()('GET', '/channels/{channel.id}/threads/archived/private');
|
|
404
|
+
/**
|
|
405
|
+
* Returns archived threads in the channel that are of type `PRIVATE_THREAD`, and the user has joined. Threads are ordered by their `id`, in descending order. Requires the `READ_MESSAGE_HISTORY` permission.
|
|
406
|
+
* @see https://docs.discord.com/developers/resources/channel#list-joined-private-archived-threads
|
|
407
|
+
*/
|
|
408
|
+
export const ListJoinedPrivateArchivedThreads = endpoint()('GET', '/channels/{channel.id}/users/@me/threads/archived/private');
|
|
409
|
+
// --------------------------------------------------------------------------
|
|
410
|
+
// https://docs.discord.com/developers/resources/message
|
|
411
|
+
// --------------------------------------------------------------------------
|
|
412
|
+
/**
|
|
413
|
+
* Retrieves the messages in a channel. Returns an array of message objects from newest to oldest on success.
|
|
414
|
+
* @see https://docs.discord.com/developers/resources/message#get-channel-messages
|
|
415
|
+
*/
|
|
416
|
+
export const GetChannelMessages = endpoint()('GET', '/channels/{channel.id}/messages');
|
|
417
|
+
/**
|
|
418
|
+
* Returns a list of messages without the `reactions` key that match a search query in the guild. Requires the `READ_MESSAGE_HISTORY` permission.
|
|
419
|
+
* @see https://docs.discord.com/developers/resources/message#search-guild-messages
|
|
420
|
+
*/
|
|
421
|
+
export const SearchGuildMessages = endpoint()('GET', '/guilds/{guild.id}/messages/search');
|
|
422
|
+
/**
|
|
423
|
+
* Retrieves a specific message in the channel. Returns a message object on success.
|
|
424
|
+
* @see https://docs.discord.com/developers/resources/message#get-channel-message
|
|
425
|
+
*/
|
|
426
|
+
export const GetChannelMessage = endpoint()('GET', '/channels/{channel.id}/messages/{message.id}');
|
|
427
|
+
/**
|
|
428
|
+
*
|
|
429
|
+
* @see https://docs.discord.com/developers/resources/message#create-message
|
|
430
|
+
*/
|
|
431
|
+
export const CreateMessage = endpoint()('POST', '/channels/{channel.id}/messages');
|
|
432
|
+
/**
|
|
433
|
+
* Crosspost a message in an Announcement Channel to following channels. This endpoint requires the `SEND_MESSAGES` permission, if the current user sent the message, or additionally the `MANAGE_MESSAGES` permission, for all other messages, to be present for the current user.
|
|
434
|
+
* @see https://docs.discord.com/developers/resources/message#crosspost-message
|
|
435
|
+
*/
|
|
436
|
+
export const CrosspostMessage = endpoint()('POST', '/channels/{channel.id}/messages/{message.id}/crosspost');
|
|
437
|
+
/**
|
|
438
|
+
* Create a reaction for the message. This endpoint requires the `READ_MESSAGE_HISTORY` permission to be present on the current user. Additionally, if nobody else has reacted to the message using this emoji, this endpoint requires the `ADD_REACTIONS` permission to be present on the current user. Returns a 204 empty response on success. Fires a Message Reaction Add Gateway event.
|
|
439
|
+
* @see https://docs.discord.com/developers/resources/message#create-reaction
|
|
440
|
+
*/
|
|
441
|
+
export const CreateReaction = endpoint()('PUT', '/channels/{channel.id}/messages/{message.id}/reactions/{emoji.id}/@me');
|
|
442
|
+
/**
|
|
443
|
+
* Delete a reaction the current user has made for the message. Returns a 204 empty response on success. Fires a Message Reaction Remove Gateway event.
|
|
444
|
+
* @see https://docs.discord.com/developers/resources/message#delete-own-reaction
|
|
445
|
+
*/
|
|
446
|
+
export const DeleteOwnReaction = endpoint()('DELETE', '/channels/{channel.id}/messages/{message.id}/reactions/{emoji.id}/@me');
|
|
447
|
+
/**
|
|
448
|
+
* Deletes another user's reaction. This endpoint requires the `MANAGE_MESSAGES` permission to be present on the current user. Returns a 204 empty response on success. Fires a Message Reaction Remove Gateway event.
|
|
449
|
+
* @see https://docs.discord.com/developers/resources/message#delete-user-reaction
|
|
450
|
+
*/
|
|
451
|
+
export const DeleteUserReaction = endpoint()('DELETE', '/channels/{channel.id}/messages/{message.id}/reactions/{emoji.id}/{user.id}');
|
|
452
|
+
/**
|
|
453
|
+
* Get a list of users that reacted with this emoji. Returns an array of user objects on success.
|
|
454
|
+
* @see https://docs.discord.com/developers/resources/message#get-reactions
|
|
455
|
+
*/
|
|
456
|
+
export const GetReactions = endpoint()('GET', '/channels/{channel.id}/messages/{message.id}/reactions/{emoji.id}');
|
|
457
|
+
/**
|
|
458
|
+
* Deletes all reactions on a message. This endpoint requires the `MANAGE_MESSAGES` permission to be present on the current user. Fires a Message Reaction Remove All Gateway event.
|
|
459
|
+
* @see https://docs.discord.com/developers/resources/message#delete-all-reactions
|
|
460
|
+
*/
|
|
461
|
+
export const DeleteAllReactions = endpoint()('DELETE', '/channels/{channel.id}/messages/{message.id}/reactions');
|
|
462
|
+
/**
|
|
463
|
+
* Deletes all the reactions for a given emoji on a message. This endpoint requires the `MANAGE_MESSAGES` permission to be present on the current user. Fires a Message Reaction Remove Emoji Gateway event.
|
|
464
|
+
* @see https://docs.discord.com/developers/resources/message#delete-all-reactions-for-emoji
|
|
465
|
+
*/
|
|
466
|
+
export const DeleteAllReactionsForEmoji = endpoint()('DELETE', '/channels/{channel.id}/messages/{message.id}/reactions/{emoji.id}');
|
|
467
|
+
/**
|
|
468
|
+
* Edit a previously sent message. The fields `content`, `embeds`, `flags` and `components` can be edited by the original message author. Other users can only edit `flags` and only if they have the `MANAGE_MESSAGES` permission in the corresponding channel. When specifying flags, ensure to include all previously set flags/bits in addition to ones that you are modifying. Only `flags` documented in the table below may be modified by users (unsupported flag changes are currently ignored without error).
|
|
469
|
+
* @see https://docs.discord.com/developers/resources/message#edit-message
|
|
470
|
+
*/
|
|
471
|
+
export const EditMessage = endpoint()('PATCH', '/channels/{channel.id}/messages/{message.id}');
|
|
472
|
+
/**
|
|
473
|
+
* Delete a message. If operating on a guild channel and trying to delete a message that was not sent by the current user, this endpoint requires the `MANAGE_MESSAGES` permission. Returns a 204 empty response on success. Fires a Message Delete Gateway event.
|
|
474
|
+
* @see https://docs.discord.com/developers/resources/message#delete-message
|
|
475
|
+
*/
|
|
476
|
+
export const DeleteMessage = endpoint()('DELETE', '/channels/{channel.id}/messages/{message.id}');
|
|
477
|
+
/**
|
|
478
|
+
* Delete multiple messages in a single request. This endpoint can only be used on guild channels and requires the `MANAGE_MESSAGES` permission. Returns a 204 empty response on success. Fires a Message Delete Bulk Gateway event.
|
|
479
|
+
* @see https://docs.discord.com/developers/resources/message#bulk-delete-messages
|
|
480
|
+
*/
|
|
481
|
+
export const BulkDeleteMessages = endpoint()('POST', '/channels/{channel.id}/messages/bulk-delete');
|
|
482
|
+
/**
|
|
483
|
+
* Retrieves the list of pins in a channel. Requires the `VIEW_CHANNEL` permission. If the user is missing the `READ_MESSAGE_HISTORY` permission in the channel, then no pins will be returned.
|
|
484
|
+
* @see https://docs.discord.com/developers/resources/message#get-channel-pins
|
|
485
|
+
*/
|
|
486
|
+
export const GetChannelPins = endpoint()('GET', '/channels/{channel.id}/messages/pins');
|
|
487
|
+
/**
|
|
488
|
+
* Pin a message in a channel. Requires the `PIN_MESSAGES` permission. Fires a Channel Pins Update Gateway event.
|
|
489
|
+
* @see https://docs.discord.com/developers/resources/message#pin-message
|
|
490
|
+
*/
|
|
491
|
+
export const PinMessage = endpoint()('PUT', '/channels/{channel.id}/messages/pins/{message.id}');
|
|
492
|
+
/**
|
|
493
|
+
* Unpin a message in a channel. Requires the `PIN_MESSAGES` permission. Returns a 204 empty response on success. Fires a Channel Pins Update Gateway event.
|
|
494
|
+
* @see https://docs.discord.com/developers/resources/message#unpin-message
|
|
495
|
+
*/
|
|
496
|
+
export const UnpinMessage = endpoint()('DELETE', '/channels/{channel.id}/messages/pins/{message.id}');
|
|
497
|
+
// --------------------------------------------------------------------------
|
|
498
|
+
// https://docs.discord.com/developers/resources/emoji
|
|
499
|
+
// --------------------------------------------------------------------------
|
|
500
|
+
/**
|
|
501
|
+
* Returns a list of emoji objects for the given guild. Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
502
|
+
* @see https://docs.discord.com/developers/resources/emoji#list-guild-emojis
|
|
503
|
+
*/
|
|
504
|
+
export const ListGuildEmojis = endpoint()('GET', '/guilds/{guild.id}/emojis');
|
|
505
|
+
/**
|
|
506
|
+
* Returns an emoji object for the given guild and emoji IDs. Includes the `user` field if the bot has the `MANAGE_GUILD_EXPRESSIONS` permission, or if the bot created the emoji and has the `CREATE_GUILD_EXPRESSIONS` permission.
|
|
507
|
+
* @see https://docs.discord.com/developers/resources/emoji#get-guild-emoji
|
|
508
|
+
*/
|
|
509
|
+
export const GetGuildEmoji = endpoint()('GET', '/guilds/{guild.id}/emojis/{emoji.id}');
|
|
510
|
+
/**
|
|
511
|
+
* Create a new emoji for the guild. Requires the `CREATE_GUILD_EXPRESSIONS` permission. Returns the new emoji object on success. Fires a Guild Emojis Update Gateway event.
|
|
512
|
+
* @see https://docs.discord.com/developers/resources/emoji#create-guild-emoji
|
|
513
|
+
*/
|
|
514
|
+
export const CreateGuildEmoji = endpoint()('POST', '/guilds/{guild.id}/emojis');
|
|
515
|
+
/**
|
|
516
|
+
* Modify the given emoji. For emojis created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other emojis, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns the updated emoji object on success. Fires a Guild Emojis Update Gateway event.
|
|
517
|
+
* @see https://docs.discord.com/developers/resources/emoji#modify-guild-emoji
|
|
518
|
+
*/
|
|
519
|
+
export const ModifyGuildEmoji = endpoint()('PATCH', '/guilds/{guild.id}/emojis/{emoji.id}');
|
|
520
|
+
/**
|
|
521
|
+
* Delete the given emoji. For emojis created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other emojis, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns `204 No Content` on success. Fires a Guild Emojis Update Gateway event.
|
|
522
|
+
* @see https://docs.discord.com/developers/resources/emoji#delete-guild-emoji
|
|
523
|
+
*/
|
|
524
|
+
export const DeleteGuildEmoji = endpoint()('DELETE', '/guilds/{guild.id}/emojis/{emoji.id}');
|
|
525
|
+
/**
|
|
526
|
+
* Returns an object containing a list of emoji objects for the given application under the `items` key. Includes a `user` object for the team member that uploaded the emoji from the app's settings, or for the bot user if uploaded using the API.
|
|
527
|
+
* @see https://docs.discord.com/developers/resources/emoji#list-application-emojis
|
|
528
|
+
*/
|
|
529
|
+
export const ListApplicationEmojis = endpoint()('GET', '/applications/{application.id}/emojis');
|
|
530
|
+
/**
|
|
531
|
+
* Returns an emoji object for the given application and emoji IDs. Includes the `user` field.
|
|
532
|
+
* @see https://docs.discord.com/developers/resources/emoji#get-application-emoji
|
|
533
|
+
*/
|
|
534
|
+
export const GetApplicationEmoji = endpoint()('GET', '/applications/{application.id}/emojis/{emoji.id}');
|
|
535
|
+
/**
|
|
536
|
+
* Create a new emoji for the application. Returns the new emoji object on success.
|
|
537
|
+
* @see https://docs.discord.com/developers/resources/emoji#create-application-emoji
|
|
538
|
+
*/
|
|
539
|
+
export const CreateApplicationEmoji = endpoint()('POST', '/applications/{application.id}/emojis');
|
|
540
|
+
/**
|
|
541
|
+
* Modify the given emoji. Returns the updated emoji object on success.
|
|
542
|
+
* @see https://docs.discord.com/developers/resources/emoji#modify-application-emoji
|
|
543
|
+
*/
|
|
544
|
+
export const ModifyApplicationEmoji = endpoint()('PATCH', '/applications/{application.id}/emojis/{emoji.id}');
|
|
545
|
+
/**
|
|
546
|
+
* Delete the given emoji. Returns `204 No Content` on success.
|
|
547
|
+
* @see https://docs.discord.com/developers/resources/emoji#delete-application-emoji
|
|
548
|
+
*/
|
|
549
|
+
export const DeleteApplicationEmoji = endpoint()('DELETE', '/applications/{application.id}/emojis/{emoji.id}');
|
|
550
|
+
// --------------------------------------------------------------------------
|
|
551
|
+
// https://docs.discord.com/developers/resources/sticker
|
|
552
|
+
// --------------------------------------------------------------------------
|
|
553
|
+
/**
|
|
554
|
+
* Returns a sticker object for the given sticker ID.
|
|
555
|
+
* @see https://docs.discord.com/developers/resources/sticker#get-sticker
|
|
556
|
+
*/
|
|
557
|
+
export const GetSticker = endpoint()('GET', '/stickers/{sticker.id}');
|
|
558
|
+
/**
|
|
559
|
+
* Returns a list of available sticker packs.
|
|
560
|
+
* @see https://docs.discord.com/developers/resources/sticker#list-sticker-packs
|
|
561
|
+
*/
|
|
562
|
+
export const ListStickerPacks = endpoint()('GET', '/sticker-packs');
|
|
563
|
+
/**
|
|
564
|
+
* Returns a sticker pack object for the given sticker pack ID.
|
|
565
|
+
* @see https://docs.discord.com/developers/resources/sticker#get-sticker-pack
|
|
566
|
+
*/
|
|
567
|
+
export const GetStickerPack = endpoint()('GET', '/sticker-packs/{pack.id}');
|
|
568
|
+
/**
|
|
569
|
+
* Returns an array of sticker objects for the given guild. Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
570
|
+
* @see https://docs.discord.com/developers/resources/sticker#list-guild-stickers
|
|
571
|
+
*/
|
|
572
|
+
export const ListGuildStickers = endpoint()('GET', '/guilds/{guild.id}/stickers');
|
|
573
|
+
/**
|
|
574
|
+
* Returns a sticker object for the given guild and sticker IDs. Includes the `user` field if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
575
|
+
* @see https://docs.discord.com/developers/resources/sticker#get-guild-sticker
|
|
576
|
+
*/
|
|
577
|
+
export const GetGuildSticker = endpoint()('GET', '/guilds/{guild.id}/stickers/{sticker.id}');
|
|
578
|
+
/**
|
|
579
|
+
* Create a new sticker for the guild. Send a `multipart/form-data` body as described in Uploading Files. Requires the `CREATE_GUILD_EXPRESSIONS` permission. Returns the new sticker object on success. Fires a Guild Stickers Update Gateway event.
|
|
580
|
+
* @see https://docs.discord.com/developers/resources/sticker#create-guild-sticker
|
|
581
|
+
*/
|
|
582
|
+
export const CreateGuildSticker = endpoint()('POST', '/guilds/{guild.id}/stickers');
|
|
583
|
+
/**
|
|
584
|
+
* Modify the given sticker. For stickers created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns the updated sticker object on success. Fires a Guild Stickers Update Gateway event.
|
|
585
|
+
* @see https://docs.discord.com/developers/resources/sticker#modify-guild-sticker
|
|
586
|
+
*/
|
|
587
|
+
export const ModifyGuildSticker = endpoint()('PATCH', '/guilds/{guild.id}/stickers/{sticker.id}');
|
|
588
|
+
/**
|
|
589
|
+
* Delete the given sticker. For stickers created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other stickers, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns `204 No Content` on success. Fires a Guild Stickers Update Gateway event.
|
|
590
|
+
* @see https://docs.discord.com/developers/resources/sticker#delete-guild-sticker
|
|
591
|
+
*/
|
|
592
|
+
export const DeleteGuildSticker = endpoint()('DELETE', '/guilds/{guild.id}/stickers/{sticker.id}');
|
|
593
|
+
// --------------------------------------------------------------------------
|
|
594
|
+
// https://docs.discord.com/developers/resources/invite
|
|
595
|
+
// --------------------------------------------------------------------------
|
|
596
|
+
/**
|
|
597
|
+
* Returns an invite object for the given code.
|
|
598
|
+
* @see https://docs.discord.com/developers/resources/invite#get-invite
|
|
599
|
+
*/
|
|
600
|
+
export const GetInvite = endpoint()('GET', '/invites/{invite.code}');
|
|
601
|
+
/**
|
|
602
|
+
* Delete an invite. Requires the `MANAGE_CHANNELS` permission on the channel this invite belongs to, or `MANAGE_GUILD` to remove any invite across the guild. Returns an invite object on success. Fires an Invite Delete Gateway event.
|
|
603
|
+
* @see https://docs.discord.com/developers/resources/invite#delete-invite
|
|
604
|
+
*/
|
|
605
|
+
export const DeleteInvite = endpoint()('DELETE', '/invites/{invite.code}');
|
|
606
|
+
/**
|
|
607
|
+
* Gets the users allowed to see and accept this invite. Response is a CSV file with the header `user_id` and each user ID on its own line. Requires the caller to be the inviter, or have `MANAGE_GUILD` permission, or have `VIEW_AUDIT_LOG` permission.
|
|
608
|
+
* @see https://docs.discord.com/developers/resources/invite#get-target-users
|
|
609
|
+
*/
|
|
610
|
+
export const GetTargetUsers = endpoint()('GET', '/invites/{invite.code}/target-users');
|
|
611
|
+
/**
|
|
612
|
+
* Adds a target user to an existing invite. Requires the caller to be the inviter or have the `MANAGE_GUILD` permission. Returns a 204 empty response on success.
|
|
613
|
+
* @see https://docs.discord.com/developers/resources/invite#add-target-user
|
|
614
|
+
*/
|
|
615
|
+
export const AddTargetUser = endpoint()('PUT', '/invites/{invite.code}/target-users/{user.id}');
|
|
616
|
+
/**
|
|
617
|
+
* Removes a target user from an existing invite. Requires the caller to be the inviter or have the `MANAGE_GUILD` permission. Returns a 204 empty response on success.
|
|
618
|
+
* @see https://docs.discord.com/developers/resources/invite#remove-target-user
|
|
619
|
+
*/
|
|
620
|
+
export const RemoveTargetUser = endpoint()('DELETE', '/invites/{invite.code}/target-users/{user.id}');
|
|
621
|
+
/**
|
|
622
|
+
* Updates the users allowed to see and accept this invite. Uploading a file with invalid user IDs will result in a 400 with the invalid IDs described. Requires the caller to be the inviter or have the `MANAGE_GUILD` permission.
|
|
623
|
+
* @see https://docs.discord.com/developers/resources/invite#update-target-users
|
|
624
|
+
*/
|
|
625
|
+
export const UpdateTargetUsers = endpoint()('PUT', '/invites/{invite.code}/target-users');
|
|
626
|
+
/**
|
|
627
|
+
* Adds multiple target users to an existing invite. Requires the caller to be the inviter or have the `MANAGE_GUILD` permission. Returns a 204 empty response on success.
|
|
628
|
+
* @see https://docs.discord.com/developers/resources/invite#bulk-add-target-users
|
|
629
|
+
*/
|
|
630
|
+
export const BulkAddTargetUsers = endpoint()('POST', '/invites/{invite.code}/target-users/bulk-add');
|
|
631
|
+
/**
|
|
632
|
+
* Removes multiple target users from an existing invite. Requires the caller to be the inviter or have the `MANAGE_GUILD` permission. Returns a 204 empty response on success.
|
|
633
|
+
* @see https://docs.discord.com/developers/resources/invite#bulk-delete-target-users
|
|
634
|
+
*/
|
|
635
|
+
export const BulkDeleteTargetUsers = endpoint()('POST', '/invites/{invite.code}/target-users/bulk-delete');
|
|
636
|
+
/**
|
|
637
|
+
* Processing target users from a CSV when creating or updating an invite is done asynchronously. This endpoint allows you to check the status of that job. Requires the caller to be the inviter, or have `MANAGE_GUILD` permission, or have `VIEW_AUDIT_LOG` permission.
|
|
638
|
+
* @see https://docs.discord.com/developers/resources/invite#get-target-users-job-status
|
|
639
|
+
*/
|
|
640
|
+
export const GetTargetUsersJobStatus = endpoint()('GET', '/invites/{invite.code}/target-users/job-status');
|
|
641
|
+
// --------------------------------------------------------------------------
|
|
642
|
+
// https://docs.discord.com/developers/resources/webhook
|
|
643
|
+
// --------------------------------------------------------------------------
|
|
644
|
+
/**
|
|
645
|
+
* Creates a new webhook and returns a webhook object on success. Requires the `MANAGE_WEBHOOKS` permission. Fires a Webhooks Update Gateway event.
|
|
646
|
+
* @see https://docs.discord.com/developers/resources/webhook#create-webhook
|
|
647
|
+
*/
|
|
648
|
+
export const CreateWebhook = endpoint()('POST', '/channels/{channel.id}/webhooks');
|
|
649
|
+
/**
|
|
650
|
+
* Returns a list of channel webhook objects. Requires the `MANAGE_WEBHOOKS` permission.
|
|
651
|
+
* @see https://docs.discord.com/developers/resources/webhook#get-channel-webhooks
|
|
652
|
+
*/
|
|
653
|
+
export const GetChannelWebhooks = endpoint()('GET', '/channels/{channel.id}/webhooks');
|
|
654
|
+
/**
|
|
655
|
+
* Returns a list of guild webhook objects. Requires the `MANAGE_WEBHOOKS` permission.
|
|
656
|
+
* @see https://docs.discord.com/developers/resources/webhook#get-guild-webhooks
|
|
657
|
+
*/
|
|
658
|
+
export const GetGuildWebhooks = endpoint()('GET', '/guilds/{guild.id}/webhooks');
|
|
659
|
+
/**
|
|
660
|
+
* Returns the new webhook object for the given id.
|
|
661
|
+
* @see https://docs.discord.com/developers/resources/webhook#get-webhook
|
|
662
|
+
*/
|
|
663
|
+
export const GetWebhook = endpoint()('GET', '/webhooks/{webhook.id}');
|
|
664
|
+
/**
|
|
665
|
+
* Same as above, except this call does not require authentication and returns no user in the webhook object.
|
|
666
|
+
* @see https://docs.discord.com/developers/resources/webhook#get-webhook-with-token
|
|
667
|
+
*/
|
|
668
|
+
export const GetWebhookWithToken = endpoint()('GET', '/webhooks/{webhook.id}/{webhook.token}');
|
|
669
|
+
/**
|
|
670
|
+
* Modify a webhook. Requires the `MANAGE_WEBHOOKS` permission. Returns the updated webhook object on success. Fires a Webhooks Update Gateway event.
|
|
671
|
+
* @see https://docs.discord.com/developers/resources/webhook#modify-webhook
|
|
672
|
+
*/
|
|
673
|
+
export const ModifyWebhook = endpoint()('PATCH', '/webhooks/{webhook.id}');
|
|
674
|
+
/**
|
|
675
|
+
* Same as above, except this call does not require authentication, does not accept a `channel_id` parameter in the body, and does not return a user in the webhook object.
|
|
676
|
+
* @see https://docs.discord.com/developers/resources/webhook#modify-webhook-with-token
|
|
677
|
+
*/
|
|
678
|
+
export const ModifyWebhookWithToken = endpoint()('PATCH', '/webhooks/{webhook.id}/{webhook.token}');
|
|
679
|
+
/**
|
|
680
|
+
* Delete a webhook permanently. Requires the `MANAGE_WEBHOOKS` permission. Returns a `204 No Content` response on success. Fires a Webhooks Update Gateway event.
|
|
681
|
+
* @see https://docs.discord.com/developers/resources/webhook#delete-webhook
|
|
682
|
+
*/
|
|
683
|
+
export const DeleteWebhook = endpoint()('DELETE', '/webhooks/{webhook.id}');
|
|
684
|
+
/**
|
|
685
|
+
* Same as above, except this call does not require authentication.
|
|
686
|
+
* @see https://docs.discord.com/developers/resources/webhook#delete-webhook-with-token
|
|
687
|
+
*/
|
|
688
|
+
export const DeleteWebhookWithToken = endpoint()('DELETE', '/webhooks/{webhook.id}/{webhook.token}');
|
|
689
|
+
/**
|
|
690
|
+
* Refer to Uploading Files for details on attachments and `multipart/form-data` requests. Returns a message or `204 No Content` depending on the `wait` query parameter.
|
|
691
|
+
* @see https://docs.discord.com/developers/resources/webhook#execute-webhook
|
|
692
|
+
*/
|
|
693
|
+
export const ExecuteWebhook = endpoint()('POST', '/webhooks/{webhook.id}/{webhook.token}');
|
|
694
|
+
/**
|
|
695
|
+
* Returns a previously-sent webhook message from the same token. Returns a message object on success.
|
|
696
|
+
* @see https://docs.discord.com/developers/resources/webhook#get-webhook-message
|
|
697
|
+
*/
|
|
698
|
+
export const GetWebhookMessage = endpoint()('GET', '/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}');
|
|
699
|
+
/**
|
|
700
|
+
* Edits a previously-sent webhook message from the same token. Returns a message object on success.
|
|
701
|
+
* @see https://docs.discord.com/developers/resources/webhook#edit-webhook-message
|
|
702
|
+
*/
|
|
703
|
+
export const EditWebhookMessage = endpoint()('PATCH', '/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}');
|
|
704
|
+
/**
|
|
705
|
+
* Deletes a message that was created by the webhook. Returns a `204 No Content` response on success.
|
|
706
|
+
* @see https://docs.discord.com/developers/resources/webhook#delete-webhook-message
|
|
707
|
+
*/
|
|
708
|
+
export const DeleteWebhookMessage = endpoint()('DELETE', '/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}');
|
|
709
|
+
// --------------------------------------------------------------------------
|
|
710
|
+
// https://docs.discord.com/developers/resources/voice
|
|
711
|
+
// --------------------------------------------------------------------------
|
|
712
|
+
/**
|
|
713
|
+
* Returns an array of voice region objects that can be used when setting a voice or stage channel's `rtc_region`.
|
|
714
|
+
* @see https://docs.discord.com/developers/resources/voice#list-voice-regions
|
|
715
|
+
*/
|
|
716
|
+
export const ListVoiceRegions = endpoint()('GET', '/voice/regions');
|
|
717
|
+
/**
|
|
718
|
+
* Returns the current user's voice state in the guild.
|
|
719
|
+
* @see https://docs.discord.com/developers/resources/voice#get-current-user-voice-state
|
|
720
|
+
*/
|
|
721
|
+
export const GetCurrentUserVoiceState = endpoint()('GET', '/guilds/{guild.id}/voice-states/@me');
|
|
722
|
+
/**
|
|
723
|
+
* Returns the specified user's voice state in the guild.
|
|
724
|
+
* @see https://docs.discord.com/developers/resources/voice#get-user-voice-state
|
|
725
|
+
*/
|
|
726
|
+
export const GetUserVoiceState = endpoint()('GET', '/guilds/{guild.id}/voice-states/{user.id}');
|
|
727
|
+
/**
|
|
728
|
+
* Updates the current user's voice state. Returns `204 No Content` on success. Fires a Voice State Update Gateway event.
|
|
729
|
+
* @see https://docs.discord.com/developers/resources/voice#modify-current-user-voice-state
|
|
730
|
+
*/
|
|
731
|
+
export const ModifyCurrentUserVoiceState = endpoint()('PATCH', '/guilds/{guild.id}/voice-states/@me');
|
|
732
|
+
/**
|
|
733
|
+
* Updates another user's voice state. Returns `204 No Content` on success. Fires a Voice State Update Gateway event.
|
|
734
|
+
* @see https://docs.discord.com/developers/resources/voice#modify-user-voice-state
|
|
735
|
+
*/
|
|
736
|
+
export const ModifyUserVoiceState = endpoint()('PATCH', '/guilds/{guild.id}/voice-states/{user.id}');
|
|
737
|
+
// --------------------------------------------------------------------------
|
|
738
|
+
// https://docs.discord.com/developers/resources/poll
|
|
739
|
+
// --------------------------------------------------------------------------
|
|
740
|
+
/**
|
|
741
|
+
* Get a list of users that voted for this specific answer.
|
|
742
|
+
* @see https://docs.discord.com/developers/resources/poll#get-answer-voters
|
|
743
|
+
*/
|
|
744
|
+
export const GetAnswerVoters = endpoint()('GET', '/channels/{channel.id}/polls/{message.id}/answers/{answer_id}');
|
|
745
|
+
/**
|
|
746
|
+
* Immediately ends the poll. You cannot end polls from other users.
|
|
747
|
+
* @see https://docs.discord.com/developers/resources/poll#end-poll
|
|
748
|
+
*/
|
|
749
|
+
export const EndPoll = endpoint()('POST', '/channels/{channel.id}/polls/{message.id}/expire');
|
|
750
|
+
// --------------------------------------------------------------------------
|
|
751
|
+
// https://docs.discord.com/developers/resources/application
|
|
752
|
+
// --------------------------------------------------------------------------
|
|
753
|
+
/**
|
|
754
|
+
* Returns the application object associated with the requesting bot user.
|
|
755
|
+
* @see https://docs.discord.com/developers/resources/application#get-current-application
|
|
756
|
+
*/
|
|
757
|
+
export const GetCurrentApplication = endpoint()('GET', '/applications/@me');
|
|
758
|
+
/**
|
|
759
|
+
* Edit properties of the app associated with the requesting bot user. Only properties that are passed will be updated. Returns the updated application object on success.
|
|
760
|
+
* @see https://docs.discord.com/developers/resources/application#edit-current-application
|
|
761
|
+
*/
|
|
762
|
+
export const EditCurrentApplication = endpoint()('PATCH', '/applications/@me');
|
|
763
|
+
/**
|
|
764
|
+
* Returns a serialized activity instance, if it exists. Useful for preventing unwanted activity sessions.
|
|
765
|
+
* @see https://docs.discord.com/developers/resources/application#get-application-activity-instance
|
|
766
|
+
*/
|
|
767
|
+
export const GetApplicationActivityInstance = endpoint()('GET', '/applications/{application.id}/activity-instances/{instance_id}');
|
|
768
|
+
// --------------------------------------------------------------------------
|
|
769
|
+
// https://docs.discord.com/developers/resources/application-role-connection-metadata
|
|
770
|
+
// --------------------------------------------------------------------------
|
|
771
|
+
/**
|
|
772
|
+
* Returns a list of application role connection metadata objects for the given application.
|
|
773
|
+
* @see https://docs.discord.com/developers/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
|
|
774
|
+
*/
|
|
775
|
+
export const GetApplicationRoleConnectionMetadataRecords = endpoint()('GET', '/applications/{application.id}/role-connections/metadata');
|
|
776
|
+
/**
|
|
777
|
+
* Updates and returns a list of application role connection metadata objects for the given application.
|
|
778
|
+
* @see https://docs.discord.com/developers/resources/application-role-connection-metadata#update-application-role-connection-metadata-records
|
|
779
|
+
*/
|
|
780
|
+
export const UpdateApplicationRoleConnectionMetadataRecords = endpoint()('PUT', '/applications/{application.id}/role-connections/metadata');
|
|
781
|
+
// --------------------------------------------------------------------------
|
|
782
|
+
// https://docs.discord.com/developers/resources/audit-log
|
|
783
|
+
// --------------------------------------------------------------------------
|
|
784
|
+
/**
|
|
785
|
+
* Returns an audit log object for the guild. Requires the `VIEW_AUDIT_LOG` permission.
|
|
786
|
+
* @see https://docs.discord.com/developers/resources/audit-log#get-guild-audit-log
|
|
787
|
+
*/
|
|
788
|
+
export const GetGuildAuditLog = endpoint()('GET', '/guilds/{guild.id}/audit-logs');
|
|
789
|
+
// --------------------------------------------------------------------------
|
|
790
|
+
// https://docs.discord.com/developers/resources/auto-moderation
|
|
791
|
+
// --------------------------------------------------------------------------
|
|
792
|
+
/**
|
|
793
|
+
* Get a list of all rules currently configured for the guild. Returns a list of auto moderation rule objects for the given guild.
|
|
794
|
+
* @see https://docs.discord.com/developers/resources/auto-moderation#list-auto-moderation-rules-for-guild
|
|
795
|
+
*/
|
|
796
|
+
export const ListAutoModerationRulesForGuild = endpoint()('GET', '/guilds/{guild.id}/auto-moderation/rules');
|
|
797
|
+
/**
|
|
798
|
+
* Get a single rule. Returns an auto moderation rule object.
|
|
799
|
+
* @see https://docs.discord.com/developers/resources/auto-moderation#get-auto-moderation-rule
|
|
800
|
+
*/
|
|
801
|
+
export const GetAutoModerationRule = endpoint()('GET', '/guilds/{guild.id}/auto-moderation/rules/{auto_moderation_rule.id}');
|
|
802
|
+
/**
|
|
803
|
+
* Create a new rule. Returns an auto moderation rule on success. Fires an Auto Moderation Rule Create Gateway event.
|
|
804
|
+
* @see https://docs.discord.com/developers/resources/auto-moderation#create-auto-moderation-rule
|
|
805
|
+
*/
|
|
806
|
+
export const CreateAutoModerationRule = endpoint()('POST', '/guilds/{guild.id}/auto-moderation/rules');
|
|
807
|
+
/**
|
|
808
|
+
* Modify an existing rule. Returns an auto moderation rule on success. Fires an Auto Moderation Rule Update Gateway event.
|
|
809
|
+
* @see https://docs.discord.com/developers/resources/auto-moderation#modify-auto-moderation-rule
|
|
810
|
+
*/
|
|
811
|
+
export const ModifyAutoModerationRule = endpoint()('PATCH', '/guilds/{guild.id}/auto-moderation/rules/{auto_moderation_rule.id}');
|
|
812
|
+
/**
|
|
813
|
+
* Delete a rule. Returns a `204` on success. Fires an Auto Moderation Rule Delete Gateway event.
|
|
814
|
+
* @see https://docs.discord.com/developers/resources/auto-moderation#delete-auto-moderation-rule
|
|
815
|
+
*/
|
|
816
|
+
export const DeleteAutoModerationRule = endpoint()('DELETE', '/guilds/{guild.id}/auto-moderation/rules/{auto_moderation_rule.id}');
|
|
817
|
+
// --------------------------------------------------------------------------
|
|
818
|
+
// https://docs.discord.com/developers/resources/entitlement
|
|
819
|
+
// --------------------------------------------------------------------------
|
|
820
|
+
/**
|
|
821
|
+
* Returns all entitlements for a given app, active and expired.
|
|
822
|
+
* @see https://docs.discord.com/developers/resources/entitlement#list-entitlements
|
|
823
|
+
*/
|
|
824
|
+
export const ListEntitlements = endpoint()('GET', '/applications/{application.id}/entitlements');
|
|
825
|
+
/**
|
|
826
|
+
* Returns an entitlement.
|
|
827
|
+
* @see https://docs.discord.com/developers/resources/entitlement#get-entitlement
|
|
828
|
+
*/
|
|
829
|
+
export const GetEntitlement = endpoint()('GET', '/applications/{application.id}/entitlements/{entitlement.id}');
|
|
830
|
+
/**
|
|
831
|
+
* For One-Time Purchase consumable SKUs, marks a given entitlement for the user as consumed. The entitlement will have `consumed: true` when using List Entitlements.
|
|
832
|
+
* @see https://docs.discord.com/developers/resources/entitlement#consume-an-entitlement
|
|
833
|
+
*/
|
|
834
|
+
export const ConsumeAnEntitlement = endpoint()('POST', '/applications/{application.id}/entitlements/{entitlement.id}/consume');
|
|
835
|
+
/**
|
|
836
|
+
* Creates a test entitlement to a given SKU for a given guild or user. Discord will act as though that user or guild has entitlement to your premium offering.
|
|
837
|
+
* @see https://docs.discord.com/developers/resources/entitlement#create-test-entitlement
|
|
838
|
+
*/
|
|
839
|
+
export const CreateTestEntitlement = endpoint()('POST', '/applications/{application.id}/entitlements');
|
|
840
|
+
/**
|
|
841
|
+
* Deletes a currently-active test entitlement. Discord will act as though that user or guild *no longer has* entitlement to your premium offering.
|
|
842
|
+
* @see https://docs.discord.com/developers/resources/entitlement#delete-test-entitlement
|
|
843
|
+
*/
|
|
844
|
+
export const DeleteTestEntitlement = endpoint()('DELETE', '/applications/{application.id}/entitlements/{entitlement.id}');
|
|
845
|
+
// --------------------------------------------------------------------------
|
|
846
|
+
// https://docs.discord.com/developers/resources/guild-scheduled-event
|
|
847
|
+
// --------------------------------------------------------------------------
|
|
848
|
+
/**
|
|
849
|
+
* Returns a list of guild scheduled event objects for the given guild.
|
|
850
|
+
* @see https://docs.discord.com/developers/resources/guild-scheduled-event#list-scheduled-events-for-guild
|
|
851
|
+
*/
|
|
852
|
+
export const ListScheduledEventsForGuild = endpoint()('GET', '/guilds/{guild.id}/scheduled-events');
|
|
853
|
+
/**
|
|
854
|
+
* Create a guild scheduled event in the guild. Returns a guild scheduled event object on success. Fires a Guild Scheduled Event Create Gateway event.
|
|
855
|
+
* @see https://docs.discord.com/developers/resources/guild-scheduled-event#create-guild-scheduled-event
|
|
856
|
+
*/
|
|
857
|
+
export const CreateGuildScheduledEvent = endpoint()('POST', '/guilds/{guild.id}/scheduled-events');
|
|
858
|
+
/**
|
|
859
|
+
* Get a guild scheduled event. Returns a guild scheduled event object on success.
|
|
860
|
+
* @see https://docs.discord.com/developers/resources/guild-scheduled-event#get-guild-scheduled-event
|
|
861
|
+
*/
|
|
862
|
+
export const GetGuildScheduledEvent = endpoint()('GET', '/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}');
|
|
863
|
+
/**
|
|
864
|
+
* Modify a guild scheduled event. Returns the modified guild scheduled event object on success. Fires a Guild Scheduled Event Update Gateway event.
|
|
865
|
+
* @see https://docs.discord.com/developers/resources/guild-scheduled-event#modify-guild-scheduled-event
|
|
866
|
+
*/
|
|
867
|
+
export const ModifyGuildScheduledEvent = endpoint()('PATCH', '/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}');
|
|
868
|
+
/**
|
|
869
|
+
* Delete a guild scheduled event. Returns a `204` on success. Fires a Guild Scheduled Event Delete Gateway event.
|
|
870
|
+
* @see https://docs.discord.com/developers/resources/guild-scheduled-event#delete-guild-scheduled-event
|
|
871
|
+
*/
|
|
872
|
+
export const DeleteGuildScheduledEvent = endpoint()('DELETE', '/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}');
|
|
873
|
+
/**
|
|
874
|
+
* Get a list of guild scheduled event users subscribed to a guild scheduled event. Returns a list of guild scheduled event user objects on success. Guild member data, if it exists, is included if the `with_member` query parameter is set.
|
|
875
|
+
* @see https://docs.discord.com/developers/resources/guild-scheduled-event#get-guild-scheduled-event-users
|
|
876
|
+
*/
|
|
877
|
+
export const GetGuildScheduledEventUsers = endpoint()('GET', '/guilds/{guild.id}/scheduled-events/{guild_scheduled_event.id}/users');
|
|
878
|
+
// --------------------------------------------------------------------------
|
|
879
|
+
// https://docs.discord.com/developers/resources/guild-template
|
|
880
|
+
// --------------------------------------------------------------------------
|
|
881
|
+
/**
|
|
882
|
+
* Returns a guild template object for the given code.
|
|
883
|
+
* @see https://docs.discord.com/developers/resources/guild-template#get-guild-template
|
|
884
|
+
*/
|
|
885
|
+
export const GetGuildTemplate = endpoint()('GET', '/guilds/templates/{template.code}');
|
|
886
|
+
/**
|
|
887
|
+
* Returns an array of guild template objects. Requires the `MANAGE_GUILD` permission.
|
|
888
|
+
* @see https://docs.discord.com/developers/resources/guild-template#get-guild-templates
|
|
889
|
+
*/
|
|
890
|
+
export const GetGuildTemplates = endpoint()('GET', '/guilds/{guild.id}/templates');
|
|
891
|
+
/**
|
|
892
|
+
* Creates a template for the guild. Requires the `MANAGE_GUILD` permission. Returns the created guild template object on success.
|
|
893
|
+
* @see https://docs.discord.com/developers/resources/guild-template#create-guild-template
|
|
894
|
+
*/
|
|
895
|
+
export const CreateGuildTemplate = endpoint()('POST', '/guilds/{guild.id}/templates');
|
|
896
|
+
/**
|
|
897
|
+
* Syncs the template to the guild's current state. Requires the `MANAGE_GUILD` permission. Returns the guild template object on success.
|
|
898
|
+
* @see https://docs.discord.com/developers/resources/guild-template#sync-guild-template
|
|
899
|
+
*/
|
|
900
|
+
export const SyncGuildTemplate = endpoint()('PUT', '/guilds/{guild.id}/templates/{template.code}');
|
|
901
|
+
/**
|
|
902
|
+
* Modifies the template's metadata. Requires the `MANAGE_GUILD` permission. Returns the guild template object on success.
|
|
903
|
+
* @see https://docs.discord.com/developers/resources/guild-template#modify-guild-template
|
|
904
|
+
*/
|
|
905
|
+
export const ModifyGuildTemplate = endpoint()('PATCH', '/guilds/{guild.id}/templates/{template.code}');
|
|
906
|
+
/**
|
|
907
|
+
* Deletes the template. Requires the `MANAGE_GUILD` permission. Returns the deleted guild template object on success.
|
|
908
|
+
* @see https://docs.discord.com/developers/resources/guild-template#delete-guild-template
|
|
909
|
+
*/
|
|
910
|
+
export const DeleteGuildTemplate = endpoint()('DELETE', '/guilds/{guild.id}/templates/{template.code}');
|
|
911
|
+
// --------------------------------------------------------------------------
|
|
912
|
+
// https://docs.discord.com/developers/resources/sku
|
|
913
|
+
// --------------------------------------------------------------------------
|
|
914
|
+
/**
|
|
915
|
+
* Returns all SKUs for a given application.
|
|
916
|
+
* @see https://docs.discord.com/developers/resources/sku#list-skus
|
|
917
|
+
*/
|
|
918
|
+
export const ListSKUs = endpoint()('GET', '/applications/{application.id}/skus');
|
|
919
|
+
// --------------------------------------------------------------------------
|
|
920
|
+
// https://docs.discord.com/developers/resources/soundboard
|
|
921
|
+
// --------------------------------------------------------------------------
|
|
922
|
+
/**
|
|
923
|
+
* Send a soundboard sound to a voice channel the user is connected to. Fires a Voice Channel Effect Send Gateway event.
|
|
924
|
+
* @see https://docs.discord.com/developers/resources/soundboard#send-soundboard-sound
|
|
925
|
+
*/
|
|
926
|
+
export const SendSoundboardSound = endpoint()('POST', '/channels/{channel.id}/send-soundboard-sound');
|
|
927
|
+
/**
|
|
928
|
+
* Returns an array of soundboard sound objects that can be used by all users.
|
|
929
|
+
* @see https://docs.discord.com/developers/resources/soundboard#list-default-soundboard-sounds
|
|
930
|
+
*/
|
|
931
|
+
export const ListDefaultSoundboardSounds = endpoint()('GET', '/soundboard-default-sounds');
|
|
932
|
+
/**
|
|
933
|
+
* Returns a list of the guild's soundboard sounds. Includes `user` fields if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
934
|
+
* @see https://docs.discord.com/developers/resources/soundboard#list-guild-soundboard-sounds
|
|
935
|
+
*/
|
|
936
|
+
export const ListGuildSoundboardSounds = endpoint()('GET', '/guilds/{guild.id}/soundboard-sounds');
|
|
937
|
+
/**
|
|
938
|
+
* Returns a soundboard sound object for the given sound id. Includes the `user` field if the bot has the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission.
|
|
939
|
+
* @see https://docs.discord.com/developers/resources/soundboard#get-guild-soundboard-sound
|
|
940
|
+
*/
|
|
941
|
+
export const GetGuildSoundboardSound = endpoint()('GET', '/guilds/{guild.id}/soundboard-sounds/{sound.id}');
|
|
942
|
+
/**
|
|
943
|
+
* Create a new soundboard sound for the guild. Requires the `CREATE_GUILD_EXPRESSIONS` permission. Returns the new soundboard sound object on success. Fires a Guild Soundboard Sound Create Gateway event.
|
|
944
|
+
* @see https://docs.discord.com/developers/resources/soundboard#create-guild-soundboard-sound
|
|
945
|
+
*/
|
|
946
|
+
export const CreateGuildSoundboardSound = endpoint()('POST', '/guilds/{guild.id}/soundboard-sounds');
|
|
947
|
+
/**
|
|
948
|
+
* Modify the given soundboard sound. For sounds created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other sounds, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns the updated soundboard sound object on success. Fires a Guild Soundboard Sound Update Gateway event.
|
|
949
|
+
* @see https://docs.discord.com/developers/resources/soundboard#modify-guild-soundboard-sound
|
|
950
|
+
*/
|
|
951
|
+
export const ModifyGuildSoundboardSound = endpoint()('PATCH', '/guilds/{guild.id}/soundboard-sounds/{sound.id}');
|
|
952
|
+
/**
|
|
953
|
+
* Delete the given soundboard sound. For sounds created by the current user, requires either the `CREATE_GUILD_EXPRESSIONS` or `MANAGE_GUILD_EXPRESSIONS` permission. For other sounds, requires the `MANAGE_GUILD_EXPRESSIONS` permission. Returns `204 No Content` on success. Fires a Guild Soundboard Sound Delete Gateway event.
|
|
954
|
+
* @see https://docs.discord.com/developers/resources/soundboard#delete-guild-soundboard-sound
|
|
955
|
+
*/
|
|
956
|
+
export const DeleteGuildSoundboardSound = endpoint()('DELETE', '/guilds/{guild.id}/soundboard-sounds/{sound.id}');
|
|
957
|
+
// --------------------------------------------------------------------------
|
|
958
|
+
// https://docs.discord.com/developers/resources/stage-instance
|
|
959
|
+
// --------------------------------------------------------------------------
|
|
960
|
+
/**
|
|
961
|
+
* Creates a new Stage instance associated to a Stage channel. Returns that Stage instance. Fires a Stage Instance Create Gateway event.
|
|
962
|
+
* @see https://docs.discord.com/developers/resources/stage-instance#create-stage-instance
|
|
963
|
+
*/
|
|
964
|
+
export const CreateStageInstance = endpoint()('POST', '/stage-instances');
|
|
965
|
+
/**
|
|
966
|
+
* Gets the stage instance associated with the Stage channel, if it exists.
|
|
967
|
+
* @see https://docs.discord.com/developers/resources/stage-instance#get-stage-instance
|
|
968
|
+
*/
|
|
969
|
+
export const GetStageInstance = endpoint()('GET', '/stage-instances/{channel.id}');
|
|
970
|
+
/**
|
|
971
|
+
* Updates fields of an existing Stage instance. Returns the updated Stage instance. Fires a Stage Instance Update Gateway event.
|
|
972
|
+
* @see https://docs.discord.com/developers/resources/stage-instance#modify-stage-instance
|
|
973
|
+
*/
|
|
974
|
+
export const ModifyStageInstance = endpoint()('PATCH', '/stage-instances/{channel.id}');
|
|
975
|
+
/**
|
|
976
|
+
* Deletes the Stage instance. Returns `204 No Content`. Fires a Stage Instance Delete Gateway event.
|
|
977
|
+
* @see https://docs.discord.com/developers/resources/stage-instance#delete-stage-instance
|
|
978
|
+
*/
|
|
979
|
+
export const DeleteStageInstance = endpoint()('DELETE', '/stage-instances/{channel.id}');
|
|
980
|
+
// --------------------------------------------------------------------------
|
|
981
|
+
// https://docs.discord.com/developers/resources/subscription
|
|
982
|
+
// --------------------------------------------------------------------------
|
|
983
|
+
/**
|
|
984
|
+
* Returns all subscriptions containing the SKU, filtered by user. Returns a list of subscription objects.
|
|
985
|
+
* @see https://docs.discord.com/developers/resources/subscription#list-sku-subscriptions
|
|
986
|
+
*/
|
|
987
|
+
export const ListSkuSubscriptions = endpoint()('GET', '/skus/{sku.id}/subscriptions');
|
|
988
|
+
/**
|
|
989
|
+
* Get a subscription by its ID. Returns a subscription object.
|
|
990
|
+
* @see https://docs.discord.com/developers/resources/subscription#get-sku-subscription
|
|
991
|
+
*/
|
|
992
|
+
export const GetSkuSubscription = endpoint()('GET', '/skus/{sku.id}/subscriptions/{subscription.id}');
|
|
993
|
+
// --------------------------------------------------------------------------
|
|
994
|
+
// https://docs.discord.com/developers/interactions/receiving-and-responding
|
|
995
|
+
// --------------------------------------------------------------------------
|
|
996
|
+
/**
|
|
997
|
+
* Create a response to an Interaction. Body is an interaction response. Returns `204` unless `with_response` is set to `true` which returns `200` with the body as interaction callback response.
|
|
998
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#create-interaction-response
|
|
999
|
+
*/
|
|
1000
|
+
export const CreateInteractionResponse = endpoint()('POST', '/interactions/{interaction.id}/{interaction.token}/callback');
|
|
1001
|
+
/**
|
|
1002
|
+
* Returns the initial Interaction response. Functions the same as Get Webhook Message.
|
|
1003
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#get-original-interaction-response
|
|
1004
|
+
*/
|
|
1005
|
+
export const GetOriginalInteractionResponse = endpoint()('GET', '/webhooks/{application.id}/{interaction.token}/messages/@original');
|
|
1006
|
+
/**
|
|
1007
|
+
* Edits the initial Interaction response. Functions the same as Edit Webhook Message.
|
|
1008
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#edit-original-interaction-response
|
|
1009
|
+
*/
|
|
1010
|
+
export const EditOriginalInteractionResponse = endpoint()('PATCH', '/webhooks/{application.id}/{interaction.token}/messages/@original');
|
|
1011
|
+
/**
|
|
1012
|
+
* Deletes the initial Interaction response. Returns `204 No Content` on success.
|
|
1013
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#delete-original-interaction-response
|
|
1014
|
+
*/
|
|
1015
|
+
export const DeleteOriginalInteractionResponse = endpoint()('DELETE', '/webhooks/{application.id}/{interaction.token}/messages/@original');
|
|
1016
|
+
/**
|
|
1017
|
+
*
|
|
1018
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#create-followup-message
|
|
1019
|
+
*/
|
|
1020
|
+
export const CreateFollowupMessage = endpoint()('POST', '/webhooks/{application.id}/{interaction.token}');
|
|
1021
|
+
/**
|
|
1022
|
+
* Returns a followup message for an Interaction. Functions the same as Get Webhook Message.
|
|
1023
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#get-followup-message
|
|
1024
|
+
*/
|
|
1025
|
+
export const GetFollowupMessage = endpoint()('GET', '/webhooks/{application.id}/{interaction.token}/messages/{message.id}');
|
|
1026
|
+
/**
|
|
1027
|
+
* Edits a followup message for an Interaction. Functions the same as Edit Webhook Message.
|
|
1028
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#edit-followup-message
|
|
1029
|
+
*/
|
|
1030
|
+
export const EditFollowupMessage = endpoint()('PATCH', '/webhooks/{application.id}/{interaction.token}/messages/{message.id}');
|
|
1031
|
+
/**
|
|
1032
|
+
* Deletes a followup message for an Interaction. Returns `204 No Content` on success.
|
|
1033
|
+
* @see https://docs.discord.com/developers/interactions/receiving-and-responding#delete-followup-message
|
|
1034
|
+
*/
|
|
1035
|
+
export const DeleteFollowupMessage = endpoint()('DELETE', '/webhooks/{application.id}/{interaction.token}/messages/{message.id}');
|
|
1036
|
+
// --------------------------------------------------------------------------
|
|
1037
|
+
// https://docs.discord.com/developers/interactions/application-commands
|
|
1038
|
+
// --------------------------------------------------------------------------
|
|
1039
|
+
/**
|
|
1040
|
+
*
|
|
1041
|
+
* @see https://docs.discord.com/developers/interactions/application-commands#get-global-application-commands
|
|
1042
|
+
*/
|
|
1043
|
+
export const GetGlobalApplicationCommands = endpoint()('GET', '/applications/{application.id}/commands');
|
|
1044
|
+
/**
|
|
1045
|
+
*
|
|
1046
|
+
* @see https://docs.discord.com/developers/interactions/application-commands#create-global-application-command
|
|
1047
|
+
*/
|
|
1048
|
+
export const CreateGlobalApplicationCommand = endpoint()('POST', '/applications/{application.id}/commands');
|
|
1049
|
+
/**
|
|
1050
|
+
* Fetch a global command for your application. Returns an application command object.
|
|
1051
|
+
* @see https://docs.discord.com/developers/interactions/application-commands#get-global-application-command
|
|
1052
|
+
*/
|
|
1053
|
+
export const GetGlobalApplicationCommand = endpoint()('GET', '/applications/{application.id}/commands/{command.id}');
|
|
1054
|
+
/**
|
|
1055
|
+
*
|
|
1056
|
+
* @see https://docs.discord.com/developers/interactions/application-commands#edit-global-application-command
|
|
1057
|
+
*/
|
|
1058
|
+
export const EditGlobalApplicationCommand = endpoint()('PATCH', '/applications/{application.id}/commands/{command.id}');
|
|
1059
|
+
/**
|
|
1060
|
+
* Deletes a global command. Returns `204 No Content` on success.
|
|
1061
|
+
* @see https://docs.discord.com/developers/interactions/application-commands#delete-global-application-command
|
|
1062
|
+
*/
|
|
1063
|
+
export const DeleteGlobalApplicationCommand = endpoint()('DELETE', '/applications/{application.id}/commands/{command.id}');
|
|
1064
|
+
/**
|
|
1065
|
+
* Takes a list of application commands, overwriting the existing global command list for this application. Returns `200` and a list of application command objects. Commands that do not already exist will count toward daily application command create limits.
|
|
1066
|
+
* @see https://docs.discord.com/developers/interactions/application-commands#bulk-overwrite-global-application-commands
|
|
1067
|
+
*/
|
|
1068
|
+
export const BulkOverwriteGlobalApplicationCommands = endpoint()('PUT', '/applications/{application.id}/commands');
|
|
1069
|
+
/**
|
|
1070
|
+
*
|
|
1071
|
+
* @see https://docs.discord.com/developers/interactions/application-commands#get-guild-application-commands
|
|
1072
|
+
*/
|
|
1073
|
+
export const GetGuildApplicationCommands = endpoint()('GET', '/applications/{application.id}/guilds/{guild.id}/commands');
|
|
1074
|
+
/**
|
|
1075
|
+
*
|
|
1076
|
+
* @see https://docs.discord.com/developers/interactions/application-commands#create-guild-application-command
|
|
1077
|
+
*/
|
|
1078
|
+
export const CreateGuildApplicationCommand = endpoint()('POST', '/applications/{application.id}/guilds/{guild.id}/commands');
|
|
1079
|
+
/**
|
|
1080
|
+
* Fetch a guild command for your application. Returns an application command object.
|
|
1081
|
+
* @see https://docs.discord.com/developers/interactions/application-commands#get-guild-application-command
|
|
1082
|
+
*/
|
|
1083
|
+
export const GetGuildApplicationCommand = endpoint()('GET', '/applications/{application.id}/guilds/{guild.id}/commands/{command.id}');
|
|
1084
|
+
/**
|
|
1085
|
+
*
|
|
1086
|
+
* @see https://docs.discord.com/developers/interactions/application-commands#edit-guild-application-command
|
|
1087
|
+
*/
|
|
1088
|
+
export const EditGuildApplicationCommand = endpoint()('PATCH', '/applications/{application.id}/guilds/{guild.id}/commands/{command.id}');
|
|
1089
|
+
/**
|
|
1090
|
+
* Delete a guild command. Returns `204 No Content` on success.
|
|
1091
|
+
* @see https://docs.discord.com/developers/interactions/application-commands#delete-guild-application-command
|
|
1092
|
+
*/
|
|
1093
|
+
export const DeleteGuildApplicationCommand = endpoint()('DELETE', '/applications/{application.id}/guilds/{guild.id}/commands/{command.id}');
|
|
1094
|
+
/**
|
|
1095
|
+
* Takes a list of application commands, overwriting the existing command list for this application for the targeted guild. Returns `200` and a list of application command objects.
|
|
1096
|
+
* @see https://docs.discord.com/developers/interactions/application-commands#bulk-overwrite-guild-application-commands
|
|
1097
|
+
*/
|
|
1098
|
+
export const BulkOverwriteGuildApplicationCommands = endpoint()('PUT', '/applications/{application.id}/guilds/{guild.id}/commands');
|
|
1099
|
+
/**
|
|
1100
|
+
* Fetches permissions for all commands for your application in a guild. Returns an array of guild application command permissions objects.
|
|
1101
|
+
* @see https://docs.discord.com/developers/interactions/application-commands#get-guild-application-command-permissions
|
|
1102
|
+
*/
|
|
1103
|
+
export const GetGuildApplicationCommandPermissions = endpoint()('GET', '/applications/{application.id}/guilds/{guild.id}/commands/permissions');
|
|
1104
|
+
/**
|
|
1105
|
+
* Fetches permissions for a specific command for your application in a guild. Returns a guild application command permissions object.
|
|
1106
|
+
* @see https://docs.discord.com/developers/interactions/application-commands#get-application-command-permissions
|
|
1107
|
+
*/
|
|
1108
|
+
export const GetApplicationCommandPermissions = endpoint()('GET', '/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions');
|
|
1109
|
+
/**
|
|
1110
|
+
*
|
|
1111
|
+
* @see https://docs.discord.com/developers/interactions/application-commands#edit-application-command-permissions
|
|
1112
|
+
*/
|
|
1113
|
+
export const EditApplicationCommandPermissions = endpoint()('PUT', '/applications/{application.id}/guilds/{guild.id}/commands/{command.id}/permissions');
|
|
1114
|
+
// --------------------------------------------------------------------------
|
|
1115
|
+
// https://docs.discord.com/developers/events/gateway
|
|
1116
|
+
// --------------------------------------------------------------------------
|
|
1117
|
+
/**
|
|
1118
|
+
*
|
|
1119
|
+
* @see https://docs.discord.com/developers/events/gateway#get-gateway
|
|
1120
|
+
*/
|
|
1121
|
+
export const GetGateway = endpoint()('GET', '/gateway');
|
|
1122
|
+
/**
|
|
1123
|
+
*
|
|
1124
|
+
* @see https://docs.discord.com/developers/events/gateway#get-gateway-bot
|
|
1125
|
+
*/
|
|
1126
|
+
export const GetGatewayBot = endpoint()('GET', '/gateway/bot');
|
|
1127
|
+
// --------------------------------------------------------------------------
|
|
1128
|
+
// https://docs.discord.com/developers/topics/oauth2
|
|
1129
|
+
// --------------------------------------------------------------------------
|
|
1130
|
+
/**
|
|
1131
|
+
* Returns the bot's application object.
|
|
1132
|
+
* @see https://docs.discord.com/developers/topics/oauth2#get-current-bot-application-information
|
|
1133
|
+
*/
|
|
1134
|
+
export const GetCurrentBotApplicationInformation = endpoint()('GET', '/oauth2/applications/@me');
|
|
1135
|
+
/**
|
|
1136
|
+
* Returns info about the current authorization. Requires authentication with a bearer token.
|
|
1137
|
+
* @see https://docs.discord.com/developers/topics/oauth2#get-current-authorization-information
|
|
1138
|
+
*/
|
|
1139
|
+
export const GetCurrentAuthorizationInformation = endpoint()('GET', '/oauth2/@me');
|