seyfert 2.0.0 → 2.1.1-dev-11310514874.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/lib/api/Router.d.ts +2 -2
- package/lib/api/Router.js +2 -1
- package/lib/api/Routes/applications.d.ts +29 -30
- package/lib/api/Routes/cdn.d.ts +6 -1
- package/lib/api/Routes/channels.d.ts +44 -45
- package/lib/api/Routes/gateway.d.ts +3 -4
- package/lib/api/Routes/guilds.d.ts +81 -80
- package/lib/api/Routes/index.d.ts +3 -1
- package/lib/api/Routes/interactions.d.ts +9 -3
- package/lib/api/Routes/invites.d.ts +3 -4
- package/lib/api/Routes/skus.d.ts +10 -0
- package/lib/api/Routes/skus.js +2 -0
- package/lib/api/Routes/soundboard.d.ts +23 -0
- package/lib/api/Routes/soundboard.js +2 -0
- package/lib/api/Routes/stage-instances.d.ts +5 -6
- package/lib/api/Routes/stickers.d.ts +3 -4
- package/lib/api/Routes/users.d.ts +11 -12
- package/lib/api/Routes/voice.d.ts +2 -3
- package/lib/api/Routes/webhooks.d.ts +16 -15
- package/lib/api/api.d.ts +17 -11
- package/lib/api/api.js +26 -22
- package/lib/api/shared.d.ts +2 -2
- package/lib/api/utils/constants.d.ts +3 -1
- package/lib/api/utils/constants.js +3 -2
- package/lib/builders/ActionRow.d.ts +1 -1
- package/lib/builders/Attachment.d.ts +3 -3
- package/lib/builders/Attachment.js +13 -13
- package/lib/builders/Button.d.ts +1 -1
- package/lib/builders/Button.js +1 -1
- package/lib/builders/Embed.d.ts +1 -1
- package/lib/builders/Embed.js +2 -2
- package/lib/builders/Modal.d.ts +1 -1
- package/lib/builders/Poll.d.ts +1 -1
- package/lib/builders/Poll.js +1 -1
- package/lib/builders/SelectMenu.d.ts +1 -1
- package/lib/builders/SelectMenu.js +1 -1
- package/lib/builders/types.d.ts +2 -1
- package/lib/cache/adapters/default.js +5 -3
- package/lib/cache/adapters/limited.d.ts +1 -2
- package/lib/cache/adapters/limited.js +34 -30
- package/lib/cache/adapters/workeradapter.js +3 -1
- package/lib/cache/index.d.ts +12 -12
- package/lib/cache/index.js +48 -39
- package/lib/cache/resources/bans.d.ts +2 -2
- package/lib/cache/resources/bans.js +1 -1
- package/lib/cache/resources/channels.d.ts +1 -1
- package/lib/cache/resources/default/guild-related.d.ts +1 -2
- package/lib/cache/resources/emojis.d.ts +2 -2
- package/lib/cache/resources/emojis.js +1 -1
- package/lib/cache/resources/guilds.d.ts +2 -2
- package/lib/cache/resources/guilds.js +7 -11
- package/lib/cache/resources/members.d.ts +2 -2
- package/lib/cache/resources/members.js +1 -1
- package/lib/cache/resources/messages.d.ts +2 -2
- package/lib/cache/resources/messages.js +3 -3
- package/lib/cache/resources/overwrites.d.ts +1 -1
- package/lib/cache/resources/roles.d.ts +2 -2
- package/lib/cache/resources/roles.js +1 -1
- package/lib/cache/resources/stickers.d.ts +2 -2
- package/lib/cache/resources/stickers.js +1 -1
- package/lib/cache/resources/users.d.ts +2 -2
- package/lib/cache/resources/users.js +1 -1
- package/lib/cache/resources/voice-states.d.ts +2 -2
- package/lib/cache/resources/voice-states.js +1 -1
- package/lib/client/base.d.ts +10 -15
- package/lib/client/base.js +48 -44
- package/lib/client/client.d.ts +4 -4
- package/lib/client/client.js +37 -38
- package/lib/client/collectors.js +1 -1
- package/lib/client/httpclient.d.ts +1 -1
- package/lib/client/httpclient.js +2 -2
- package/lib/client/transformers.d.ts +37 -34
- package/lib/client/transformers.js +66 -63
- package/lib/client/workerclient.d.ts +13 -13
- package/lib/client/workerclient.js +182 -65
- package/lib/collection.d.ts +3 -3
- package/lib/commands/applications/chat.d.ts +3 -3
- package/lib/commands/applications/chat.js +5 -6
- package/lib/commands/applications/chatcontext.d.ts +6 -6
- package/lib/commands/applications/chatcontext.js +16 -8
- package/lib/commands/applications/entryPoint.d.ts +46 -0
- package/lib/commands/applications/entryPoint.js +56 -0
- package/lib/commands/applications/entrycontext.d.ts +40 -0
- package/lib/commands/applications/entrycontext.js +85 -0
- package/lib/commands/applications/menu.d.ts +1 -1
- package/lib/commands/applications/menucontext.d.ts +5 -5
- package/lib/commands/applications/menucontext.js +6 -6
- package/lib/commands/applications/options.d.ts +7 -6
- package/lib/commands/applications/shared.d.ts +5 -2
- package/lib/commands/basecontext.d.ts +1 -1
- package/lib/commands/decorators.d.ts +20 -26
- package/lib/commands/decorators.js +8 -4
- package/lib/commands/handle.d.ts +13 -12
- package/lib/commands/handle.js +133 -65
- package/lib/commands/handler.d.ts +9 -7
- package/lib/commands/handler.js +27 -18
- package/lib/commands/index.d.ts +2 -0
- package/lib/commands/index.js +2 -0
- package/lib/commands/optionresolver.d.ts +4 -4
- package/lib/commands/optionresolver.js +4 -4
- package/lib/common/bot/watcher.d.ts +1 -1
- package/lib/common/it/formatter.d.ts +21 -21
- package/lib/common/it/formatter.js +40 -41
- package/lib/common/it/logger.js +1 -1
- package/lib/common/it/utils.d.ts +14 -6
- package/lib/common/it/utils.js +62 -27
- package/lib/common/shorters/application.d.ts +2 -3
- package/lib/common/shorters/application.js +3 -3
- package/lib/common/shorters/bans.js +1 -1
- package/lib/common/shorters/channels.d.ts +3 -3
- package/lib/common/shorters/channels.js +3 -3
- package/lib/common/shorters/emojis.js +4 -4
- package/lib/common/shorters/guilds.d.ts +3 -3
- package/lib/common/shorters/guilds.js +5 -9
- package/lib/common/shorters/interaction.d.ts +3 -3
- package/lib/common/shorters/interaction.js +6 -5
- package/lib/common/shorters/members.d.ts +4 -5
- package/lib/common/shorters/members.js +6 -7
- package/lib/common/shorters/messages.d.ts +1 -1
- package/lib/common/shorters/messages.js +4 -4
- package/lib/common/shorters/reactions.d.ts +1 -1
- package/lib/common/shorters/reactions.js +1 -1
- package/lib/common/shorters/roles.js +1 -1
- package/lib/common/shorters/templates.js +2 -2
- package/lib/common/shorters/threads.d.ts +1 -1
- package/lib/common/shorters/threads.js +17 -11
- package/lib/common/shorters/webhook.d.ts +1 -1
- package/lib/common/shorters/webhook.js +4 -4
- package/lib/common/types/options.d.ts +2 -2
- package/lib/common/types/resolvables.d.ts +1 -1
- package/lib/common/types/util.d.ts +4 -1
- package/lib/common/types/write.d.ts +3 -3
- package/lib/components/BaseComponent.js +1 -1
- package/lib/components/ButtonComponent.d.ts +1 -1
- package/lib/components/componentcommand.d.ts +1 -1
- package/lib/components/componentcontext.d.ts +4 -4
- package/lib/components/componentcontext.js +1 -1
- package/lib/components/handler.d.ts +10 -8
- package/lib/components/handler.js +16 -13
- package/lib/components/index.js +2 -1
- package/lib/components/modalcontext.d.ts +2 -2
- package/lib/components/modalcontext.js +1 -1
- package/lib/deps/mixer.d.ts +1 -1
- package/lib/deps/mixer.js +6 -1
- package/lib/events/handler.d.ts +5 -5
- package/lib/events/handler.js +69 -19
- package/lib/events/hooks/application_command.d.ts +1 -1
- package/lib/events/hooks/auto_moderation.d.ts +1 -1
- package/lib/events/hooks/auto_moderation.js +1 -1
- package/lib/events/hooks/channel.d.ts +1 -1
- package/lib/events/hooks/custom.d.ts +1 -0
- package/lib/events/hooks/custom.js +5 -1
- package/lib/events/hooks/dispatch.d.ts +1 -1
- package/lib/events/hooks/entitlement.d.ts +4 -5
- package/lib/events/hooks/entitlement.js +4 -4
- package/lib/events/hooks/guild.d.ts +3 -3
- package/lib/events/hooks/guild.js +1 -1
- package/lib/events/hooks/index.d.ts +1 -0
- package/lib/events/hooks/index.js +1 -0
- package/lib/events/hooks/integration.d.ts +1 -1
- package/lib/events/hooks/integration.js +1 -1
- package/lib/events/hooks/interactions.d.ts +3 -3
- package/lib/events/hooks/invite.d.ts +1 -1
- package/lib/events/hooks/message.d.ts +3 -3
- package/lib/events/hooks/message.js +1 -1
- package/lib/events/hooks/presence.d.ts +2 -2
- package/lib/events/hooks/soundboard.d.ts +155 -0
- package/lib/events/hooks/soundboard.js +28 -0
- package/lib/events/hooks/stage.d.ts +2 -2
- package/lib/events/hooks/subscriptions.d.ts +35 -0
- package/lib/events/hooks/subscriptions.js +16 -0
- package/lib/events/hooks/thread.d.ts +2 -2
- package/lib/events/hooks/thread.js +2 -2
- package/lib/events/hooks/typing.d.ts +1 -1
- package/lib/events/hooks/typing.js +1 -1
- package/lib/events/hooks/user.d.ts +2 -2
- package/lib/events/hooks/voice.d.ts +2 -2
- package/lib/events/hooks/voice.js +1 -1
- package/lib/events/hooks/webhook.d.ts +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +3 -5
- package/lib/langs/handler.d.ts +2 -2
- package/lib/structures/Guild.d.ts +7 -4
- package/lib/structures/Guild.js +1 -1
- package/lib/structures/GuildBan.d.ts +1 -1
- package/lib/structures/GuildMember.d.ts +7 -5
- package/lib/structures/GuildMember.js +5 -3
- package/lib/structures/GuildRole.d.ts +1 -1
- package/lib/structures/GuildTemplate.d.ts +1 -1
- package/lib/structures/Interaction.d.ts +39 -16
- package/lib/structures/Interaction.js +82 -26
- package/lib/structures/Message.d.ts +4 -10
- package/lib/structures/Message.js +5 -8
- package/lib/structures/Poll.d.ts +3 -3
- package/lib/structures/Sticker.d.ts +2 -2
- package/lib/structures/Sticker.js +1 -1
- package/lib/structures/VoiceState.d.ts +2 -1
- package/lib/structures/VoiceState.js +1 -1
- package/lib/structures/Webhook.d.ts +3 -3
- package/lib/structures/Webhook.js +1 -1
- package/lib/structures/channels.d.ts +4 -4
- package/lib/structures/channels.js +8 -7
- package/lib/structures/extra/BaseGuild.d.ts +11 -1
- package/lib/structures/extra/BaseGuild.js +27 -0
- package/lib/structures/extra/BitField.d.ts +3 -3
- package/lib/structures/extra/BitField.js +34 -33
- package/lib/structures/extra/DiscordBase.js +1 -1
- package/lib/structures/extra/Permissions.d.ts +2 -0
- package/lib/structures/extra/Permissions.js +21 -0
- package/lib/types/gateway.d.ts +71 -6
- package/lib/types/payloads/_interactions/_applicationCommands/chatInput.d.ts +6 -1
- package/lib/types/payloads/_interactions/applicationCommands.d.ts +41 -6
- package/lib/types/payloads/_interactions/applicationCommands.js +28 -1
- package/lib/types/payloads/_interactions/base.d.ts +1 -1
- package/lib/types/payloads/_interactions/responses.d.ts +74 -2
- package/lib/types/payloads/_interactions/responses.js +4 -0
- package/lib/types/payloads/channel.d.ts +46 -6
- package/lib/types/payloads/channel.js +5 -1
- package/lib/types/payloads/guild.d.ts +9 -1
- package/lib/types/payloads/guild.js +8 -0
- package/lib/types/payloads/index.d.ts +1 -0
- package/lib/types/payloads/index.js +1 -0
- package/lib/types/payloads/monetization.d.ts +29 -1
- package/lib/types/payloads/monetization.js +10 -1
- package/lib/types/payloads/soundboard.d.ts +23 -0
- package/lib/types/payloads/soundboard.js +5 -0
- package/lib/types/payloads/user.js +0 -1
- package/lib/types/rest/application.d.ts +3 -3
- package/lib/types/rest/auditLog.d.ts +1 -1
- package/lib/types/rest/channel.d.ts +5 -18
- package/lib/types/rest/guild.d.ts +2 -2
- package/lib/types/rest/guildScheduledEvent.d.ts +1 -1
- package/lib/types/rest/index.d.ts +1 -0
- package/lib/types/rest/index.js +1 -0
- package/lib/types/rest/interactions.d.ts +30 -8
- package/lib/types/rest/monetization.d.ts +22 -1
- package/lib/types/rest/oauth2.d.ts +1 -1
- package/lib/types/rest/poll.d.ts +1 -1
- package/lib/types/rest/soundboard.d.ts +64 -0
- package/lib/types/rest/soundboard.js +2 -0
- package/lib/types/rest/stageInstance.d.ts +1 -1
- package/lib/types/rest/template.d.ts +1 -1
- package/lib/types/rest/user.d.ts +1 -1
- package/lib/types/rest/webhook.d.ts +3 -3
- package/lib/types/utils/index.d.ts +27 -7
- package/lib/types/utils/index.js +25 -6
- package/lib/websocket/SharedTypes.d.ts +18 -3
- package/lib/websocket/constants/index.d.ts +3 -2
- package/lib/websocket/constants/index.js +4 -4
- package/lib/websocket/discord/basesocket.d.ts +1 -1
- package/lib/websocket/discord/shard.d.ts +4 -3
- package/lib/websocket/discord/shard.js +47 -24
- package/lib/websocket/discord/sharder.d.ts +9 -6
- package/lib/websocket/discord/sharder.js +92 -17
- package/lib/websocket/discord/shared.d.ts +12 -3
- package/lib/websocket/discord/socket/custom.d.ts +1 -1
- package/lib/websocket/discord/socket/custom.js +70 -40
- package/lib/websocket/discord/worker.d.ts +9 -2
- package/lib/websocket/discord/workermanager.d.ts +42 -16
- package/lib/websocket/discord/workermanager.js +170 -46
- package/lib/websocket/structures/timeout.d.ts +4 -5
- package/lib/websocket/structures/timeout.js +23 -24
- package/package.json +72 -65
- package/lib/cache/resources/threads.d.ts +0 -14
- package/lib/cache/resources/threads.js +0 -32
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Types extracted from https://discord.com/developers/docs/resources/channel
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { ChannelType, OverwriteType, Permissions, Snowflake, VideoQualityMode } from '../index';
|
|
5
5
|
import type { APIApplication } from './application';
|
|
6
6
|
import type { APIPartialEmoji } from './emoji';
|
|
7
7
|
import type { APIGuildMember } from './guild';
|
|
@@ -520,7 +520,7 @@ export interface APIMessage {
|
|
|
520
520
|
/**
|
|
521
521
|
* Sent if a thread was started from this message
|
|
522
522
|
*/
|
|
523
|
-
thread?:
|
|
523
|
+
thread?: APIThreadChannel;
|
|
524
524
|
/**
|
|
525
525
|
* Sent if the message contains components like buttons, action rows, or other interactive components
|
|
526
526
|
*
|
|
@@ -692,7 +692,7 @@ export interface APIMessageSnapshot {
|
|
|
692
692
|
*/
|
|
693
693
|
guild_id?: Snowflake;
|
|
694
694
|
}
|
|
695
|
-
export type APIMessageSnapshotFields = Pick<APIMessage, 'attachments' | 'content' | 'edited_timestamp' | 'embeds' | 'flags' | 'mention_roles' | 'mentions' | 'timestamp' | 'type'>;
|
|
695
|
+
export type APIMessageSnapshotFields = Pick<APIMessage, 'attachments' | 'content' | 'edited_timestamp' | 'embeds' | 'flags' | 'mention_roles' | 'mentions' | 'timestamp' | 'type' | 'sticker_items' | 'components' | 'stickers'>;
|
|
696
696
|
/**
|
|
697
697
|
* https://discord.com/developers/docs/resources/channel#message-object-message-activity-types
|
|
698
698
|
*/
|
|
@@ -990,8 +990,6 @@ export interface APIEmbed {
|
|
|
990
990
|
/**
|
|
991
991
|
* Type of embed (always "rich" for webhook embeds)
|
|
992
992
|
*
|
|
993
|
-
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
|
|
994
|
-
*
|
|
995
993
|
* See https://discord.com/developers/docs/resources/channel#embed-object-embed-types
|
|
996
994
|
*/
|
|
997
995
|
type?: EmbedType;
|
|
@@ -1058,10 +1056,47 @@ export interface APIEmbed {
|
|
|
1058
1056
|
*/
|
|
1059
1057
|
fields?: APIEmbedField[];
|
|
1060
1058
|
}
|
|
1059
|
+
/**
|
|
1060
|
+
* https://discord.com/developers/docs/resources/message#embed-fields-by-embed-type-poll-result-embed-fields
|
|
1061
|
+
*/
|
|
1062
|
+
export interface PollResultEmbedField<T extends string, V extends string = string> {
|
|
1063
|
+
name: T;
|
|
1064
|
+
value: V;
|
|
1065
|
+
inline: false;
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* https://discord.com/developers/docs/resources/message#embed-fields-by-embed-type-poll-result-embed-fields
|
|
1069
|
+
*/
|
|
1070
|
+
export type PollResultEmbedFields = [
|
|
1071
|
+
/** question text from the original poll */
|
|
1072
|
+
PollResultEmbedField<'poll_question_text'>,
|
|
1073
|
+
/** number of votes for the answer(s) with the most votes */
|
|
1074
|
+
PollResultEmbedField<'victor_answer_votes', `${number}`>,
|
|
1075
|
+
/** total number of votes in the poll */
|
|
1076
|
+
PollResultEmbedField<'total_votes', `${number}`>,
|
|
1077
|
+
/** id for the winning answer */
|
|
1078
|
+
PollResultEmbedField<'victor_answer_id', `${number}`> | undefined,
|
|
1079
|
+
/** text for the winning answer */
|
|
1080
|
+
PollResultEmbedField<'victor_answer_text'> | undefined,
|
|
1081
|
+
/** id for an emoji associated with the winning answer */
|
|
1082
|
+
PollResultEmbedField<'victor_answer_emoji_id'> | undefined,
|
|
1083
|
+
/** name for an emoji associated with the winning answer */
|
|
1084
|
+
PollResultEmbedField<'victor_answer_emoji_name'> | undefined,
|
|
1085
|
+
/** if an emoji associated with the winning answer is animated */
|
|
1086
|
+
PollResultEmbedField<'victor_answer_emoji_animated', `${boolean}`> | undefined
|
|
1087
|
+
];
|
|
1088
|
+
export type APIEmbedPollResult = {
|
|
1089
|
+
type: EmbedType.PollResult;
|
|
1090
|
+
fields: PollResultEmbedFields;
|
|
1091
|
+
/**
|
|
1092
|
+
* @unstable This field is not officially documented by Discord.
|
|
1093
|
+
* Current observations indicate a consistent value of 0 for all embeds.
|
|
1094
|
+
*/
|
|
1095
|
+
content_scan_version: number;
|
|
1096
|
+
};
|
|
1061
1097
|
/**
|
|
1062
1098
|
* https://discord.com/developers/docs/resources/channel#embed-object-embed-types
|
|
1063
1099
|
*
|
|
1064
|
-
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
|
|
1065
1100
|
*/
|
|
1066
1101
|
export declare enum EmbedType {
|
|
1067
1102
|
/**
|
|
@@ -1088,6 +1123,11 @@ export declare enum EmbedType {
|
|
|
1088
1123
|
* Link embed
|
|
1089
1124
|
*/
|
|
1090
1125
|
Link = "link",
|
|
1126
|
+
/**
|
|
1127
|
+
* Poll result embed
|
|
1128
|
+
* https://discord.com/developers/docs/resources/message#embed-fields-by-embed-type-poll-result-embed-fields
|
|
1129
|
+
*/
|
|
1130
|
+
PollResult = "poll_result",
|
|
1091
1131
|
/**
|
|
1092
1132
|
* Auto moderation alert embed
|
|
1093
1133
|
*
|
|
@@ -190,7 +190,6 @@ var ThreadMemberFlags;
|
|
|
190
190
|
/**
|
|
191
191
|
* https://discord.com/developers/docs/resources/channel#embed-object-embed-types
|
|
192
192
|
*
|
|
193
|
-
* @deprecated *Embed types should be considered deprecated and might be removed in a future API version*
|
|
194
193
|
*/
|
|
195
194
|
var EmbedType;
|
|
196
195
|
(function (EmbedType) {
|
|
@@ -218,6 +217,11 @@ var EmbedType;
|
|
|
218
217
|
* Link embed
|
|
219
218
|
*/
|
|
220
219
|
EmbedType["Link"] = "link";
|
|
220
|
+
/**
|
|
221
|
+
* Poll result embed
|
|
222
|
+
* https://discord.com/developers/docs/resources/message#embed-fields-by-embed-type-poll-result-embed-fields
|
|
223
|
+
*/
|
|
224
|
+
EmbedType["PollResult"] = "poll_result";
|
|
221
225
|
/**
|
|
222
226
|
* Auto moderation alert embed
|
|
223
227
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Types extracted from https://discord.com/developers/docs/resources/guild
|
|
3
3
|
*/
|
|
4
|
-
import type { Permissions, Snowflake
|
|
4
|
+
import type { GuildMemberFlags, Permissions, Snowflake } from '../index';
|
|
5
5
|
import type { APIEmoji, APIPartialEmoji } from './emoji';
|
|
6
6
|
import type { PresenceUpdateReceiveStatus } from './gateway';
|
|
7
7
|
import type { OAuth2Scopes } from './oauth2';
|
|
@@ -458,6 +458,10 @@ export declare enum GuildFeature {
|
|
|
458
458
|
* Guild has enabled Membership Screening
|
|
459
459
|
*/
|
|
460
460
|
MemberVerificationGateEnabled = "MEMBER_VERIFICATION_GATE_ENABLED",
|
|
461
|
+
/**
|
|
462
|
+
* Guild has increased custom soundboard sound slots
|
|
463
|
+
*/
|
|
464
|
+
MoreSoundboard = "MORE_SOUNDBOARD",
|
|
461
465
|
/**
|
|
462
466
|
* Guild has enabled monetization
|
|
463
467
|
*
|
|
@@ -501,6 +505,10 @@ export declare enum GuildFeature {
|
|
|
501
505
|
* Guild has enabled role subscriptions
|
|
502
506
|
*/
|
|
503
507
|
RoleSubscriptionsEnabled = "ROLE_SUBSCRIPTIONS_ENABLED",
|
|
508
|
+
/**
|
|
509
|
+
* Guild has created soundboard sounds
|
|
510
|
+
*/
|
|
511
|
+
Soundboard = "SOUNDBOARD",
|
|
504
512
|
/**
|
|
505
513
|
* Guild has enabled ticketed events
|
|
506
514
|
*/
|
|
@@ -194,6 +194,10 @@ var GuildFeature;
|
|
|
194
194
|
* Guild has enabled Membership Screening
|
|
195
195
|
*/
|
|
196
196
|
GuildFeature["MemberVerificationGateEnabled"] = "MEMBER_VERIFICATION_GATE_ENABLED";
|
|
197
|
+
/**
|
|
198
|
+
* Guild has increased custom soundboard sound slots
|
|
199
|
+
*/
|
|
200
|
+
GuildFeature["MoreSoundboard"] = "MORE_SOUNDBOARD";
|
|
197
201
|
/**
|
|
198
202
|
* Guild has enabled monetization
|
|
199
203
|
*
|
|
@@ -237,6 +241,10 @@ var GuildFeature;
|
|
|
237
241
|
* Guild has enabled role subscriptions
|
|
238
242
|
*/
|
|
239
243
|
GuildFeature["RoleSubscriptionsEnabled"] = "ROLE_SUBSCRIPTIONS_ENABLED";
|
|
244
|
+
/**
|
|
245
|
+
* Guild has created soundboard sounds
|
|
246
|
+
*/
|
|
247
|
+
GuildFeature["Soundboard"] = "SOUNDBOARD";
|
|
240
248
|
/**
|
|
241
249
|
* Guild has enabled ticketed events
|
|
242
250
|
*/
|
|
@@ -19,6 +19,7 @@ export * from './user';
|
|
|
19
19
|
export * from './voice';
|
|
20
20
|
export * from './webhook';
|
|
21
21
|
export * from './monetization';
|
|
22
|
+
export * from './soundboard';
|
|
22
23
|
import type { LocaleString } from '../rest';
|
|
23
24
|
export type LocalizationMap = Partial<Record<LocaleString, string | null>>;
|
|
24
25
|
/**
|
|
@@ -38,7 +38,7 @@ export interface APIEntitlement {
|
|
|
38
38
|
/**
|
|
39
39
|
* Date at which the entitlement is no longer valid. Not present when using test entitlements.
|
|
40
40
|
*/
|
|
41
|
-
ends_at?: string;
|
|
41
|
+
ends_at?: string | null;
|
|
42
42
|
/**
|
|
43
43
|
* For consumable items, whether or not the entitlement has been consumed
|
|
44
44
|
*/
|
|
@@ -148,3 +148,31 @@ export declare enum SKUType {
|
|
|
148
148
|
*/
|
|
149
149
|
SubscriptionGroup = 6
|
|
150
150
|
}
|
|
151
|
+
export interface APISubscription {
|
|
152
|
+
/** ID of the subscription */
|
|
153
|
+
id: string;
|
|
154
|
+
/** ID of the user who is subscribed */
|
|
155
|
+
user_id: string;
|
|
156
|
+
/** List of SKUs subscribed to */
|
|
157
|
+
sku_ids: string[];
|
|
158
|
+
/** List of entitlements granted for this subscription */
|
|
159
|
+
entitlements_ids: string[];
|
|
160
|
+
/** Start of the current subscription period */
|
|
161
|
+
current_period_start: string;
|
|
162
|
+
/** End of the current subscription period */
|
|
163
|
+
current_period_end: string;
|
|
164
|
+
/** Current status of the subscription */
|
|
165
|
+
status: SubscriptionStatus;
|
|
166
|
+
/** When the subscription was canceled */
|
|
167
|
+
canceled_at: string | null;
|
|
168
|
+
/** ISO3166-1 alpha-2 country code of the payment source used to purchase the subscription. Missing unless queried with a private OAuth scope. */
|
|
169
|
+
country?: string;
|
|
170
|
+
}
|
|
171
|
+
export declare enum SubscriptionStatus {
|
|
172
|
+
/** Subscription is active and scheduled to renew. */
|
|
173
|
+
Active = 0,
|
|
174
|
+
/** Subscription is active but will not renew. */
|
|
175
|
+
Ending = 1,
|
|
176
|
+
/** Subscription is inactive and not being charged. */
|
|
177
|
+
Inactive = 2
|
|
178
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SKUType = exports.SKUFlags = exports.EntitlementType = void 0;
|
|
3
|
+
exports.SubscriptionStatus = exports.SKUType = exports.SKUFlags = exports.EntitlementType = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types
|
|
6
6
|
*/
|
|
@@ -77,3 +77,12 @@ var SKUType;
|
|
|
77
77
|
*/
|
|
78
78
|
SKUType[SKUType["SubscriptionGroup"] = 6] = "SubscriptionGroup";
|
|
79
79
|
})(SKUType || (exports.SKUType = SKUType = {}));
|
|
80
|
+
var SubscriptionStatus;
|
|
81
|
+
(function (SubscriptionStatus) {
|
|
82
|
+
/** Subscription is active and scheduled to renew. */
|
|
83
|
+
SubscriptionStatus[SubscriptionStatus["Active"] = 0] = "Active";
|
|
84
|
+
/** Subscription is active but will not renew. */
|
|
85
|
+
SubscriptionStatus[SubscriptionStatus["Ending"] = 1] = "Ending";
|
|
86
|
+
/** Subscription is inactive and not being charged. */
|
|
87
|
+
SubscriptionStatus[SubscriptionStatus["Inactive"] = 2] = "Inactive";
|
|
88
|
+
})(SubscriptionStatus || (exports.SubscriptionStatus = SubscriptionStatus = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types extracted from https://discord.com/developers/docs/resources/soundboard
|
|
3
|
+
*/
|
|
4
|
+
import type { APIUser } from './user';
|
|
5
|
+
/** https://discord.com/developers/docs/resources/soundboard#soundboard-sound-object-soundboard-sound-structure */
|
|
6
|
+
export interface APISoundBoard {
|
|
7
|
+
/** the name of this sound */
|
|
8
|
+
name: string;
|
|
9
|
+
/** the id of this sound */
|
|
10
|
+
sound_id: string;
|
|
11
|
+
/** the volume of this sound, from 0 to 1 */
|
|
12
|
+
volume: number;
|
|
13
|
+
/** the id of this sound's custom emoji */
|
|
14
|
+
emoji_id: string | null;
|
|
15
|
+
/** the unicode character of this sound's standard emoji */
|
|
16
|
+
emoji_name: string | null;
|
|
17
|
+
/** the id of the guild this sound is in */
|
|
18
|
+
guild_id?: string;
|
|
19
|
+
/** whether this sound can be used, may be false due to loss of Server Boosts */
|
|
20
|
+
available: boolean;
|
|
21
|
+
/** the user who created this sound */
|
|
22
|
+
user?: APIUser;
|
|
23
|
+
}
|
|
@@ -149,7 +149,6 @@ var ConnectionService;
|
|
|
149
149
|
/**
|
|
150
150
|
* @deprecated This is the old name for {@apilink ConnectionService#X}
|
|
151
151
|
*/
|
|
152
|
-
// biome-ignore lint/correctness/noUndeclaredVariables: biome bug lol
|
|
153
152
|
ConnectionService["Twitter"] = "twitter";
|
|
154
153
|
ConnectionService["Xbox"] = "xbox";
|
|
155
154
|
ConnectionService["YouTube"] = "youtube";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { APIApplication, APIApplicationRoleConnectionMetadata, APIEmoji } from '../payloads';
|
|
2
|
+
import type { Nullable, StrictPartial } from '../utils';
|
|
3
|
+
import type { RESTPatchAPIGuildEmojiJSONBody, RESTPostAPIGuildEmojiJSONBody } from './emoji';
|
|
4
4
|
/**
|
|
5
5
|
* https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ChannelType, OverwriteType, Permissions, Snowflake, VideoQualityMode } from '..';
|
|
2
|
+
import type { APIActionRowComponent, APIAllowedMentions, APIAttachment, APIChannel, APIEmbed, APIExtendedInvite, APIFollowedChannel, APIGuildForumDefaultReactionEmoji, APIGuildForumTag, APIMessage, APIMessageActionRowComponent, APIMessageReference, APIThreadList, APIThreadMember, APIUser, ChannelFlags, ForumLayoutType, InviteTargetType, MessageFlags, SortOrderType, ThreadAutoArchiveDuration, ThreadChannelType } from '../payloads';
|
|
3
3
|
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../utils';
|
|
4
4
|
import type { RESTAPIPollCreate } from './poll';
|
|
5
5
|
export interface APIChannelPatchOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
|
@@ -211,22 +211,9 @@ export type APIMessageReferenceSend = AddUndefinedToPossiblyUndefinedPropertiesO
|
|
|
211
211
|
fail_if_not_exists?: boolean | undefined;
|
|
212
212
|
};
|
|
213
213
|
/**
|
|
214
|
-
* https://discord.com/developers/docs/resources/
|
|
214
|
+
* https://discord.com/developers/docs/resources/message#attachment-object
|
|
215
215
|
*/
|
|
216
|
-
export
|
|
217
|
-
/**
|
|
218
|
-
* Attachment id or a number that matches `n` in `files[n]`
|
|
219
|
-
*/
|
|
220
|
-
id: Snowflake | number;
|
|
221
|
-
/**
|
|
222
|
-
* Name of the file
|
|
223
|
-
*/
|
|
224
|
-
filename?: string | undefined;
|
|
225
|
-
/**
|
|
226
|
-
* Description of the file
|
|
227
|
-
*/
|
|
228
|
-
description?: string | undefined;
|
|
229
|
-
}
|
|
216
|
+
export type RESTAPIAttachment = Partial<Pick<APIAttachment, 'description' | 'duration_secs' | 'filename' | 'title' | 'waveform'>>;
|
|
230
217
|
/**
|
|
231
218
|
* https://discord.com/developers/docs/resources/channel#create-message
|
|
232
219
|
*/
|
|
@@ -392,7 +379,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
|
|
|
392
379
|
*
|
|
393
380
|
* Starting with API v10, the `attachments` array must contain all attachments that should be present after edit, including **retained and new** attachments provided in the request body.
|
|
394
381
|
*
|
|
395
|
-
* See https://discord.com/developers/docs/resources/
|
|
382
|
+
* See https://discord.com/developers/docs/resources/message#attachment-object
|
|
396
383
|
*/
|
|
397
384
|
attachments?: RESTAPIAttachment[] | undefined;
|
|
398
385
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Snowflake } from '..';
|
|
2
|
-
import type { APIChannel, APIDMChannel, APIGroupDMChannel,
|
|
3
|
-
import type {
|
|
2
|
+
import type { APIBan, APIChannel, APIDMChannel, APIExtendedInvite, APIGroupDMChannel, APIGuild, APIGuildIntegration, APIGuildMember, APIGuildMembershipScreening, APIGuildOnboarding, APIGuildOnboardingPrompt, APIGuildOnboardingPromptOption, APIGuildPreview, APIGuildWelcomeScreen, APIGuildWidget, APIGuildWidgetSettings, APIRole, APIThreadList, APIVoiceRegion, GuildDefaultMessageNotifications, GuildExplicitContentFilter, GuildFeature, GuildMFALevel, GuildSystemChannelFlags, GuildVerificationLevel, GuildWidgetStyle } from '../payloads';
|
|
3
|
+
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, DistributiveOmit, DistributivePick, Nullable, StrictPartial, StrictRequired } from '../utils';
|
|
4
4
|
import type { RESTPutAPIChannelPermissionJSONBody } from './channel';
|
|
5
5
|
export interface APIGuildCreateOverwrite extends RESTPutAPIChannelPermissionJSONBody {
|
|
6
6
|
id: number | string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Snowflake } from '..';
|
|
2
|
-
import type { APIGuildScheduledEvent,
|
|
2
|
+
import type { APIGuildScheduledEvent, APIGuildScheduledEventEntityMetadata, APIGuildScheduledEventUser, GuildScheduledEventEntityType, GuildScheduledEventPrivacyLevel, GuildScheduledEventStatus } from '../payloads';
|
|
3
3
|
import type { StrictPartial } from '../utils';
|
|
4
4
|
/**
|
|
5
5
|
* https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild
|
|
@@ -18,6 +18,7 @@ export * from './user';
|
|
|
18
18
|
export * from './voice';
|
|
19
19
|
export * from './webhook';
|
|
20
20
|
export * from './monetization';
|
|
21
|
+
export * from './soundboard';
|
|
21
22
|
export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5;
|
|
22
23
|
export type EmojiFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
|
23
24
|
export type GuildIconFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
|
package/lib/types/rest/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __exportStar(require("./user"), exports);
|
|
|
34
34
|
__exportStar(require("./voice"), exports);
|
|
35
35
|
__exportStar(require("./webhook"), exports);
|
|
36
36
|
__exportStar(require("./monetization"), exports);
|
|
37
|
+
__exportStar(require("./soundboard"), exports);
|
|
37
38
|
/**
|
|
38
39
|
* https://discord.com/developers/docs/topics/opcodes-and-status-codes#json-json-error-codes
|
|
39
40
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { APIApplicationCommand, APIApplicationCommandPermission, APIGuildApplicationCommandPermissions, APIInteractionResponse, APIInteractionResponseCallbackData, ApplicationCommandType } from '../payloads';
|
|
1
|
+
import type { APIApplicationCommand, APIApplicationCommandPermission, APIGuildApplicationCommandPermissions, APIInteractionCallbackLaunchActivity, APIInteractionCallbackMessage, APIInteractionResponse, APIInteractionResponseCallbackData, ApplicationCommandType, EntryPointCommandHandlerType } from '../payloads';
|
|
2
2
|
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, NonNullableFields, StrictPartial } from '../utils';
|
|
3
3
|
import type { RESTDeleteAPIWebhookWithTokenMessageResult, RESTGetAPIWebhookWithTokenMessageResult, RESTPatchAPIWebhookWithTokenMessageFormDataBody, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageResult, RESTPostAPIWebhookWithTokenWaitResult } from './webhook';
|
|
4
4
|
/**
|
|
@@ -21,7 +21,7 @@ export type RESTGetAPIApplicationCommandsResult = APIApplicationCommand[];
|
|
|
21
21
|
* https://discord.com/developers/docs/interactions/application-commands#get-global-application-command
|
|
22
22
|
*/
|
|
23
23
|
export type RESTGetAPIApplicationCommandResult = APIApplicationCommand;
|
|
24
|
-
type RESTPostAPIBaseApplicationCommandsJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Omit<APIApplicationCommand, 'application_id' | 'contexts' | 'default_member_permissions' | 'description_localized' | 'description' | 'guild_id' | 'id' | 'integration_types' | 'name_localized' | 'type' | 'version'> & Partial<NonNullableFields<Pick<APIApplicationCommand, 'contexts'>> & Pick<APIApplicationCommand, 'default_member_permissions' | 'integration_types'>>>;
|
|
24
|
+
type RESTPostAPIBaseApplicationCommandsJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Omit<APIApplicationCommand, 'application_id' | 'contexts' | 'default_member_permissions' | 'description_localized' | 'description' | 'guild_id' | 'id' | 'integration_types' | 'name_localized' | 'type' | 'version' | 'handler'> & Partial<NonNullableFields<Pick<APIApplicationCommand, 'contexts'>> & Pick<APIApplicationCommand, 'default_member_permissions' | 'integration_types'>>>;
|
|
25
25
|
/**
|
|
26
26
|
* https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
|
|
27
27
|
*/
|
|
@@ -38,7 +38,15 @@ export interface RESTPostAPIContextMenuApplicationCommandsJSONBody extends RESTP
|
|
|
38
38
|
/**
|
|
39
39
|
* https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
|
|
40
40
|
*/
|
|
41
|
-
export
|
|
41
|
+
export interface RESTPostAPIEntryPointApplicationCommandsJSONBody extends RESTPostAPIBaseApplicationCommandsJSONBody {
|
|
42
|
+
type: ApplicationCommandType.PrimaryEntryPoint;
|
|
43
|
+
description: string;
|
|
44
|
+
handler: EntryPointCommandHandlerType;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
|
|
48
|
+
*/
|
|
49
|
+
export type RESTPostAPIApplicationCommandsJSONBody = RESTPostAPIChatInputApplicationCommandsJSONBody | RESTPostAPIContextMenuApplicationCommandsJSONBody | RESTPostAPIEntryPointApplicationCommandsJSONBody;
|
|
42
50
|
/**
|
|
43
51
|
* https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
|
|
44
52
|
*/
|
|
@@ -63,14 +71,15 @@ export type RESTPutAPIApplicationCommandsResult = APIApplicationCommand[];
|
|
|
63
71
|
* https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
|
|
64
72
|
*/
|
|
65
73
|
export type RESTGetAPIApplicationGuildCommandsQuery = RESTGetAPIApplicationCommandsQuery;
|
|
74
|
+
export type RESTAPIApplicationGuildCommand = Omit<APIApplicationCommand, 'dm_permission' | 'handler'>;
|
|
66
75
|
/**
|
|
67
76
|
* https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
|
|
68
77
|
*/
|
|
69
|
-
export type RESTGetAPIApplicationGuildCommandsResult =
|
|
78
|
+
export type RESTGetAPIApplicationGuildCommandsResult = RESTAPIApplicationGuildCommand[];
|
|
70
79
|
/**
|
|
71
80
|
* https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
|
|
72
81
|
*/
|
|
73
|
-
export type RESTGetAPIApplicationGuildCommandResult =
|
|
82
|
+
export type RESTGetAPIApplicationGuildCommandResult = RESTAPIApplicationGuildCommand;
|
|
74
83
|
/**
|
|
75
84
|
* https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command
|
|
76
85
|
*/
|
|
@@ -78,7 +87,7 @@ export type RESTPostAPIApplicationGuildCommandsJSONBody = Omit<RESTPostAPIChatIn
|
|
|
78
87
|
/**
|
|
79
88
|
* https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command
|
|
80
89
|
*/
|
|
81
|
-
export type RESTPostAPIApplicationGuildCommandsResult =
|
|
90
|
+
export type RESTPostAPIApplicationGuildCommandsResult = RESTAPIApplicationGuildCommand;
|
|
82
91
|
/**
|
|
83
92
|
* https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command
|
|
84
93
|
*/
|
|
@@ -86,7 +95,7 @@ export type RESTPatchAPIApplicationGuildCommandJSONBody = StrictPartial<Omit<RES
|
|
|
86
95
|
/**
|
|
87
96
|
* https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command
|
|
88
97
|
*/
|
|
89
|
-
export type RESTPatchAPIApplicationGuildCommandResult =
|
|
98
|
+
export type RESTPatchAPIApplicationGuildCommandResult = RESTAPIApplicationGuildCommand;
|
|
90
99
|
/**
|
|
91
100
|
* https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
|
|
92
101
|
*/
|
|
@@ -94,11 +103,24 @@ export type RESTPutAPIApplicationGuildCommandsJSONBody = ((Omit<RESTPostAPIChatI
|
|
|
94
103
|
/**
|
|
95
104
|
* https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
|
|
96
105
|
*/
|
|
97
|
-
export type RESTPutAPIApplicationGuildCommandsResult =
|
|
106
|
+
export type RESTPutAPIApplicationGuildCommandsResult = RESTAPIApplicationGuildCommand[];
|
|
98
107
|
/**
|
|
99
108
|
* https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
|
|
100
109
|
*/
|
|
101
110
|
export type RESTPostAPIInteractionCallbackJSONBody = APIInteractionResponse;
|
|
111
|
+
/**
|
|
112
|
+
* https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response-query-string-params
|
|
113
|
+
*/
|
|
114
|
+
export type RESTPostAPIInteractionCallbackQuery = {
|
|
115
|
+
/**
|
|
116
|
+
* Whether to include a RESTPostAPIInteractionCallbackResult as the response instead of a 204.
|
|
117
|
+
*/
|
|
118
|
+
with_response?: boolean;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback
|
|
122
|
+
*/
|
|
123
|
+
export type RESTPostAPIInteractionCallbackResult = APIInteractionCallbackLaunchActivity | APIInteractionCallbackMessage;
|
|
102
124
|
/**
|
|
103
125
|
* https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
|
|
104
126
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Snowflake } from '..';
|
|
2
|
-
import type { APIEntitlement, APISKU } from '../payloads';
|
|
2
|
+
import type { APIEntitlement, APISKU, APISubscription } from '../payloads';
|
|
3
3
|
/**
|
|
4
4
|
* https://discord.com/developers/docs/monetization/entitlements#list-entitlements
|
|
5
5
|
*/
|
|
@@ -80,3 +80,24 @@ export type RESTGetAPISKUsResult = APISKU[];
|
|
|
80
80
|
* https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement
|
|
81
81
|
*/
|
|
82
82
|
export type RESTPostAPIEntitlementConsumeResult = never;
|
|
83
|
+
/**
|
|
84
|
+
* https://canary.discord.com/developers/docs/resources/subscription#query-string-params
|
|
85
|
+
*/
|
|
86
|
+
export interface RESTGetAPISKUSubscriptionsQuery {
|
|
87
|
+
/** List subscriptions before this ID */
|
|
88
|
+
before?: string;
|
|
89
|
+
/** List subscriptions after this ID */
|
|
90
|
+
after?: string;
|
|
91
|
+
/** Number of results to return (1-100) */
|
|
92
|
+
limit?: number;
|
|
93
|
+
/** User ID for which to return subscriptions. Required except for OAuth queries. */
|
|
94
|
+
user_id?: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* https://canary.discord.com/developers/docs/resources/subscription#list-sku-subscriptions
|
|
98
|
+
*/
|
|
99
|
+
export type RESTGetAPISKUSubscriptionsResult = APISubscription[];
|
|
100
|
+
/**
|
|
101
|
+
* https://canary.discord.com/developers/docs/resources/subscription#get-sku-subscription
|
|
102
|
+
*/
|
|
103
|
+
export type RESTGetAPISKUSubscriptionResult = APISubscription;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Snowflake } from '..';
|
|
2
|
-
import type { APIApplication,
|
|
2
|
+
import type { APIApplication, APIGuild, APIUser, APIWebhook, OAuth2Scopes } from '../payloads';
|
|
3
3
|
/**
|
|
4
4
|
* https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information
|
|
5
5
|
*/
|
package/lib/types/rest/poll.d.ts
CHANGED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { APISoundBoard } from '../payloads/soundboard';
|
|
2
|
+
/**
|
|
3
|
+
* https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound
|
|
4
|
+
* @fires VoiceChannelEffectSend
|
|
5
|
+
* @requires Permissions Speak and UseSoundboard
|
|
6
|
+
* @satisfies VoiceState without deaf, self_deaf, mute, or suppress enabled.
|
|
7
|
+
*/
|
|
8
|
+
export interface RESTPostAPISendSoundboardSound {
|
|
9
|
+
/** the id of the soundboard sound to play */
|
|
10
|
+
sound_id: string;
|
|
11
|
+
/** the id of the guild the soundboard sound is from, required to play sounds from different servers */
|
|
12
|
+
source_guild_id?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* https://discord.com/developers/docs/resources/soundboard#list-default-soundboard-sounds
|
|
16
|
+
*/
|
|
17
|
+
export type RESTGetAPIDefaultsSoundboardSoundsResult = Omit<APISoundBoard, 'user' | 'guild_id'>[];
|
|
18
|
+
/**
|
|
19
|
+
* https://discord.com/developers/docs/resources/soundboard#list-guild-soundboard-sounds
|
|
20
|
+
*/
|
|
21
|
+
export type RESTGetAPIGuildSoundboardSoundsResult = {
|
|
22
|
+
items: APISoundBoard[];
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound
|
|
26
|
+
*
|
|
27
|
+
* Soundboard sounds have a max file size of 512kb and a max duration of 5.2 seconds.
|
|
28
|
+
* This endpoint supports the X-Audit-Log-Reason header.
|
|
29
|
+
* @requires Permission CreateGuildExpressions
|
|
30
|
+
*/
|
|
31
|
+
export interface RESTPostAPIGuildSoundboardSound {
|
|
32
|
+
/** name of the soundboard sound (2-32 characters) */
|
|
33
|
+
name: string;
|
|
34
|
+
/** the mp3 or ogg sound data, base64 encoded, similar to image data */
|
|
35
|
+
sound: string;
|
|
36
|
+
/** the volume of the soundboard sound, from 0 to 1, defaults to 1 */
|
|
37
|
+
volume?: number | null;
|
|
38
|
+
/** the id of the custom emoji for the soundboard sound */
|
|
39
|
+
emoji_id?: string | null;
|
|
40
|
+
/** the unicode character of a standard emoji for the soundboard sound */
|
|
41
|
+
emoji_name?: string | null;
|
|
42
|
+
}
|
|
43
|
+
export type RESTPostAPIGuildSoundboardSoundResult = APISoundBoard;
|
|
44
|
+
/**
|
|
45
|
+
* https://discord.com/developers/docs/resources/soundboard#modify-guild-soundboard-sound
|
|
46
|
+
* @fires GuildSoundboardSoundUpdate
|
|
47
|
+
*/
|
|
48
|
+
export interface RESTPatchAPIGuildSoundboardSound {
|
|
49
|
+
/** name of the soundboard sound (2-32 characters) */
|
|
50
|
+
name?: string;
|
|
51
|
+
/** the volume of the soundboard sound, from 0 to 1, defaults to 1 */
|
|
52
|
+
volume?: number | null;
|
|
53
|
+
/** the id of the custom emoji for the soundboard sound */
|
|
54
|
+
emoji_id?: string | null;
|
|
55
|
+
/** the unicode character of a standard emoji for the soundboard sound */
|
|
56
|
+
emoji_name?: string | null;
|
|
57
|
+
}
|
|
58
|
+
export type RESTPatchAPIGuildSoundboardSoundResult = APISoundBoard;
|
|
59
|
+
/**
|
|
60
|
+
* https://discord.com/developers/docs/resources/soundboard#delete-guild-soundboard-sound
|
|
61
|
+
* This endpoint supports the X-Audit-Log-Reason header.
|
|
62
|
+
* @fires GuildSoundboardSoundDelete
|
|
63
|
+
*/
|
|
64
|
+
export type RESTDeleteAPIGuildSoundboardSoundResult = never;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Snowflake } from '..';
|
|
2
|
-
import type {
|
|
2
|
+
import type { APIStageInstance, StageInstancePrivacyLevel } from '../payloads';
|
|
3
3
|
/**
|
|
4
4
|
* https://discord.com/developers/docs/resources/stage-instance#create-stage-instance
|
|
5
5
|
*/
|
package/lib/types/rest/user.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Snowflake } from '..';
|
|
2
|
-
import type {
|
|
2
|
+
import type { APIApplicationRoleConnection, APIChannel, APIConnection, APIGuildMember, APIUser, GuildFeature } from '../payloads';
|
|
3
3
|
/**
|
|
4
4
|
* https://discord.com/developers/docs/resources/user#get-current-user
|
|
5
5
|
*/
|