From 69fa04c3260042a737a893a52ea716afc8fb439e Mon Sep 17 00:00:00 2001 From: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Date: Sun, 18 Dec 2022 21:18:33 +0000 Subject: [PATCH] fix: remove validations from helpers. Closes #2700 --- packages/plugins/validations/mod.ts | 23 ++++++++++- .../plugins/validations/src/channels/mod.ts | 9 +++++ .../src/guilds/events/createScheduledEvent.ts | 36 +++++++++++++++++ .../validations/src/guilds/events/mod.ts | 21 ++++++++++ .../plugins/validations/src/guilds/mod.ts | 34 +++++++++++++++- .../plugins/validations/src/members/mod.ts | 23 +++++++++++ .../src/messages/deleteMessages.ts | 11 +++++ .../plugins/validations/src/messages/mod.ts | 5 +++ .../src/helpers/channels/createChannel.ts | 3 -- .../helpers/channels/editChannelPositions.ts | 4 -- .../rest/src/helpers/emojis/createEmoji.ts | 5 --- packages/rest/src/helpers/guilds/editGuild.ts | 19 +-------- .../guilds/events/createScheduledEvent.ts | 40 +------------------ .../guilds/events/editScheduledEvent.ts | 21 ---------- .../guilds/events/getScheduledEventUsers.ts | 13 +----- .../rest/src/helpers/guilds/getAuditLog.ts | 5 --- .../rest/src/helpers/guilds/getPruneCount.ts | 7 ---- .../rest/src/helpers/members/getDmChannel.ts | 4 -- .../rest/src/helpers/members/pruneMembers.ts | 7 ---- .../rest/src/helpers/members/searchMembers.ts | 14 +------ .../src/helpers/messages/deleteMessages.ts | 10 ----- .../rest/src/helpers/messages/getMessages.ts | 4 -- .../helpers/templates/createGuildTemplate.ts | 10 +---- .../helpers/templates/editGuildTemplate.ts | 11 ----- .../noCheckHelpers/members/fetchMembers.ts | 23 ++++++----- .../templates/createGuildFromTemplate.ts | 11 +++-- 26 files changed, 184 insertions(+), 189 deletions(-) diff --git a/packages/plugins/validations/mod.ts b/packages/plugins/validations/mod.ts index 7e286ab97..0305fb6d0 100644 --- a/packages/plugins/validations/mod.ts +++ b/packages/plugins/validations/mod.ts @@ -1,4 +1,4 @@ -import { Bot } from './deps.js' +import type { Bot } from './deps.js' import { channels } from './src/channels/index.js' import { guilds } from './src/guilds/index.js' import { interactions } from './src/interaction/index.js' @@ -25,6 +25,27 @@ export function enableValidationsPlugin (bot: B): B { stickers(bot) webhooks(bot) + // TODO: validations createGuildTemplate + // if (options.name.length < 1 || options.name.length > 100) { + // throw new Error('The name can only be in between 1-100 characters.') + // } + + // if (options.description?.length && options.description.length > 120) { + // throw new Error('The description can only be in between 0-120 characters.') + // } + + // TODO: validations editGuildTemplate + // if ( + // options.name?.length && + // (options.name.length < 1 || options.name.length > 100) + // ) { + // throw new Error('The name can only be in between 1-100 characters.') + // } + + // if (options.description?.length && options.description.length > 120) { + // throw new Error('The description can only be in between 0-120 characters.') + // } + // PLUGINS MUST RETURN THE BOT return bot } diff --git a/packages/plugins/validations/src/channels/mod.ts b/packages/plugins/validations/src/channels/mod.ts index 1afe3b080..1fec5aceb 100644 --- a/packages/plugins/validations/src/channels/mod.ts +++ b/packages/plugins/validations/src/channels/mod.ts @@ -3,4 +3,13 @@ import { threads } from './threads/index.js' export function channels (bot: Bot) { threads(bot) + + // TODO: validations createChannel + // BITRATE IS IN THOUSANDS SO IF USER PROVIDES 32 WE CONVERT TO 32000 + // if (options?.bitrate && options.bitrate < 1000) options.bitrate *= 1000 + + // TODO: validations editChannelPositions + // if (channelPositions.length === 0) { + // throw new Error('You must provide at least one channels to be moved.') + // } } diff --git a/packages/plugins/validations/src/guilds/events/createScheduledEvent.ts b/packages/plugins/validations/src/guilds/events/createScheduledEvent.ts index c363bffb1..740547862 100644 --- a/packages/plugins/validations/src/guilds/events/createScheduledEvent.ts +++ b/packages/plugins/validations/src/guilds/events/createScheduledEvent.ts @@ -4,6 +4,42 @@ export function createScheduledEvent (bot: Bot) { const createScheduledEvent = bot.helpers.createScheduledEvent bot.helpers.createScheduledEvent = async function (guildId, options) { + // TODO: validations + // if (!validateLength(options.name, { min: 1, max: 100 })) { + // throw new Error('Name must be between 1-100 characters.') + // } + // if ( + // options.description && + // !validateLength(options.description, { max: 1000 }) + // ) { + // throw new Error('Description must be below 1000 characters.') + // } + // if (options.location) { + // if (!validateLength(options.location, { max: 100 })) { + // throw new Error('Location must be below 100 characters.') + // } + // if (options.entityType === ScheduledEventEntityType.Voice) { + // throw new Error('Location can not be provided for a Voice event.') + // } + // } + // if (options.entityType === ScheduledEventEntityType.External) { + // if (!options.scheduledEndTime) { + // throw new Error( + // 'A scheduled end time is required when making an External event.' + // ) + // } + // if (!options.location) { + // throw new Error('A location is required when making an External event.') + // } + // } + // if ( + // options.scheduledStartTime && + // options.scheduledEndTime && + // options.scheduledStartTime > options.scheduledEndTime + // ) { + // throw new Error('Cannot schedule event to end before starting.') + // } + if (options.entityType === ScheduledEventEntityType.StageInstance) { if (!options.channelId) { throw new Error( diff --git a/packages/plugins/validations/src/guilds/events/mod.ts b/packages/plugins/validations/src/guilds/events/mod.ts index 2aa97da80..64791fc9e 100644 --- a/packages/plugins/validations/src/guilds/events/mod.ts +++ b/packages/plugins/validations/src/guilds/events/mod.ts @@ -3,4 +3,25 @@ import { createScheduledEvent } from './createScheduledEvent.js' export function events (bot: Bot) { createScheduledEvent(bot) + + // TODO: validations editScheduledEvent + // if (options.name && !validateLength(options.name, { min: 1, max: 100 })) { + // throw new Error('Name must be between 1-100 characters.') + // } + // if ( + // options.description && + // !validateLength(options.description, { max: 1000 }) + // ) { + // throw new Error('Description must be below 1000 characters.') + // } + // if (options.location && !validateLength(options.location, { max: 100 })) { + // throw new Error('Location must be below 100 characters.') + // } + // if ( + // options.scheduledStartTime && + // options.scheduledEndTime && + // options.scheduledStartTime > options.scheduledEndTime + // ) { + // throw new Error('Cannot schedule event to end before starting.') + // } } diff --git a/packages/plugins/validations/src/guilds/mod.ts b/packages/plugins/validations/src/guilds/mod.ts index f727f0e2d..e4ab9e532 100644 --- a/packages/plugins/validations/src/guilds/mod.ts +++ b/packages/plugins/validations/src/guilds/mod.ts @@ -1,8 +1,40 @@ -import { Bot } from '../../deps.js' +import type { Bot } from '../../deps.js' import { createGuild } from './createGuild.js' import { events } from './events/index.js' export function guilds (bot: Bot) { events(bot) createGuild(bot) + + // TODO: validations createEmoji + // if (options.image && !options.image.startsWith('data:image/')) { + // options.image = await urlToBase64(options.image) + // } + + // TODO: validations editGuild + // if (options.icon && !options.icon.startsWith('data:image/')) { + // options.icon = await urlToBase64(options.icon) + // } + + // if (options.banner && !options.banner.startsWith('data:image/')) { + // options.banner = await urlToBase64(options.banner) + // } + + // if (options.splash && !options.splash.startsWith('data:image/')) { + // options.splash = await urlToBase64(options.splash) + // } + + // TODO: validations getAuditLog + // if (options?.limit) { + // options.limit = + // options.limit >= 1 && options.limit <= 100 ? options.limit : 50 + // } + + // TODO: validations getPruneCount + // if (options?.days && options.days < 1) { + // throw new Error(rest.constants.Errors.PRUNE_MIN_DAYS) + // } + // if (options?.days && options.days > 30) { + // throw new Error(rest.constants.Errors.PRUNE_MAX_DAYS) + // } } diff --git a/packages/plugins/validations/src/members/mod.ts b/packages/plugins/validations/src/members/mod.ts index 9bb4b828c..3be0281af 100644 --- a/packages/plugins/validations/src/members/mod.ts +++ b/packages/plugins/validations/src/members/mod.ts @@ -3,4 +3,27 @@ import { editMember } from './editMember.js' export function members (bot: Bot) { editMember(bot) + + // TODO: validations getDmChannel + // if (userId === rest.id) { + // throw new Error(rest.constants.Errors.YOU_CAN_NOT_DM_THE_BOT_ITSELF) + // } + + // TODO: validations pruneMembers + // if (options.days && options.days < 1) { + // throw new Error(rest.constants.Errors.PRUNE_MIN_DAYS) + // } + // if (options.days && options.days > 30) { + // throw new Error(rest.constants.Errors.PRUNE_MAX_DAYS) + // } + + // TODO: validations searchMembers + // if (options?.limit) { + // if (options.limit < 1) { + // throw new Error(rest.constants.Errors.MEMBER_SEARCH_LIMIT_TOO_LOW) + // } + // if (options.limit > 1000) { + // throw new Error(rest.constants.Errors.MEMBER_SEARCH_LIMIT_TOO_HIGH) + // } + // } } diff --git a/packages/plugins/validations/src/messages/deleteMessages.ts b/packages/plugins/validations/src/messages/deleteMessages.ts index 3b981a9d5..f5bb7907c 100644 --- a/packages/plugins/validations/src/messages/deleteMessages.ts +++ b/packages/plugins/validations/src/messages/deleteMessages.ts @@ -8,6 +8,17 @@ export function deleteMessages (bot: Bot) { ids, reason ) { + // TODO: validations + // if (ids.length < 2) { + // throw new Error(rest.constants.Errors.DELETE_MESSAGES_MIN) + // } + + // if (ids.length > 100) { + // console.warn( + // 'This endpoint only accepts a maximum of 100 messages. Using the first 100 message ids provided.' + // ) + // } + // 2 WEEKS const oldestAllowed = Date.now() - 1209600000 diff --git a/packages/plugins/validations/src/messages/mod.ts b/packages/plugins/validations/src/messages/mod.ts index 00ceaf638..3ced1c895 100644 --- a/packages/plugins/validations/src/messages/mod.ts +++ b/packages/plugins/validations/src/messages/mod.ts @@ -7,4 +7,9 @@ export function messages (bot: Bot) { deleteMessages(bot) editMessage(bot) sendMessage(bot) + + // TODO: validations getMessages + // if (options?.limit && (options.limit < 0 || options.limit > 100)) { + // throw new Error(rest.constants.Errors.INVALID_GET_MESSAGES_LIMIT) + // } } diff --git a/packages/rest/src/helpers/channels/createChannel.ts b/packages/rest/src/helpers/channels/createChannel.ts index 75d3b7cf0..ce7cf4dcc 100644 --- a/packages/rest/src/helpers/channels/createChannel.ts +++ b/packages/rest/src/helpers/channels/createChannel.ts @@ -36,9 +36,6 @@ export async function createChannel ( guildId: BigString, options: CreateGuildChannel ): Promise> { - // BITRATE IS IN THOUSANDS SO IF USER PROVIDES 32 WE CONVERT TO 32000 - if (options?.bitrate && options.bitrate < 1000) options.bitrate *= 1000 - const result = await rest.runMethod( rest, 'POST', diff --git a/packages/rest/src/helpers/channels/editChannelPositions.ts b/packages/rest/src/helpers/channels/editChannelPositions.ts index 61f93e9b1..89999de4d 100644 --- a/packages/rest/src/helpers/channels/editChannelPositions.ts +++ b/packages/rest/src/helpers/channels/editChannelPositions.ts @@ -22,10 +22,6 @@ export async function editChannelPositions ( guildId: BigString, channelPositions: ModifyGuildChannelPositions[] ): Promise { - if (channelPositions.length === 0) { - throw new Error('You must provide at least one channels to be moved.') - } - return await rest.runMethod( rest, 'PATCH', diff --git a/packages/rest/src/helpers/emojis/createEmoji.ts b/packages/rest/src/helpers/emojis/createEmoji.ts index a6b1dbcef..b4e027281 100644 --- a/packages/rest/src/helpers/emojis/createEmoji.ts +++ b/packages/rest/src/helpers/emojis/createEmoji.ts @@ -5,7 +5,6 @@ import type { WithReason, DiscordCreateGuildEmoji } from '@discordeno/types' -import { urlToBase64 } from '@discordeno/utils' import type { RestManager } from '../../restManager.js' /** @@ -30,10 +29,6 @@ export async function createEmoji ( guildId: BigString, options: CreateGuildEmoji ): Promise> { - if (options.image && !options.image.startsWith('data:image/')) { - options.image = await urlToBase64(options.image) - } - const result = await rest.runMethod( rest, 'POST', diff --git a/packages/rest/src/helpers/guilds/editGuild.ts b/packages/rest/src/helpers/guilds/editGuild.ts index b2f98ca26..81725f496 100644 --- a/packages/rest/src/helpers/guilds/editGuild.ts +++ b/packages/rest/src/helpers/guilds/editGuild.ts @@ -1,14 +1,11 @@ import type { BigString, DefaultMessageNotificationLevels, - DiscordGuild, - ExplicitContentFilterLevels, + DiscordGuild, DiscordModifyGuild, ExplicitContentFilterLevels, GuildFeatures, SystemChannelFlags, - VerificationLevels, - DiscordModifyGuild + VerificationLevels } from '@discordeno/types' -import { urlToBase64 } from '@discordeno/utils' import type { RestManager } from '../../restManager.js' import type { Guild } from '../../transformers/guild.js' @@ -39,18 +36,6 @@ export async function editGuild ( options: ModifyGuild, shardId: number ): Promise { - if (options.icon && !options.icon.startsWith('data:image/')) { - options.icon = await urlToBase64(options.icon) - } - - if (options.banner && !options.banner.startsWith('data:image/')) { - options.banner = await urlToBase64(options.banner) - } - - if (options.splash && !options.splash.startsWith('data:image/')) { - options.splash = await urlToBase64(options.splash) - } - const result = await rest.runMethod( rest, 'PATCH', diff --git a/packages/rest/src/helpers/guilds/events/createScheduledEvent.ts b/packages/rest/src/helpers/guilds/events/createScheduledEvent.ts index 3aedac0a4..6384d15bd 100644 --- a/packages/rest/src/helpers/guilds/events/createScheduledEvent.ts +++ b/packages/rest/src/helpers/guilds/events/createScheduledEvent.ts @@ -1,14 +1,11 @@ import type { BigString, DiscordCreateScheduledEvent, - DiscordScheduledEvent, - WithReason + DiscordScheduledEvent, ScheduledEventEntityType, WithReason } from '@discordeno/types' import { - ScheduledEventEntityType, ScheduledEventPrivacyLevel } from '@discordeno/types' -import { validateLength } from '@discordeno/utils' import type { RestManager } from '../../../restManager.js' import type { ScheduledEvent } from '../../../transformers/scheduledEvent.js' @@ -34,41 +31,6 @@ export async function createScheduledEvent ( guildId: BigString, options: CreateScheduledEvent ): Promise { - if (!validateLength(options.name, { min: 1, max: 100 })) { - throw new Error('Name must be between 1-100 characters.') - } - if ( - options.description && - !validateLength(options.description, { max: 1000 }) - ) { - throw new Error('Description must be below 1000 characters.') - } - if (options.location) { - if (!validateLength(options.location, { max: 100 })) { - throw new Error('Location must be below 100 characters.') - } - if (options.entityType === ScheduledEventEntityType.Voice) { - throw new Error('Location can not be provided for a Voice event.') - } - } - if (options.entityType === ScheduledEventEntityType.External) { - if (!options.scheduledEndTime) { - throw new Error( - 'A scheduled end time is required when making an External event.' - ) - } - if (!options.location) { - throw new Error('A location is required when making an External event.') - } - } - if ( - options.scheduledStartTime && - options.scheduledEndTime && - options.scheduledStartTime > options.scheduledEndTime - ) { - throw new Error('Cannot schedule event to end before starting.') - } - const result = await rest.runMethod( rest, 'POST', diff --git a/packages/rest/src/helpers/guilds/events/editScheduledEvent.ts b/packages/rest/src/helpers/guilds/events/editScheduledEvent.ts index 2e2c971d4..303deecc7 100644 --- a/packages/rest/src/helpers/guilds/events/editScheduledEvent.ts +++ b/packages/rest/src/helpers/guilds/events/editScheduledEvent.ts @@ -7,7 +7,6 @@ import type { ScheduledEventStatus, WithReason } from '@discordeno/types' -import { validateLength } from '@discordeno/utils' import type { RestManager } from '../../../restManager.js' import type { ScheduledEvent } from '../../../transformers/scheduledEvent.js' @@ -36,26 +35,6 @@ export async function editScheduledEvent ( eventId: BigString, options: Partial ): Promise { - if (options.name && !validateLength(options.name, { min: 1, max: 100 })) { - throw new Error('Name must be between 1-100 characters.') - } - if ( - options.description && - !validateLength(options.description, { max: 1000 }) - ) { - throw new Error('Description must be below 1000 characters.') - } - if (options.location && !validateLength(options.location, { max: 100 })) { - throw new Error('Location must be below 100 characters.') - } - if ( - options.scheduledStartTime && - options.scheduledEndTime && - options.scheduledStartTime > options.scheduledEndTime - ) { - throw new Error('Cannot schedule event to end before starting.') - } - const result = await rest.runMethod( rest, 'PATCH', diff --git a/packages/rest/src/helpers/guilds/events/getScheduledEventUsers.ts b/packages/rest/src/helpers/guilds/events/getScheduledEventUsers.ts index 08ae5764e..cc2e81742 100644 --- a/packages/rest/src/helpers/guilds/events/getScheduledEventUsers.ts +++ b/packages/rest/src/helpers/guilds/events/getScheduledEventUsers.ts @@ -42,23 +42,12 @@ export async function getScheduledEventUsers ( ): Promise< Collection | Collection > { - let url = rest.constants.routes.GUILD_SCHEDULED_EVENT_USERS( + const url = rest.constants.routes.GUILD_SCHEDULED_EVENT_USERS( guildId, eventId, options ) - if (options != null) { - url = '?' - - if (options.limit) url += `limit=${options.limit}` - if (options.withMember !== undefined) { - url += `&with_member=${options.withMember.toString()}` - } - if (options.after) url += `&after=${options.after}` - if (options.before) url += `&before=${options.before}` - } - const results = await rest.runMethod< Array<{ user: DiscordUser, member?: DiscordMember }> >(rest, 'GET', url) diff --git a/packages/rest/src/helpers/guilds/getAuditLog.ts b/packages/rest/src/helpers/guilds/getAuditLog.ts index dbcee9dd9..ca67cefc1 100644 --- a/packages/rest/src/helpers/guilds/getAuditLog.ts +++ b/packages/rest/src/helpers/guilds/getAuditLog.ts @@ -45,11 +45,6 @@ export async function getAuditLog ( guildId: BigString, options?: GetGuildAuditLog ): Promise { - if (options?.limit) { - options.limit = - options.limit >= 1 && options.limit <= 100 ? options.limit : 50 - } - const result = await rest.runMethod( rest, 'GET', diff --git a/packages/rest/src/helpers/guilds/getPruneCount.ts b/packages/rest/src/helpers/guilds/getPruneCount.ts index e84dc481d..df40faa73 100644 --- a/packages/rest/src/helpers/guilds/getPruneCount.ts +++ b/packages/rest/src/helpers/guilds/getPruneCount.ts @@ -23,13 +23,6 @@ export async function getPruneCount ( guildId: BigString, options?: GetGuildPruneCountQuery ): Promise { - if (options?.days && options.days < 1) { - throw new Error(rest.constants.Errors.PRUNE_MIN_DAYS) - } - if (options?.days && options.days > 30) { - throw new Error(rest.constants.Errors.PRUNE_MAX_DAYS) - } - const result = await rest.runMethod( rest, 'GET', diff --git a/packages/rest/src/helpers/members/getDmChannel.ts b/packages/rest/src/helpers/members/getDmChannel.ts index f560ac19e..d9d0fe467 100644 --- a/packages/rest/src/helpers/members/getDmChannel.ts +++ b/packages/rest/src/helpers/members/getDmChannel.ts @@ -15,10 +15,6 @@ export async function getDmChannel ( rest: RestManager, userId: BigString ): Promise { - if (userId === rest.id) { - throw new Error(rest.constants.Errors.YOU_CAN_NOT_DM_THE_BOT_ITSELF) - } - const result = await rest.runMethod( rest, 'POST', diff --git a/packages/rest/src/helpers/members/pruneMembers.ts b/packages/rest/src/helpers/members/pruneMembers.ts index d45da84b4..e6affef08 100644 --- a/packages/rest/src/helpers/members/pruneMembers.ts +++ b/packages/rest/src/helpers/members/pruneMembers.ts @@ -25,13 +25,6 @@ export async function pruneMembers ( guildId: BigString, options: BeginGuildPrune ): Promise { - if (options.days && options.days < 1) { - throw new Error(rest.constants.Errors.PRUNE_MIN_DAYS) - } - if (options.days && options.days > 30) { - throw new Error(rest.constants.Errors.PRUNE_MAX_DAYS) - } - const result = await rest.runMethod<{ pruned: number | null }>( rest, 'POST', diff --git a/packages/rest/src/helpers/members/searchMembers.ts b/packages/rest/src/helpers/members/searchMembers.ts index ad9b21ec5..c9a517d42 100644 --- a/packages/rest/src/helpers/members/searchMembers.ts +++ b/packages/rest/src/helpers/members/searchMembers.ts @@ -1,7 +1,6 @@ import type { - DiscordMemberWithUser, - SearchMembers, - BigString + BigString, DiscordMemberWithUser, + SearchMembers } from '@discordeno/types' import { Collection } from '@discordeno/utils' @@ -25,15 +24,6 @@ export async function searchMembers ( query: string, options?: Omit ): Promise> { - if (options?.limit) { - if (options.limit < 1) { - throw new Error(rest.constants.Errors.MEMBER_SEARCH_LIMIT_TOO_LOW) - } - if (options.limit > 1000) { - throw new Error(rest.constants.Errors.MEMBER_SEARCH_LIMIT_TOO_HIGH) - } - } - const results = await rest.runMethod( rest, 'GET', diff --git a/packages/rest/src/helpers/messages/deleteMessages.ts b/packages/rest/src/helpers/messages/deleteMessages.ts index cfe84ef3c..694aa3076 100644 --- a/packages/rest/src/helpers/messages/deleteMessages.ts +++ b/packages/rest/src/helpers/messages/deleteMessages.ts @@ -23,16 +23,6 @@ export async function deleteMessages ( messageIds: BigString[], reason?: string ): Promise { - if (messageIds.length < 2) { - throw new Error(rest.constants.Errors.DELETE_MESSAGES_MIN) - } - - if (messageIds.length > 100) { - console.warn( - 'This endpoint only accepts a maximum of 100 messages. Using the first 100 message ids provided.' - ) - } - return await rest.runMethod( rest, 'POST', diff --git a/packages/rest/src/helpers/messages/getMessages.ts b/packages/rest/src/helpers/messages/getMessages.ts index 5e32f2457..0b9d70bd9 100644 --- a/packages/rest/src/helpers/messages/getMessages.ts +++ b/packages/rest/src/helpers/messages/getMessages.ts @@ -24,10 +24,6 @@ export async function getMessages ( channelId: BigString, options?: GetMessagesOptions ): Promise> { - if (options?.limit && (options.limit < 0 || options.limit > 100)) { - throw new Error(rest.constants.Errors.INVALID_GET_MESSAGES_LIMIT) - } - const results = await rest.runMethod( rest, 'GET', diff --git a/packages/rest/src/helpers/templates/createGuildTemplate.ts b/packages/rest/src/helpers/templates/createGuildTemplate.ts index ba5eca83d..4629052b5 100644 --- a/packages/rest/src/helpers/templates/createGuildTemplate.ts +++ b/packages/rest/src/helpers/templates/createGuildTemplate.ts @@ -1,6 +1,6 @@ +import type { BigString, DiscordCreateTemplate, DiscordTemplate } from '@discordeno/types' import type { RestManager } from '../../restManager.js' import type { Template } from '../../transformers/template.js' -import type { DiscordTemplate, BigString, DiscordCreateTemplate } from '@discordeno/types' /** * Creates a template from a guild. @@ -22,14 +22,6 @@ export async function createGuildTemplate ( guildId: BigString, options: CreateTemplate ): Promise