seyfert 2.2.1-dev-13573766445.0 → 2.2.1-dev-13722931057.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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type AnonymousGuildStructure, type AutoModerationRuleStructure, type GuildMemberStructure, type GuildStructure, type StickerStructure } from '../../client/transformers';
|
|
2
|
-
import
|
|
2
|
+
import type { SeyfertChannelMap } from '../../commands';
|
|
3
|
+
import { type AllChannels, type CreateStickerBodyRequest, Guild, type GuildChannelTypes } from '../../structures';
|
|
3
4
|
import type { GuildWidgetStyle, RESTGetAPICurrentUserGuildsQuery, RESTPatchAPIAutoModerationRuleJSONBody, RESTPatchAPIChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTPatchAPIGuildJSONBody, RESTPatchAPIGuildStickerJSONBody, RESTPostAPIAutoModerationRuleJSONBody, RESTPostAPIGuildChannelJSONBody, RESTPostAPIGuildsJSONBody } from '../../types';
|
|
4
5
|
import { BaseShorter } from './base';
|
|
5
6
|
export declare class GuildShorter extends BaseShorter {
|
|
@@ -53,7 +54,9 @@ export declare class GuildShorter extends BaseShorter {
|
|
|
53
54
|
* @param body The data for creating the channel.
|
|
54
55
|
* @returns A Promise that resolves to the created channel.
|
|
55
56
|
*/
|
|
56
|
-
create: (guildId: string, body: RESTPostAPIGuildChannelJSONBody
|
|
57
|
+
create: <T extends GuildChannelTypes = GuildChannelTypes>(guildId: string, body: RESTPostAPIGuildChannelJSONBody & {
|
|
58
|
+
type: T;
|
|
59
|
+
}) => Promise<SeyfertChannelMap[T]>;
|
|
57
60
|
/**
|
|
58
61
|
* Deletes a channel from the guild.
|
|
59
62
|
* @param guildId The ID of the guild.
|
|
@@ -64,7 +64,9 @@ export declare class Guild<State extends StructStates = 'api'> extends Guild_bas
|
|
|
64
64
|
channels: {
|
|
65
65
|
list: (force?: boolean) => Promise<import("./channels").AllChannels[]>;
|
|
66
66
|
fetch: (id: string, force?: boolean) => Promise<import("./channels").AllChannels>;
|
|
67
|
-
create:
|
|
67
|
+
create: <T extends import("./channels").GuildChannelTypes = import("./channels").GuildChannelTypes>(body: import("../types").RESTPostAPIGuildChannelJSONBody & {
|
|
68
|
+
type: T;
|
|
69
|
+
}) => Promise<import("../commands").SeyfertChannelMap[T]>;
|
|
68
70
|
delete: (id: string, reason?: string) => Promise<import("./channels").AllChannels>;
|
|
69
71
|
edit: (id: string, body: import("../types").RESTPatchAPIChannelJSONBody, reason?: string) => Promise<import("./channels").AllChannels>;
|
|
70
72
|
editPositions: (body: import("../types").RESTPatchAPIGuildChannelPositionsJSONBody) => Promise<never>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Collection, type RawFile, type ReturnCache } from '..';
|
|
2
2
|
import type { Overwrites } from '../cache/resources/overwrites';
|
|
3
3
|
import { type BaseChannelStructure, type BaseGuildChannelStructure, type CategoryChannelStructure, type DMChannelStructure, type DirectoryChannelStructure, 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
|
-
import type { UsingClient } from '../commands';
|
|
4
|
+
import type { SeyfertChannelMap, UsingClient } from '../commands';
|
|
5
5
|
import { type EmojiResolvable, type MessageCreateBodyRequest, type MessageUpdateBodyRequest, type MethodContext, type ObjectToLower, type StringToNumber, type ToClass } from '../common';
|
|
6
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';
|
|
7
7
|
import type { GuildMember } from './GuildMember';
|
|
@@ -37,7 +37,9 @@ export declare class BaseNoEditableChannel<T extends ChannelType> extends Discor
|
|
|
37
37
|
}>): {
|
|
38
38
|
list: (force?: boolean) => Promise<AllChannels[]>;
|
|
39
39
|
fetch: (id: string, force?: boolean) => Promise<AllChannels>;
|
|
40
|
-
create: (body: RESTPostAPIGuildChannelJSONBody
|
|
40
|
+
create: <T extends GuildChannelTypes = GuildChannelTypes>(body: RESTPostAPIGuildChannelJSONBody & {
|
|
41
|
+
type: T;
|
|
42
|
+
}) => Promise<SeyfertChannelMap[T]>;
|
|
41
43
|
delete: (id: string, reason?: string) => Promise<AllChannels>;
|
|
42
44
|
edit: (id: string, body: RESTPatchAPIChannelJSONBody, reason?: string) => Promise<AllChannels>;
|
|
43
45
|
editPositions: (body: RESTPatchAPIGuildChannelPositionsJSONBody) => Promise<never>;
|
|
@@ -280,4 +282,5 @@ export type AllTextableChannels = TextGuildChannelStructure | VoiceChannelStruct
|
|
|
280
282
|
export type AllGuildTextableChannels = TextGuildChannelStructure | VoiceChannelStructure | NewsChannelStructure | ThreadChannelStructure;
|
|
281
283
|
export type AllGuildVoiceChannels = VoiceChannelStructure | StageChannelStructure;
|
|
282
284
|
export type AllChannels = BaseChannelStructure | BaseGuildChannelStructure | TextGuildChannelStructure | DMChannelStructure | VoiceChannelStructure | MediaChannelStructure | ForumChannelStructure | ThreadChannelStructure | CategoryChannelStructure | NewsChannelStructure | DirectoryChannelStructure | StageChannelStructure;
|
|
285
|
+
export type GuildChannelTypes = ChannelType.GuildAnnouncement | ChannelType.GuildVoice | ChannelType.GuildText | ChannelType.GuildStageVoice | ChannelType.GuildForum | ChannelType.GuildMedia | ChannelType.GuildCategory | ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread;
|
|
283
286
|
export {};
|