seyfert 3.2.5 → 3.2.6-dev-16864422320.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 +4 -3
- package/lib/api/Routes/cdn.d.ts +4 -1
- package/lib/api/Routes/channels.d.ts +8 -8
- package/lib/api/Routes/guilds.d.ts +1 -2
- package/lib/api/utils/constants.d.ts +3 -1
- package/lib/api/utils/constants.js +3 -2
- package/lib/common/shorters/channels.d.ts +8 -2
- package/lib/common/shorters/channels.js +13 -7
- package/lib/common/shorters/guilds.d.ts +1 -7
- package/lib/common/shorters/guilds.js +0 -10
- package/lib/common/shorters/invites.d.ts +10 -0
- package/lib/events/hooks/guild.d.ts +9 -0
- package/lib/events/hooks/invite.d.ts +2 -0
- package/lib/events/hooks/message.d.ts +9 -0
- package/lib/events/hooks/presence.d.ts +6 -0
- package/lib/events/hooks/soundboard.d.ts +1 -0
- package/lib/events/hooks/thread.d.ts +18 -0
- package/lib/structures/Guild.d.ts +6 -0
- package/lib/structures/channels.d.ts +21 -3
- package/lib/structures/channels.js +1 -1
- package/lib/types/payloads/permissions.d.ts +22 -0
- package/lib/types/payloads/user.d.ts +29 -0
- package/lib/types/rest/channel.d.ts +24 -1
- package/lib/types/rest/guild.d.ts +1 -0
- package/package.json +2 -2
package/lib/api/Router.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { APIRoutes, ApiHandler, CDNRoute } from './index';
|
|
2
|
-
import type { ImageExtension, ImageSize, SoundExtension, StickerExtension } from './shared';
|
|
2
|
+
import type { ImageExtension, ImageSize, SoundExtension, StickerExtension, TagBadgeExtension } from './shared';
|
|
3
3
|
export declare enum ProxyRequestMethod {
|
|
4
4
|
Delete = "delete",
|
|
5
5
|
Get = "get",
|
|
@@ -16,8 +16,9 @@ export declare class Router {
|
|
|
16
16
|
export declare const CDNRouter: {
|
|
17
17
|
createProxy(route?: string[]): CDNRoute;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
20
|
-
|
|
19
|
+
export type AllCDNExtensions = ImageExtension | StickerExtension | SoundExtension | TagBadgeExtension;
|
|
20
|
+
export interface BaseCDNUrlOptions<T extends AllCDNExtensions = AllCDNExtensions> {
|
|
21
|
+
extension?: T;
|
|
21
22
|
size?: ImageSize;
|
|
22
23
|
}
|
|
23
24
|
export interface CDNUrlOptions extends BaseCDNUrlOptions {
|
package/lib/api/Routes/cdn.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseCDNUrlOptions, CDNUrlOptions } from '../..';
|
|
1
|
+
import type { BaseCDNUrlOptions, CDNUrlOptions, TagBadgeExtension } from '../..';
|
|
2
2
|
import type { SoundExtension, StickerExtension } from '../shared';
|
|
3
3
|
export interface CDNRoute {
|
|
4
4
|
embed: {
|
|
@@ -40,6 +40,9 @@ export interface CDNRoute {
|
|
|
40
40
|
'guild-events'(eventId: string): {
|
|
41
41
|
get(hash: string, options?: BaseCDNUrlOptions): string;
|
|
42
42
|
};
|
|
43
|
+
'guild-tag-badges'(guildId: string): {
|
|
44
|
+
get(hash: string, options?: BaseCDNUrlOptions<TagBadgeExtension>): string;
|
|
45
|
+
};
|
|
43
46
|
emojis(id: string): {
|
|
44
47
|
get(options?: BaseCDNUrlOptions): string;
|
|
45
48
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RESTDeleteAPIChannelAllMessageReactionsResult, RESTDeleteAPIChannelMessageReactionResult, RESTDeleteAPIChannelMessageResult, RESTDeleteAPIChannelPermissionResult, RESTDeleteAPIChannelPinResult, RESTDeleteAPIChannelRecipientResult, RESTDeleteAPIChannelResult, RESTDeleteAPIChannelThreadMembersResult, RESTGetAPIChannelInvitesResult, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTGetAPIChannelMessageResult, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTGetAPIChannelResult, RESTGetAPIChannelThreadMemberQuery, RESTGetAPIChannelThreadMemberResult, RESTGetAPIChannelThreadMembersQuery, RESTGetAPIChannelThreadMembersResult, RESTGetAPIChannelThreadsArchivedPrivateResult, RESTGetAPIChannelThreadsArchivedPublicResult, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTGetAPIGuildWebhooksResult, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTPatchAPIChannelJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageResult, RESTPatchAPIChannelResult, RESTPostAPIChannelFollowersJSONBody, RESTPostAPIChannelFollowersResult, RESTPostAPIChannelInviteJSONBody, RESTPostAPIChannelInviteResult, RESTPostAPIChannelMessageCrosspostResult, RESTPostAPIChannelMessageJSONBody, RESTPostAPIChannelMessageResult, RESTPostAPIChannelMessagesBulkDeleteJSONBody, RESTPostAPIChannelMessagesBulkDeleteResult, RESTPostAPIChannelMessagesThreadsJSONBody, RESTPostAPIChannelMessagesThreadsResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsResult, RESTPostAPIChannelTypingResult, RESTPostAPIChannelWebhookJSONBody, RESTPostAPIChannelWebhookResult, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIPollExpireResult, RESTPostAPISendSoundboardSound, RESTPutAPIChannelMessageReactionResult, RESTPutAPIChannelPermissionJSONBody, RESTPutAPIChannelPermissionResult, RESTPutAPIChannelPinResult, RESTPutAPIChannelRecipientJSONBody, RESTPutAPIChannelRecipientResult, RESTPutAPIChannelThreadMembersResult } from '../../types';
|
|
1
|
+
import type { RESTDeleteAPIChannelAllMessageReactionsResult, RESTDeleteAPIChannelMessageReactionResult, RESTDeleteAPIChannelMessageResult, RESTDeleteAPIChannelPermissionResult, RESTDeleteAPIChannelPinResult, RESTDeleteAPIChannelRecipientResult, RESTDeleteAPIChannelResult, RESTDeleteAPIChannelThreadMembersResult, RESTGetAPIChannelInvitesResult, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTGetAPIChannelMessageResult, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsQuery, RESTGetAPIChannelPinsResult, RESTGetAPIChannelResult, RESTGetAPIChannelThreadMemberQuery, RESTGetAPIChannelThreadMemberResult, RESTGetAPIChannelThreadMembersQuery, RESTGetAPIChannelThreadMembersResult, RESTGetAPIChannelThreadsArchivedPrivateResult, RESTGetAPIChannelThreadsArchivedPublicResult, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTGetAPIGuildWebhooksResult, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTPatchAPIChannelJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageResult, RESTPatchAPIChannelResult, RESTPostAPIChannelFollowersJSONBody, RESTPostAPIChannelFollowersResult, RESTPostAPIChannelInviteJSONBody, RESTPostAPIChannelInviteResult, RESTPostAPIChannelMessageCrosspostResult, RESTPostAPIChannelMessageJSONBody, RESTPostAPIChannelMessageResult, RESTPostAPIChannelMessagesBulkDeleteJSONBody, RESTPostAPIChannelMessagesBulkDeleteResult, RESTPostAPIChannelMessagesThreadsJSONBody, RESTPostAPIChannelMessagesThreadsResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsResult, RESTPostAPIChannelTypingResult, RESTPostAPIChannelWebhookJSONBody, RESTPostAPIChannelWebhookResult, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIPollExpireResult, RESTPostAPISendSoundboardSound, RESTPutAPIChannelMessageReactionResult, RESTPutAPIChannelPermissionJSONBody, RESTPutAPIChannelPermissionResult, RESTPutAPIChannelPinResult, RESTPutAPIChannelRecipientJSONBody, RESTPutAPIChannelRecipientResult, RESTPutAPIChannelThreadMembersResult } from '../../types';
|
|
2
2
|
import type { RestArguments, RestArgumentsNoBody } from '../api';
|
|
3
3
|
export interface ChannelRoutes {
|
|
4
4
|
channels(id: string): {
|
|
@@ -41,13 +41,6 @@ export interface ChannelRoutes {
|
|
|
41
41
|
put(args?: RestArguments<RESTPutAPIChannelRecipientJSONBody>): Promise<RESTPutAPIChannelRecipientResult>;
|
|
42
42
|
delete(args?: RestArgumentsNoBody): Promise<RESTDeleteAPIChannelRecipientResult>;
|
|
43
43
|
};
|
|
44
|
-
pins: {
|
|
45
|
-
get(args?: RestArgumentsNoBody): Promise<RESTGetAPIChannelPinsResult>;
|
|
46
|
-
(id: string): {
|
|
47
|
-
put(args?: RestArgumentsNoBody): Promise<RESTPutAPIChannelPinResult>;
|
|
48
|
-
delete(args?: RestArgumentsNoBody): Promise<RESTDeleteAPIChannelPinResult>;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
44
|
followers: {
|
|
52
45
|
post(args: RestArguments<RESTPostAPIChannelFollowersJSONBody>): Promise<RESTPostAPIChannelFollowersResult>;
|
|
53
46
|
};
|
|
@@ -65,6 +58,13 @@ export interface ChannelRoutes {
|
|
|
65
58
|
'bulk-delete': {
|
|
66
59
|
post(args: RestArguments<RESTPostAPIChannelMessagesBulkDeleteJSONBody>): Promise<RESTPostAPIChannelMessagesBulkDeleteResult>;
|
|
67
60
|
};
|
|
61
|
+
pins: {
|
|
62
|
+
get(args?: RestArgumentsNoBody<RESTGetAPIChannelPinsQuery>): Promise<RESTGetAPIChannelPinsResult>;
|
|
63
|
+
(id: string): {
|
|
64
|
+
put(args?: RestArgumentsNoBody): Promise<RESTPutAPIChannelPinResult>;
|
|
65
|
+
delete(args?: RestArgumentsNoBody): Promise<RESTDeleteAPIChannelPinResult>;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
68
|
(id: string): {
|
|
69
69
|
get(args?: RestArgumentsNoBody): Promise<RESTGetAPIChannelMessageResult>;
|
|
70
70
|
patch(args: RestArguments<RESTPatchAPIChannelMessageJSONBody>): Promise<RESTPatchAPIChannelMessageResult>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { Identify, OmitInsert } from '../../common';
|
|
2
|
-
import type { APIThreadChannel, RESTDeleteAPIAutoModerationRuleResult, RESTDeleteAPIGuildBanResult, RESTDeleteAPIGuildEmojiResult, RESTDeleteAPIGuildIntegrationResult, RESTDeleteAPIGuildMemberResult, RESTDeleteAPIGuildMemberRoleResult, RESTDeleteAPIGuildResult, RESTDeleteAPIGuildRoleResult, RESTDeleteAPIGuildScheduledEventResult, RESTDeleteAPIGuildStickerResult, RESTDeleteAPIGuildTemplateResult, RESTGetAPIAuditLogQuery, RESTGetAPIAuditLogResult, RESTGetAPIAutoModerationRuleResult, RESTGetAPIAutoModerationRulesResult, RESTGetAPICurrentUserVoiceState, RESTGetAPIGuildBanResult, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTGetAPIGuildChannelsResult, RESTGetAPIGuildEmojiResult, RESTGetAPIGuildEmojisResult, RESTGetAPIGuildIntegrationsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTGetAPIGuildPreviewResult, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTGetAPIGuildQuery, RESTGetAPIGuildResult, RESTGetAPIGuildRoleResult, RESTGetAPIGuildRolesResult, RESTGetAPIGuildScheduledEventQuery, RESTGetAPIGuildScheduledEventResult, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildSoundboardSoundsResult, RESTGetAPIGuildStickerResult, RESTGetAPIGuildStickersResult, RESTGetAPIGuildTemplatesResult, RESTGetAPIGuildThreadsResult, RESTGetAPIGuildVanityUrlResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildWebhooksResult, RESTGetAPIGuildWelcomeScreenResult, RESTGetAPIGuildWidgetImageQuery, RESTGetAPIGuildWidgetImageResult, RESTGetAPIGuildWidgetJSONResult, RESTGetAPIGuildWidgetSettingsResult, RESTGetAPITemplateResult, RESTGetAPIUserVoiceState, RESTPatchAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleResult, RESTPatchAPICurrentGuildMemberJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTPatchAPIGuildChannelPositionsResult, RESTPatchAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiResult, RESTPatchAPIGuildJSONBody, RESTPatchAPIGuildMemberJSONBody, RESTPatchAPIGuildMemberResult, RESTPatchAPIGuildResult, RESTPatchAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleResult, RESTPatchAPIGuildScheduledEventJSONBody, RESTPatchAPIGuildScheduledEventResult, RESTPatchAPIGuildSoundboardSound, RESTPatchAPIGuildSoundboardSoundResult, RESTPatchAPIGuildStickerJSONBody, RESTPatchAPIGuildStickerResult, RESTPatchAPIGuildTemplateJSONBody, RESTPatchAPIGuildTemplateResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPatchAPIGuildVoiceStateCurrentMemberResult, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTPatchAPIGuildVoiceStateUserResult, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildWelcomeScreenResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTPatchAPIGuildWidgetSettingsResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPostAPIAutoModerationRuleResult, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTPostAPIGuildChannelJSONBody, RESTPostAPIGuildChannelResult, RESTPostAPIGuildEmojiJSONBody, RESTPostAPIGuildEmojiResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTPostAPIGuildRoleJSONBody, RESTPostAPIGuildRoleResult, RESTPostAPIGuildScheduledEventJSONBody, RESTPostAPIGuildScheduledEventResult, RESTPostAPIGuildSoundboardSound, RESTPostAPIGuildSoundboardSoundResult, RESTPostAPIGuildStickerFormDataBody, RESTPostAPIGuildStickerResult,
|
|
2
|
+
import type { APIThreadChannel, RESTDeleteAPIAutoModerationRuleResult, RESTDeleteAPIGuildBanResult, RESTDeleteAPIGuildEmojiResult, RESTDeleteAPIGuildIntegrationResult, RESTDeleteAPIGuildMemberResult, RESTDeleteAPIGuildMemberRoleResult, RESTDeleteAPIGuildResult, RESTDeleteAPIGuildRoleResult, RESTDeleteAPIGuildScheduledEventResult, RESTDeleteAPIGuildStickerResult, RESTDeleteAPIGuildTemplateResult, RESTGetAPIAuditLogQuery, RESTGetAPIAuditLogResult, RESTGetAPIAutoModerationRuleResult, RESTGetAPIAutoModerationRulesResult, RESTGetAPICurrentUserVoiceState, RESTGetAPIGuildBanResult, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTGetAPIGuildChannelsResult, RESTGetAPIGuildEmojiResult, RESTGetAPIGuildEmojisResult, RESTGetAPIGuildIntegrationsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTGetAPIGuildPreviewResult, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTGetAPIGuildQuery, RESTGetAPIGuildResult, RESTGetAPIGuildRoleResult, RESTGetAPIGuildRolesResult, RESTGetAPIGuildScheduledEventQuery, RESTGetAPIGuildScheduledEventResult, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildSoundboardSoundsResult, RESTGetAPIGuildStickerResult, RESTGetAPIGuildStickersResult, RESTGetAPIGuildTemplatesResult, RESTGetAPIGuildThreadsResult, RESTGetAPIGuildVanityUrlResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildWebhooksResult, RESTGetAPIGuildWelcomeScreenResult, RESTGetAPIGuildWidgetImageQuery, RESTGetAPIGuildWidgetImageResult, RESTGetAPIGuildWidgetJSONResult, RESTGetAPIGuildWidgetSettingsResult, RESTGetAPITemplateResult, RESTGetAPIUserVoiceState, RESTPatchAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleResult, RESTPatchAPICurrentGuildMemberJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTPatchAPIGuildChannelPositionsResult, RESTPatchAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiResult, RESTPatchAPIGuildJSONBody, RESTPatchAPIGuildMemberJSONBody, RESTPatchAPIGuildMemberResult, RESTPatchAPIGuildResult, RESTPatchAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleResult, RESTPatchAPIGuildScheduledEventJSONBody, RESTPatchAPIGuildScheduledEventResult, RESTPatchAPIGuildSoundboardSound, RESTPatchAPIGuildSoundboardSoundResult, RESTPatchAPIGuildStickerJSONBody, RESTPatchAPIGuildStickerResult, RESTPatchAPIGuildTemplateJSONBody, RESTPatchAPIGuildTemplateResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPatchAPIGuildVoiceStateCurrentMemberResult, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTPatchAPIGuildVoiceStateUserResult, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildWelcomeScreenResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTPatchAPIGuildWidgetSettingsResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPostAPIAutoModerationRuleResult, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTPostAPIGuildChannelJSONBody, RESTPostAPIGuildChannelResult, RESTPostAPIGuildEmojiJSONBody, RESTPostAPIGuildEmojiResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTPostAPIGuildRoleJSONBody, RESTPostAPIGuildRoleResult, RESTPostAPIGuildScheduledEventJSONBody, RESTPostAPIGuildScheduledEventResult, RESTPostAPIGuildSoundboardSound, RESTPostAPIGuildSoundboardSoundResult, RESTPostAPIGuildStickerFormDataBody, RESTPostAPIGuildStickerResult, RESTPostAPIGuildsMFAJSONBody, RESTPostAPIGuildsMFAResult, RESTPostAPIGuildTemplatesJSONBody, RESTPostAPIGuildTemplatesResult, RESTPostAPITemplateCreateGuildJSONBody, RESTPostAPITemplateCreateGuildResult, RESTPutAPIGuildBanJSONBody, RESTPutAPIGuildBanResult, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTPutAPIGuildMemberRoleResult, RESTPutAPIGuildTemplateSyncResult } from '../../types';
|
|
3
3
|
import type { RestArguments, RestArgumentsNoBody } from '../api';
|
|
4
4
|
import type { RawFile } from '../shared';
|
|
5
5
|
export interface GuildRoutes {
|
|
6
6
|
guilds: {
|
|
7
|
-
post(args: RestArguments<RESTPostAPIGuildsJSONBody>): Promise<RESTPostAPIGuildsResult>;
|
|
8
7
|
templates(code: string): {
|
|
9
8
|
get(args?: RestArgumentsNoBody): Promise<RESTGetAPITemplateResult>;
|
|
10
9
|
post(args: RestArguments<RESTPostAPITemplateCreateGuildJSONBody>): Promise<RESTPostAPITemplateCreateGuildResult>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export declare const DefaultUserAgent = "DiscordBot (https://seyfert.dev,
|
|
1
|
+
export declare const DefaultUserAgent = "DiscordBot (https://seyfert.dev, v3.2.5)";
|
|
2
2
|
export declare const ALLOWED_EXTENSIONS: readonly ["webp", "png", "jpg", "jpeg", "gif"];
|
|
3
3
|
export declare const ALLOWED_STICKER_EXTENSIONS: readonly ["png", "json", "gif"];
|
|
4
4
|
export declare const ALLOWED_SIZES: readonly [16, 32, 64, 100, 128, 256, 512, 1024, 2048, 4096];
|
|
5
5
|
export declare const ALLOWED_SOUNDS_EXTENSIONS: readonly ["mp3", "ogg"];
|
|
6
|
+
export declare const ALLOWED_TAG_BADGE_EXTENSIONS: readonly ["png", "jpeg", "webp"];
|
|
6
7
|
export type ImageExtension = (typeof ALLOWED_EXTENSIONS)[number];
|
|
7
8
|
export type StickerExtension = (typeof ALLOWED_STICKER_EXTENSIONS)[number];
|
|
8
9
|
export type ImageSize = (typeof ALLOWED_SIZES)[number];
|
|
9
10
|
export type SoundExtension = (typeof ALLOWED_SOUNDS_EXTENSIONS)[number];
|
|
11
|
+
export type TagBadgeExtension = (typeof ALLOWED_TAG_BADGE_EXTENSIONS)[number];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ALLOWED_SOUNDS_EXTENSIONS = exports.ALLOWED_SIZES = exports.ALLOWED_STICKER_EXTENSIONS = exports.ALLOWED_EXTENSIONS = exports.DefaultUserAgent = void 0;
|
|
4
|
-
exports.DefaultUserAgent = 'DiscordBot (https://seyfert.dev,
|
|
3
|
+
exports.ALLOWED_TAG_BADGE_EXTENSIONS = exports.ALLOWED_SOUNDS_EXTENSIONS = exports.ALLOWED_SIZES = exports.ALLOWED_STICKER_EXTENSIONS = exports.ALLOWED_EXTENSIONS = exports.DefaultUserAgent = void 0;
|
|
4
|
+
exports.DefaultUserAgent = 'DiscordBot (https://seyfert.dev, v3.2.5)';
|
|
5
5
|
exports.ALLOWED_EXTENSIONS = ['webp', 'png', 'jpg', 'jpeg', 'gif'];
|
|
6
6
|
exports.ALLOWED_STICKER_EXTENSIONS = ['png', 'json', 'gif'];
|
|
7
7
|
exports.ALLOWED_SIZES = [16, 32, 64, 100, 128, 256, 512, 1_024, 2_048, 4_096];
|
|
8
8
|
exports.ALLOWED_SOUNDS_EXTENSIONS = ['mp3', 'ogg'];
|
|
9
|
+
exports.ALLOWED_TAG_BADGE_EXTENSIONS = ['png', 'jpeg', 'webp'];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type MessageStructure, type ThreadChannelStructure } from '../../client/transformers';
|
|
2
2
|
import { type AllChannels, type GuildMember, type GuildRole } from '../../structures';
|
|
3
3
|
import { PermissionsBitField } from '../../structures/extra/Permissions';
|
|
4
|
-
import type { APIChannel, RESTGetAPIChannelMessagesQuery, RESTPatchAPIChannelJSONBody, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIGuildForumThreadsJSONBody } from '../../types';
|
|
4
|
+
import type { APIChannel, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelPinsQuery, RESTPatchAPIChannelJSONBody, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIGuildForumThreadsJSONBody } from '../../types';
|
|
5
5
|
import { BaseShorter } from './base';
|
|
6
6
|
export declare class ChannelShorter extends BaseShorter {
|
|
7
7
|
/**
|
|
@@ -33,7 +33,13 @@ export declare class ChannelShorter extends BaseShorter {
|
|
|
33
33
|
* @returns A Promise that resolves when the typing indicator is successfully sent.
|
|
34
34
|
*/
|
|
35
35
|
typing(id: string): Promise<void>;
|
|
36
|
-
pins(channelId: string): Promise<
|
|
36
|
+
pins(channelId: string, query?: RESTGetAPIChannelPinsQuery): Promise<{
|
|
37
|
+
hasMore: boolean;
|
|
38
|
+
items: {
|
|
39
|
+
pinnedAt: string;
|
|
40
|
+
message: MessageStructure;
|
|
41
|
+
}[];
|
|
42
|
+
}>;
|
|
37
43
|
/**
|
|
38
44
|
* Pins a message in the channel.
|
|
39
45
|
* @param messageId The ID of the message to pin.
|
|
@@ -70,12 +70,18 @@ class ChannelShorter extends base_1.BaseShorter {
|
|
|
70
70
|
typing(id) {
|
|
71
71
|
return this.client.proxy.channels(id).typing.post();
|
|
72
72
|
}
|
|
73
|
-
async pins(channelId) {
|
|
74
|
-
const
|
|
75
|
-
await this.client.cache.messages?.patch(cache_1.CacheFrom.Rest,
|
|
76
|
-
return [x.id, x];
|
|
73
|
+
async pins(channelId, query) {
|
|
74
|
+
const pins = await this.client.proxy.channels(channelId).messages.pins.get({ query });
|
|
75
|
+
await this.client.cache.messages?.patch(cache_1.CacheFrom.Rest, pins.items.map(x => {
|
|
76
|
+
return [x.message.id, x.message];
|
|
77
77
|
}), channelId);
|
|
78
|
-
return
|
|
78
|
+
return {
|
|
79
|
+
hasMore: pins.has_more,
|
|
80
|
+
items: pins.items.map(x => ({
|
|
81
|
+
pinnedAt: x.pinned_at,
|
|
82
|
+
message: transformers_1.Transformers.Message(this.client, x.message),
|
|
83
|
+
})),
|
|
84
|
+
};
|
|
79
85
|
}
|
|
80
86
|
/**
|
|
81
87
|
* Pins a message in the channel.
|
|
@@ -85,7 +91,7 @@ class ChannelShorter extends base_1.BaseShorter {
|
|
|
85
91
|
* @returns A Promise that resolves when the message is successfully pinned.
|
|
86
92
|
*/
|
|
87
93
|
setPin(messageId, channelId, reason) {
|
|
88
|
-
return this.client.proxy.channels(channelId).pins(messageId).put({ reason });
|
|
94
|
+
return this.client.proxy.channels(channelId).messages.pins(messageId).put({ reason });
|
|
89
95
|
}
|
|
90
96
|
/**
|
|
91
97
|
* Unpins a message in the channel.
|
|
@@ -95,7 +101,7 @@ class ChannelShorter extends base_1.BaseShorter {
|
|
|
95
101
|
* @returns A Promise that resolves when the message is successfully unpinned.
|
|
96
102
|
*/
|
|
97
103
|
deletePin(messageId, channelId, reason) {
|
|
98
|
-
return this.client.proxy.channels(channelId).pins(messageId).delete({ reason });
|
|
104
|
+
return this.client.proxy.channels(channelId).messages.pins(messageId).delete({ reason });
|
|
99
105
|
}
|
|
100
106
|
/**
|
|
101
107
|
* Creates a new thread in the channel (only guild based channels).
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { type AnonymousGuildStructure, type AutoModerationRuleStructure, type GuildMemberStructure, type GuildStructure, type StickerStructure } from '../../client/transformers';
|
|
2
2
|
import type { SeyfertChannelMap } from '../../commands';
|
|
3
3
|
import { type AllChannels, type CreateStickerBodyRequest, type GuildChannelTypes } from '../../structures';
|
|
4
|
-
import type { GuildWidgetStyle, RESTGetAPICurrentUserGuildsQuery, RESTGetAPIGuildQuery, RESTPatchAPIAutoModerationRuleJSONBody, RESTPatchAPIChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTPatchAPIGuildJSONBody, RESTPatchAPIGuildStickerJSONBody, RESTPostAPIAutoModerationRuleJSONBody, RESTPostAPIGuildChannelJSONBody
|
|
4
|
+
import type { GuildWidgetStyle, RESTGetAPICurrentUserGuildsQuery, RESTGetAPIGuildQuery, RESTPatchAPIAutoModerationRuleJSONBody, RESTPatchAPIChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTPatchAPIGuildJSONBody, RESTPatchAPIGuildStickerJSONBody, RESTPostAPIAutoModerationRuleJSONBody, RESTPostAPIGuildChannelJSONBody } from '../../types';
|
|
5
5
|
import { BaseShorter } from './base';
|
|
6
6
|
export declare class GuildShorter extends BaseShorter {
|
|
7
|
-
/**
|
|
8
|
-
* Creates a new guild.
|
|
9
|
-
* @param body The data for creating the guild.
|
|
10
|
-
* @returns A Promise that resolves to the created guild.
|
|
11
|
-
*/
|
|
12
|
-
create(body: RESTPostAPIGuildsJSONBody): Promise<GuildStructure<'api'>>;
|
|
13
7
|
/**
|
|
14
8
|
* Fetches a guild by its ID.
|
|
15
9
|
* @param id The ID of the guild to fetch.
|
|
@@ -7,16 +7,6 @@ const transformers_1 = require("../../client/transformers");
|
|
|
7
7
|
const structures_1 = require("../../structures");
|
|
8
8
|
const base_1 = require("./base");
|
|
9
9
|
class GuildShorter extends base_1.BaseShorter {
|
|
10
|
-
/**
|
|
11
|
-
* Creates a new guild.
|
|
12
|
-
* @param body The data for creating the guild.
|
|
13
|
-
* @returns A Promise that resolves to the created guild.
|
|
14
|
-
*/
|
|
15
|
-
async create(body) {
|
|
16
|
-
const guild = await this.client.proxy.guilds.post({ body });
|
|
17
|
-
await this.client.cache.guilds?.setIfNI(cache_1.CacheFrom.Rest, 'Guilds', guild.id, guild);
|
|
18
|
-
return transformers_1.Transformers.Guild(this.client, guild);
|
|
19
|
-
}
|
|
20
10
|
/**
|
|
21
11
|
* Fetches a guild by its ID.
|
|
22
12
|
* @param id The ID of the guild to fetch.
|
|
@@ -39,6 +39,7 @@ export declare class InvitesShorter extends BaseShorter {
|
|
|
39
39
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
40
40
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
41
41
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
42
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
42
43
|
} | undefined;
|
|
43
44
|
targetType?: import("../../types").InviteTargetType | undefined;
|
|
44
45
|
targetUser?: {
|
|
@@ -59,6 +60,7 @@ export declare class InvitesShorter extends BaseShorter {
|
|
|
59
60
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
60
61
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
61
62
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
63
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
62
64
|
} | undefined;
|
|
63
65
|
targetApplication?: {
|
|
64
66
|
id?: string | undefined;
|
|
@@ -190,6 +192,7 @@ export declare class InvitesShorter extends BaseShorter {
|
|
|
190
192
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
191
193
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
192
194
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
195
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
193
196
|
} | undefined;
|
|
194
197
|
targetType?: import("../../types").InviteTargetType | undefined;
|
|
195
198
|
targetUser?: {
|
|
@@ -210,6 +213,7 @@ export declare class InvitesShorter extends BaseShorter {
|
|
|
210
213
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
211
214
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
212
215
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
216
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
213
217
|
} | undefined;
|
|
214
218
|
targetApplication?: {
|
|
215
219
|
id?: string | undefined;
|
|
@@ -347,6 +351,7 @@ export declare class InvitesShorter extends BaseShorter {
|
|
|
347
351
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
348
352
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
349
353
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
354
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
350
355
|
} | undefined;
|
|
351
356
|
targetType?: import("../../types").InviteTargetType | undefined;
|
|
352
357
|
targetUser?: {
|
|
@@ -367,6 +372,7 @@ export declare class InvitesShorter extends BaseShorter {
|
|
|
367
372
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
368
373
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
369
374
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
375
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
370
376
|
} | undefined;
|
|
371
377
|
targetApplication?: {
|
|
372
378
|
id?: string | undefined;
|
|
@@ -503,6 +509,7 @@ export declare class InvitesShorter extends BaseShorter {
|
|
|
503
509
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
504
510
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
505
511
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
512
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
506
513
|
} | undefined;
|
|
507
514
|
targetType?: import("../../types").InviteTargetType | undefined;
|
|
508
515
|
targetUser?: {
|
|
@@ -523,6 +530,7 @@ export declare class InvitesShorter extends BaseShorter {
|
|
|
523
530
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
524
531
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
525
532
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
533
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
526
534
|
} | undefined;
|
|
527
535
|
targetApplication?: {
|
|
528
536
|
id?: string | undefined;
|
|
@@ -661,6 +669,7 @@ export declare class InvitesShorter extends BaseShorter {
|
|
|
661
669
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
662
670
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
663
671
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
672
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
664
673
|
} | undefined;
|
|
665
674
|
targetType?: import("../../types").InviteTargetType | undefined;
|
|
666
675
|
targetUser?: {
|
|
@@ -681,6 +690,7 @@ export declare class InvitesShorter extends BaseShorter {
|
|
|
681
690
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
682
691
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
683
692
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
693
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
684
694
|
} | undefined;
|
|
685
695
|
targetApplication?: {
|
|
686
696
|
id?: string | undefined;
|
|
@@ -495,6 +495,7 @@ export declare const GUILD_SCHEDULED_EVENT_CREATE: (_self: UsingClient, data: Ga
|
|
|
495
495
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
496
496
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
497
497
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
498
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
498
499
|
} | undefined;
|
|
499
500
|
userCount?: number | undefined;
|
|
500
501
|
image?: string | null | undefined;
|
|
@@ -542,6 +543,7 @@ export declare const GUILD_SCHEDULED_EVENT_CREATE: (_self: UsingClient, data: Ga
|
|
|
542
543
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
543
544
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
544
545
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
546
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
545
547
|
} | undefined;
|
|
546
548
|
userCount?: number | undefined;
|
|
547
549
|
image?: string | null | undefined;
|
|
@@ -591,6 +593,7 @@ export declare const GUILD_SCHEDULED_EVENT_CREATE: (_self: UsingClient, data: Ga
|
|
|
591
593
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
592
594
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
593
595
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
596
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
594
597
|
} | undefined;
|
|
595
598
|
userCount?: number | undefined;
|
|
596
599
|
image?: string | null | undefined;
|
|
@@ -639,6 +642,7 @@ export declare const GUILD_SCHEDULED_EVENT_UPDATE: (_self: UsingClient, data: Ga
|
|
|
639
642
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
640
643
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
641
644
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
645
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
642
646
|
} | undefined;
|
|
643
647
|
userCount?: number | undefined;
|
|
644
648
|
image?: string | null | undefined;
|
|
@@ -686,6 +690,7 @@ export declare const GUILD_SCHEDULED_EVENT_UPDATE: (_self: UsingClient, data: Ga
|
|
|
686
690
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
687
691
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
688
692
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
693
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
689
694
|
} | undefined;
|
|
690
695
|
userCount?: number | undefined;
|
|
691
696
|
image?: string | null | undefined;
|
|
@@ -735,6 +740,7 @@ export declare const GUILD_SCHEDULED_EVENT_UPDATE: (_self: UsingClient, data: Ga
|
|
|
735
740
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
736
741
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
737
742
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
743
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
738
744
|
} | undefined;
|
|
739
745
|
userCount?: number | undefined;
|
|
740
746
|
image?: string | null | undefined;
|
|
@@ -783,6 +789,7 @@ export declare const GUILD_SCHEDULED_EVENT_DELETE: (_self: UsingClient, data: Ga
|
|
|
783
789
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
784
790
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
785
791
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
792
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
786
793
|
} | undefined;
|
|
787
794
|
userCount?: number | undefined;
|
|
788
795
|
image?: string | null | undefined;
|
|
@@ -830,6 +837,7 @@ export declare const GUILD_SCHEDULED_EVENT_DELETE: (_self: UsingClient, data: Ga
|
|
|
830
837
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
831
838
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
832
839
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
840
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
833
841
|
} | undefined;
|
|
834
842
|
userCount?: number | undefined;
|
|
835
843
|
image?: string | null | undefined;
|
|
@@ -879,6 +887,7 @@ export declare const GUILD_SCHEDULED_EVENT_DELETE: (_self: UsingClient, data: Ga
|
|
|
879
887
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
880
888
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
881
889
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
890
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
882
891
|
} | undefined;
|
|
883
892
|
userCount?: number | undefined;
|
|
884
893
|
image?: string | null | undefined;
|
|
@@ -23,6 +23,7 @@ export declare const INVITE_CREATE: (_self: UsingClient, data: GatewayInviteCrea
|
|
|
23
23
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
24
24
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
25
25
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
26
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
26
27
|
} | undefined;
|
|
27
28
|
maxAge: number;
|
|
28
29
|
maxUses: number;
|
|
@@ -45,6 +46,7 @@ export declare const INVITE_CREATE: (_self: UsingClient, data: GatewayInviteCrea
|
|
|
45
46
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
46
47
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
47
48
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
49
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
48
50
|
} | undefined;
|
|
49
51
|
targetApplication?: {
|
|
50
52
|
id?: string | undefined;
|
|
@@ -35,6 +35,12 @@ export declare const MESSAGE_REACTION_ADD: (_self: UsingClient, data: GatewayMes
|
|
|
35
35
|
asset: string;
|
|
36
36
|
skuId: string;
|
|
37
37
|
} | null | undefined;
|
|
38
|
+
primaryGuild?: {
|
|
39
|
+
identityGuildId: string | null;
|
|
40
|
+
identityEnabled: boolean | null;
|
|
41
|
+
tag: string | null;
|
|
42
|
+
badge: string | null;
|
|
43
|
+
} | undefined;
|
|
38
44
|
};
|
|
39
45
|
nick?: string | null | undefined;
|
|
40
46
|
avatar?: string | null | undefined;
|
|
@@ -69,6 +75,7 @@ export declare const MESSAGE_REACTION_ADD: (_self: UsingClient, data: GatewayMes
|
|
|
69
75
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
70
76
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
71
77
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
78
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
72
79
|
} | undefined;
|
|
73
80
|
requireColons?: boolean | undefined;
|
|
74
81
|
managed?: boolean | undefined;
|
|
@@ -107,6 +114,7 @@ export declare const MESSAGE_REACTION_REMOVE: (_self: UsingClient, data: Gateway
|
|
|
107
114
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
108
115
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
109
116
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
117
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
110
118
|
} | undefined;
|
|
111
119
|
requireColons?: boolean | undefined;
|
|
112
120
|
managed?: boolean | undefined;
|
|
@@ -144,6 +152,7 @@ export declare const MESSAGE_REACTION_REMOVE_EMOJI: (_self: UsingClient, data: G
|
|
|
144
152
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
145
153
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
146
154
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
155
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
147
156
|
} | undefined;
|
|
148
157
|
requireColons?: boolean | undefined;
|
|
149
158
|
managed?: boolean | undefined;
|
|
@@ -22,6 +22,12 @@ export declare const PRESENCE_UPDATE: (self: UsingClient, data: GatewayPresenceU
|
|
|
22
22
|
asset: string;
|
|
23
23
|
skuId: string;
|
|
24
24
|
} | null | undefined;
|
|
25
|
+
primaryGuild?: {
|
|
26
|
+
identityGuildId: string | null;
|
|
27
|
+
identityEnabled: boolean | null;
|
|
28
|
+
tag: string | null;
|
|
29
|
+
badge: string | null;
|
|
30
|
+
} | undefined;
|
|
25
31
|
};
|
|
26
32
|
guildId: string;
|
|
27
33
|
status?: import("../../types").PresenceUpdateReceiveStatus | undefined;
|
|
@@ -45,6 +45,7 @@ export declare const SOUNDBOARD_SOUNDS: (_: UsingClient, data: GatewaySoundboard
|
|
|
45
45
|
premiumType?: import("../../types").UserPremiumType | undefined;
|
|
46
46
|
publicFlags?: import("../../types").UserFlags | undefined;
|
|
47
47
|
avatarDecorationData?: import("../../types").APIAvatarDecorationData | null | undefined;
|
|
48
|
+
primaryGuild?: import("../../types").PrimaryGuild | undefined;
|
|
48
49
|
} | undefined;
|
|
49
50
|
}[];
|
|
50
51
|
guildId: string;
|
|
@@ -73,6 +73,12 @@ export declare const THREAD_LIST_SYNC: (_self: UsingClient, data: GatewayThreadL
|
|
|
73
73
|
asset: string;
|
|
74
74
|
skuId: string;
|
|
75
75
|
} | null | undefined;
|
|
76
|
+
primaryGuild?: {
|
|
77
|
+
identityGuildId: string | null;
|
|
78
|
+
identityEnabled: boolean | null;
|
|
79
|
+
tag: string | null;
|
|
80
|
+
badge: string | null;
|
|
81
|
+
} | undefined;
|
|
76
82
|
};
|
|
77
83
|
nick?: string | null | undefined;
|
|
78
84
|
avatar?: string | null | undefined;
|
|
@@ -116,6 +122,12 @@ export declare const THREAD_MEMBER_UPDATE: (_self: UsingClient, data: GatewayThr
|
|
|
116
122
|
asset: string;
|
|
117
123
|
skuId: string;
|
|
118
124
|
} | null | undefined;
|
|
125
|
+
primaryGuild?: {
|
|
126
|
+
identityGuildId: string | null;
|
|
127
|
+
identityEnabled: boolean | null;
|
|
128
|
+
tag: string | null;
|
|
129
|
+
badge: string | null;
|
|
130
|
+
} | undefined;
|
|
119
131
|
};
|
|
120
132
|
nick?: string | null | undefined;
|
|
121
133
|
avatar?: string | null | undefined;
|
|
@@ -163,6 +175,12 @@ export declare const THREAD_MEMBERS_UPDATE: (_self: UsingClient, data: GatewayTh
|
|
|
163
175
|
asset: string;
|
|
164
176
|
skuId: string;
|
|
165
177
|
} | null | undefined;
|
|
178
|
+
primaryGuild?: {
|
|
179
|
+
identityGuildId: string | null;
|
|
180
|
+
identityEnabled: boolean | null;
|
|
181
|
+
tag: string | null;
|
|
182
|
+
badge: string | null;
|
|
183
|
+
} | undefined;
|
|
166
184
|
};
|
|
167
185
|
nick?: string | null | undefined;
|
|
168
186
|
avatar?: string | null | undefined;
|
|
@@ -131,6 +131,7 @@ export declare class Guild<State extends StructStates = 'api'> extends Guild_bas
|
|
|
131
131
|
premiumType?: import("../types").UserPremiumType | undefined;
|
|
132
132
|
publicFlags?: import("../types").UserFlags | undefined;
|
|
133
133
|
avatarDecorationData?: import("../types").APIAvatarDecorationData | null | undefined;
|
|
134
|
+
primaryGuild?: import("../types").PrimaryGuild | undefined;
|
|
134
135
|
} | undefined;
|
|
135
136
|
targetType?: import("../types").InviteTargetType | undefined;
|
|
136
137
|
targetUser?: {
|
|
@@ -151,6 +152,7 @@ export declare class Guild<State extends StructStates = 'api'> extends Guild_bas
|
|
|
151
152
|
premiumType?: import("../types").UserPremiumType | undefined;
|
|
152
153
|
publicFlags?: import("../types").UserFlags | undefined;
|
|
153
154
|
avatarDecorationData?: import("../types").APIAvatarDecorationData | null | undefined;
|
|
155
|
+
primaryGuild?: import("../types").PrimaryGuild | undefined;
|
|
154
156
|
} | undefined;
|
|
155
157
|
targetApplication?: {
|
|
156
158
|
id?: string | undefined;
|
|
@@ -287,6 +289,7 @@ export declare class Guild<State extends StructStates = 'api'> extends Guild_bas
|
|
|
287
289
|
premiumType?: import("../types").UserPremiumType | undefined;
|
|
288
290
|
publicFlags?: import("../types").UserFlags | undefined;
|
|
289
291
|
avatarDecorationData?: import("../types").APIAvatarDecorationData | null | undefined;
|
|
292
|
+
primaryGuild?: import("../types").PrimaryGuild | undefined;
|
|
290
293
|
} | undefined;
|
|
291
294
|
targetType?: import("../types").InviteTargetType | undefined;
|
|
292
295
|
targetUser?: {
|
|
@@ -307,6 +310,7 @@ export declare class Guild<State extends StructStates = 'api'> extends Guild_bas
|
|
|
307
310
|
premiumType?: import("../types").UserPremiumType | undefined;
|
|
308
311
|
publicFlags?: import("../types").UserFlags | undefined;
|
|
309
312
|
avatarDecorationData?: import("../types").APIAvatarDecorationData | null | undefined;
|
|
313
|
+
primaryGuild?: import("../types").PrimaryGuild | undefined;
|
|
310
314
|
} | undefined;
|
|
311
315
|
targetApplication?: {
|
|
312
316
|
id?: string | undefined;
|
|
@@ -438,6 +442,7 @@ export declare class Guild<State extends StructStates = 'api'> extends Guild_bas
|
|
|
438
442
|
premiumType?: import("../types").UserPremiumType | undefined;
|
|
439
443
|
publicFlags?: import("../types").UserFlags | undefined;
|
|
440
444
|
avatarDecorationData?: import("../types").APIAvatarDecorationData | null | undefined;
|
|
445
|
+
primaryGuild?: import("../types").PrimaryGuild | undefined;
|
|
441
446
|
} | undefined;
|
|
442
447
|
targetType?: import("../types").InviteTargetType | undefined;
|
|
443
448
|
targetUser?: {
|
|
@@ -458,6 +463,7 @@ export declare class Guild<State extends StructStates = 'api'> extends Guild_bas
|
|
|
458
463
|
premiumType?: import("../types").UserPremiumType | undefined;
|
|
459
464
|
publicFlags?: import("../types").UserFlags | undefined;
|
|
460
465
|
avatarDecorationData?: import("../types").APIAvatarDecorationData | null | undefined;
|
|
466
|
+
primaryGuild?: import("../types").PrimaryGuild | undefined;
|
|
461
467
|
} | undefined;
|
|
462
468
|
targetApplication?: {
|
|
463
469
|
id?: string | undefined;
|
|
@@ -3,7 +3,7 @@ import type { Overwrites } from '../cache/resources/overwrites';
|
|
|
3
3
|
import { type BaseChannelStructure, type BaseGuildChannelStructure, type CategoryChannelStructure, type DirectoryChannelStructure, type DMChannelStructure, type ForumChannelStructure, type GuildMemberStructure, type GuildStructure, type MediaChannelStructure, type MessageStructure, type NewsChannelStructure, type StageChannelStructure, type TextGuildChannelStructure, type ThreadChannelStructure, type UserStructure, type VoiceChannelStructure, type VoiceStateStructure, type WebhookStructure } from '../client';
|
|
4
4
|
import type { SeyfertChannelMap, UsingClient } from '../commands';
|
|
5
5
|
import { type CreateInviteFromChannel, type EmojiResolvable, type MessageCreateBodyRequest, type MessageUpdateBodyRequest, type MethodContext, type ObjectToLower, type StringToNumber, type ToClass } from '../common';
|
|
6
|
-
import { type APIChannelBase, type APIDMChannel, type APIGuildCategoryChannel, type APIGuildChannel, type APIGuildForumChannel, type APIGuildForumDefaultReactionEmoji, type APIGuildForumTag, type APIGuildMediaChannel, type APIGuildStageVoiceChannel, type APIGuildVoiceChannel, type APINewsChannel, type APITextChannel, type APIThreadChannel, ChannelType, type RESTGetAPIChannelMessageReactionUsersQuery, type RESTGetAPIChannelMessagesQuery, type RESTPatchAPIChannelJSONBody, type RESTPatchAPIGuildChannelPositionsJSONBody, type RESTPostAPIChannelWebhookJSONBody, type RESTPostAPIGuildChannelJSONBody, type RESTPostAPIGuildForumThreadsJSONBody, type SortOrderType, type ThreadAutoArchiveDuration, VideoQualityMode } from '../types';
|
|
6
|
+
import { type APIChannelBase, type APIDMChannel, type APIGuildCategoryChannel, type APIGuildChannel, type APIGuildForumChannel, type APIGuildForumDefaultReactionEmoji, type APIGuildForumTag, type APIGuildMediaChannel, type APIGuildStageVoiceChannel, type APIGuildVoiceChannel, type APINewsChannel, type APITextChannel, type APIThreadChannel, ChannelType, type RESTGetAPIChannelMessageReactionUsersQuery, type RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelPinsQuery, type RESTPatchAPIChannelJSONBody, type RESTPatchAPIGuildChannelPositionsJSONBody, type RESTPostAPIChannelWebhookJSONBody, type RESTPostAPIGuildChannelJSONBody, type RESTPostAPIGuildForumThreadsJSONBody, type SortOrderType, type ThreadAutoArchiveDuration, VideoQualityMode } from '../types';
|
|
7
7
|
import { DiscordBase } from './extra/DiscordBase';
|
|
8
8
|
import type { GuildMember } from './GuildMember';
|
|
9
9
|
import type { GuildRole } from './GuildRole';
|
|
@@ -111,6 +111,7 @@ export declare class BaseGuildChannel extends BaseChannel<ChannelType> {
|
|
|
111
111
|
premiumType?: import("../types").UserPremiumType | undefined;
|
|
112
112
|
publicFlags?: import("../types").UserFlags | undefined;
|
|
113
113
|
avatarDecorationData?: import("../types").APIAvatarDecorationData | null | undefined;
|
|
114
|
+
primaryGuild?: import("../types").PrimaryGuild | undefined;
|
|
114
115
|
} | undefined;
|
|
115
116
|
targetType?: import("../types").InviteTargetType | undefined;
|
|
116
117
|
targetUser?: {
|
|
@@ -131,6 +132,7 @@ export declare class BaseGuildChannel extends BaseChannel<ChannelType> {
|
|
|
131
132
|
premiumType?: import("../types").UserPremiumType | undefined;
|
|
132
133
|
publicFlags?: import("../types").UserFlags | undefined;
|
|
133
134
|
avatarDecorationData?: import("../types").APIAvatarDecorationData | null | undefined;
|
|
135
|
+
primaryGuild?: import("../types").PrimaryGuild | undefined;
|
|
134
136
|
} | undefined;
|
|
135
137
|
targetApplication?: {
|
|
136
138
|
id?: string | undefined;
|
|
@@ -267,6 +269,7 @@ export declare class BaseGuildChannel extends BaseChannel<ChannelType> {
|
|
|
267
269
|
premiumType?: import("../types").UserPremiumType | undefined;
|
|
268
270
|
publicFlags?: import("../types").UserFlags | undefined;
|
|
269
271
|
avatarDecorationData?: import("../types").APIAvatarDecorationData | null | undefined;
|
|
272
|
+
primaryGuild?: import("../types").PrimaryGuild | undefined;
|
|
270
273
|
} | undefined;
|
|
271
274
|
targetType?: import("../types").InviteTargetType | undefined;
|
|
272
275
|
targetUser?: {
|
|
@@ -287,6 +290,7 @@ export declare class BaseGuildChannel extends BaseChannel<ChannelType> {
|
|
|
287
290
|
premiumType?: import("../types").UserPremiumType | undefined;
|
|
288
291
|
publicFlags?: import("../types").UserFlags | undefined;
|
|
289
292
|
avatarDecorationData?: import("../types").APIAvatarDecorationData | null | undefined;
|
|
293
|
+
primaryGuild?: import("../types").PrimaryGuild | undefined;
|
|
290
294
|
} | undefined;
|
|
291
295
|
targetApplication?: {
|
|
292
296
|
id?: string | undefined;
|
|
@@ -418,6 +422,7 @@ export declare class BaseGuildChannel extends BaseChannel<ChannelType> {
|
|
|
418
422
|
premiumType?: import("../types").UserPremiumType | undefined;
|
|
419
423
|
publicFlags?: import("../types").UserFlags | undefined;
|
|
420
424
|
avatarDecorationData?: import("../types").APIAvatarDecorationData | null | undefined;
|
|
425
|
+
primaryGuild?: import("../types").PrimaryGuild | undefined;
|
|
421
426
|
} | undefined;
|
|
422
427
|
targetType?: import("../types").InviteTargetType | undefined;
|
|
423
428
|
targetUser?: {
|
|
@@ -438,6 +443,7 @@ export declare class BaseGuildChannel extends BaseChannel<ChannelType> {
|
|
|
438
443
|
premiumType?: import("../types").UserPremiumType | undefined;
|
|
439
444
|
publicFlags?: import("../types").UserFlags | undefined;
|
|
440
445
|
avatarDecorationData?: import("../types").APIAvatarDecorationData | null | undefined;
|
|
446
|
+
primaryGuild?: import("../types").PrimaryGuild | undefined;
|
|
441
447
|
} | undefined;
|
|
442
448
|
targetApplication?: {
|
|
443
449
|
id?: string | undefined;
|
|
@@ -584,7 +590,13 @@ export declare class MessagesMethods extends DiscordBase {
|
|
|
584
590
|
list: (fetchOptions: RESTGetAPIChannelMessagesQuery) => Promise<MessageStructure[]>;
|
|
585
591
|
};
|
|
586
592
|
pins: {
|
|
587
|
-
fetch: () => Promise<
|
|
593
|
+
fetch: (query?: RESTGetAPIChannelPinsQuery) => Promise<{
|
|
594
|
+
hasMore: boolean;
|
|
595
|
+
items: {
|
|
596
|
+
pinnedAt: string;
|
|
597
|
+
message: MessageStructure;
|
|
598
|
+
}[];
|
|
599
|
+
}>;
|
|
588
600
|
set: (messageId: string, reason?: string) => Promise<undefined>;
|
|
589
601
|
delete: (messageId: string, reason?: string) => Promise<undefined>;
|
|
590
602
|
};
|
|
@@ -616,7 +628,13 @@ export declare class MessagesMethods extends DiscordBase {
|
|
|
616
628
|
static pins(ctx: MethodContext<{
|
|
617
629
|
channelId: string;
|
|
618
630
|
}>): {
|
|
619
|
-
fetch: () => Promise<
|
|
631
|
+
fetch: (query?: RESTGetAPIChannelPinsQuery) => Promise<{
|
|
632
|
+
hasMore: boolean;
|
|
633
|
+
items: {
|
|
634
|
+
pinnedAt: string;
|
|
635
|
+
message: MessageStructure;
|
|
636
|
+
}[];
|
|
637
|
+
}>;
|
|
620
638
|
set: (messageId: string, reason?: string) => Promise<undefined>;
|
|
621
639
|
delete: (messageId: string, reason?: string) => Promise<undefined>;
|
|
622
640
|
};
|
|
@@ -199,7 +199,7 @@ class MessagesMethods extends DiscordBase_1.DiscordBase {
|
|
|
199
199
|
}
|
|
200
200
|
static pins(ctx) {
|
|
201
201
|
return {
|
|
202
|
-
fetch: () => ctx.client.channels.pins(ctx.channelId),
|
|
202
|
+
fetch: (query) => ctx.client.channels.pins(ctx.channelId, query),
|
|
203
203
|
set: (messageId, reason) => ctx.client.channels.setPin(messageId, ctx.channelId, reason),
|
|
204
204
|
delete: (messageId, reason) => ctx.client.channels.deletePin(messageId, ctx.channelId, reason),
|
|
205
205
|
};
|
|
@@ -16,8 +16,13 @@ export interface APIRole {
|
|
|
16
16
|
name: string;
|
|
17
17
|
/**
|
|
18
18
|
* Integer representation of hexadecimal color code
|
|
19
|
+
* @deprecated
|
|
19
20
|
*/
|
|
20
21
|
color: number;
|
|
22
|
+
/**
|
|
23
|
+
* The role's colors
|
|
24
|
+
*/
|
|
25
|
+
colors: APIRoleColors;
|
|
21
26
|
/**
|
|
22
27
|
* If this role is pinned in the user listing
|
|
23
28
|
*/
|
|
@@ -57,6 +62,23 @@ export interface APIRole {
|
|
|
57
62
|
*/
|
|
58
63
|
flags: RoleFlags;
|
|
59
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* https://discord.com/developers/docs/topics/permissions#role-object-role-colors-object
|
|
67
|
+
*/
|
|
68
|
+
export interface APIRoleColors {
|
|
69
|
+
/**
|
|
70
|
+
* The primary color for the role
|
|
71
|
+
*/
|
|
72
|
+
primary_color: number;
|
|
73
|
+
/**
|
|
74
|
+
* The secondary color for the role, this will make the role a gradient between the other provided colors
|
|
75
|
+
*/
|
|
76
|
+
secondary_color: number | null;
|
|
77
|
+
/**
|
|
78
|
+
* The tertiary color for the role, this will turn the gradient into a holographic style
|
|
79
|
+
*/
|
|
80
|
+
tertiary_color: number | null;
|
|
81
|
+
}
|
|
60
82
|
/**
|
|
61
83
|
* https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure
|
|
62
84
|
*/
|
|
@@ -87,6 +87,12 @@ export interface APIUser {
|
|
|
87
87
|
* See https://discord.com/developers/docs/resources/user#avatar-decoration-data-object
|
|
88
88
|
*/
|
|
89
89
|
avatar_decoration_data?: APIAvatarDecorationData | null;
|
|
90
|
+
/**
|
|
91
|
+
* The user's primary guild
|
|
92
|
+
*
|
|
93
|
+
* See https://discord.com/developers/docs/resources/user#user-object-user-primary-guild
|
|
94
|
+
*/
|
|
95
|
+
primary_guild?: PrimaryGuild;
|
|
90
96
|
}
|
|
91
97
|
/**
|
|
92
98
|
* https://discord.com/developers/docs/resources/user#user-object-user-flags
|
|
@@ -207,6 +213,29 @@ export declare enum UserPremiumType {
|
|
|
207
213
|
Nitro = 2,
|
|
208
214
|
NitroBasic = 3
|
|
209
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* https://discord.com/developers/docs/resources/user#user-object-user-primary-guild
|
|
218
|
+
*/
|
|
219
|
+
export interface PrimaryGuild {
|
|
220
|
+
/**
|
|
221
|
+
* the id of the user's primary guild
|
|
222
|
+
*/
|
|
223
|
+
identity_guild_id: string | null;
|
|
224
|
+
/**
|
|
225
|
+
* whether the user is displaying the primary guild's server tag.
|
|
226
|
+
* This can be null if the system clears the identity, e.g. the server no longer supports tags.
|
|
227
|
+
* This will be false if the user manually removes their tag.
|
|
228
|
+
*/
|
|
229
|
+
identity_enabled: boolean | null;
|
|
230
|
+
/**
|
|
231
|
+
* the text of the user's server tag. Limited to 4 characters
|
|
232
|
+
*/
|
|
233
|
+
tag: string | null;
|
|
234
|
+
/**
|
|
235
|
+
* the server tag badge hash
|
|
236
|
+
*/
|
|
237
|
+
badge: string | null;
|
|
238
|
+
}
|
|
210
239
|
/**
|
|
211
240
|
* https://discord.com/developers/docs/resources/user#connection-object
|
|
212
241
|
*/
|
|
@@ -528,7 +528,30 @@ export type RESTPostAPIChannelTypingResult = undefined;
|
|
|
528
528
|
/**
|
|
529
529
|
* https://discord.com/developers/docs/resources/channel#get-pinned-messages
|
|
530
530
|
*/
|
|
531
|
-
export
|
|
531
|
+
export interface RESTGetAPIChannelPinsResult {
|
|
532
|
+
items: RESTGetAPIChannelPinsItems[];
|
|
533
|
+
has_more: boolean;
|
|
534
|
+
}
|
|
535
|
+
export interface RESTGetAPIChannelPinsQuery {
|
|
536
|
+
/**
|
|
537
|
+
* Get messages pinned before this timestamp
|
|
538
|
+
*/
|
|
539
|
+
before?: string;
|
|
540
|
+
/**
|
|
541
|
+
* Max number of pins to return (1-50)
|
|
542
|
+
*/
|
|
543
|
+
limit?: number;
|
|
544
|
+
}
|
|
545
|
+
export interface RESTGetAPIChannelPinsItems {
|
|
546
|
+
/**
|
|
547
|
+
* The time the message was pinned
|
|
548
|
+
*/
|
|
549
|
+
pinned_at: string;
|
|
550
|
+
/**
|
|
551
|
+
* The message that was pinned
|
|
552
|
+
*/
|
|
553
|
+
message: APIMessage;
|
|
554
|
+
}
|
|
532
555
|
/**
|
|
533
556
|
* https://discord.com/developers/docs/resources/channel#pin-message
|
|
534
557
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seyfert",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.6-dev-16864422320.0",
|
|
4
4
|
"description": "The most advanced framework for discord bots",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
"esbuild"
|
|
71
71
|
]
|
|
72
72
|
}
|
|
73
|
-
}
|
|
73
|
+
}
|