diff --git a/src/helpers/channels/channel_overwrite_has_permission.ts b/src/helpers/channels/channel_overwrite_has_permission.ts index bcf6b3407..2b0adcd12 100644 --- a/src/helpers/channels/channel_overwrite_has_permission.ts +++ b/src/helpers/channels/channel_overwrite_has_permission.ts @@ -1,6 +1,6 @@ -import { DiscordOverwrite } from "../../types/channels/overwrite.ts"; +import type { DiscordOverwrite } from "../../types/channels/overwrite.ts"; import { DiscordBitwisePermissionFlags } from "../../types/permissions/bitwise_permission_flags.ts"; -import { PermissionStrings } from "../../types/permissions/permission_strings.ts"; +import type { PermissionStrings } from "../../types/permissions/permission_strings.ts"; /** Checks if a channel overwrite for a user id or a role id has permission in this channel */ export function channelOverwriteHasPermission( diff --git a/src/helpers/channels/clone_channel.ts b/src/helpers/channels/clone_channel.ts index 200189a32..d7ba2aab5 100644 --- a/src/helpers/channels/clone_channel.ts +++ b/src/helpers/channels/clone_channel.ts @@ -1,6 +1,6 @@ import { cacheHandlers } from "../../cache.ts"; import { DiscordChannelTypes } from "../../types/channels/channel_types.ts"; -import { CreateGuildChannel } from "../../types/guilds/create_guild_channel.ts"; +import type { CreateGuildChannel } from "../../types/guilds/create_guild_channel.ts"; import { Errors } from "../../types/misc/errors.ts"; import { bigintToSnowflake } from "../../util/bigint.ts"; import { calculatePermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/channels/create_channel.ts b/src/helpers/channels/create_channel.ts index 316362399..cb0b70bb6 100644 --- a/src/helpers/channels/create_channel.ts +++ b/src/helpers/channels/create_channel.ts @@ -2,13 +2,13 @@ import { eventHandlers } from "../../bot.ts"; import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { Channel } from "../../types/channels/channel.ts"; +import type { Channel } from "../../types/channels/channel.ts"; import { DiscordChannelTypes } from "../../types/channels/channel_types.ts"; -import { +import type { CreateGuildChannel, DiscordCreateGuildChannel, } from "../../types/guilds/create_guild_channel.ts"; -import { PermissionStrings } from "../../types/permissions/permission_strings.ts"; +import type { PermissionStrings } from "../../types/permissions/permission_strings.ts"; import { endpoints } from "../../util/constants.ts"; import { calculateBits, diff --git a/src/helpers/channels/edit_channel.ts b/src/helpers/channels/edit_channel.ts index 26a40fdfa..57d302637 100644 --- a/src/helpers/channels/edit_channel.ts +++ b/src/helpers/channels/edit_channel.ts @@ -1,7 +1,7 @@ import { eventHandlers } from "../../bot.ts"; import { rest } from "../../rest/rest.ts"; -import { ModifyChannel } from "../../types/channels/modify_channel.ts"; -import { Channel } from "../../types/mod.ts"; +import type { Channel } from "../../types/channels/channel.ts"; +import type { ModifyChannel } from "../../types/channels/modify_channel.ts"; import { endpoints } from "../../util/constants.ts"; import { calculateBits, diff --git a/src/helpers/channels/edit_channel_overwrite.ts b/src/helpers/channels/edit_channel_overwrite.ts index 056cd6fc4..179bddbd1 100644 --- a/src/helpers/channels/edit_channel_overwrite.ts +++ b/src/helpers/channels/edit_channel_overwrite.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Overwrite } from "../../types/channels/overwrite.ts"; +import type { Overwrite } from "../../types/channels/overwrite.ts"; import { endpoints } from "../../util/constants.ts"; import { calculateBits, diff --git a/src/helpers/channels/follow_channel.ts b/src/helpers/channels/follow_channel.ts index 6ef4ed0e7..ede74126e 100644 --- a/src/helpers/channels/follow_channel.ts +++ b/src/helpers/channels/follow_channel.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { FollowedChannel } from "../../types/channels/followed_channel.ts"; +import type { FollowedChannel } from "../../types/channels/followed_channel.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotChannelPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/channels/get_channel.ts b/src/helpers/channels/get_channel.ts index 122f075c8..4818bba41 100644 --- a/src/helpers/channels/get_channel.ts +++ b/src/helpers/channels/get_channel.ts @@ -1,7 +1,7 @@ import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { Channel } from "../../types/channels/channel.ts"; +import type { Channel } from "../../types/channels/channel.ts"; import { snowflakeToBigint } from "../../util/bigint.ts"; import { endpoints } from "../../util/constants.ts"; diff --git a/src/helpers/channels/get_channel_webhooks.ts b/src/helpers/channels/get_channel_webhooks.ts index d3752ff97..9f4110c43 100644 --- a/src/helpers/channels/get_channel_webhooks.ts +++ b/src/helpers/channels/get_channel_webhooks.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Webhook } from "../../types/webhooks/webhook.ts"; +import type { Webhook } from "../../types/webhooks/webhook.ts"; import { Collection } from "../../util/collection.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotChannelPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/channels/get_channels.ts b/src/helpers/channels/get_channels.ts index 681601cd1..53d72529d 100644 --- a/src/helpers/channels/get_channels.ts +++ b/src/helpers/channels/get_channels.ts @@ -1,7 +1,7 @@ import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { Channel } from "../../types/channels/channel.ts"; +import type { Channel } from "../../types/channels/channel.ts"; import { Collection } from "../../util/collection.ts"; import { endpoints } from "../../util/constants.ts"; diff --git a/src/helpers/channels/get_pins.ts b/src/helpers/channels/get_pins.ts index dd4d26954..63c2090f4 100644 --- a/src/helpers/channels/get_pins.ts +++ b/src/helpers/channels/get_pins.ts @@ -1,6 +1,6 @@ import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { Message } from "../../types/messages/message.ts"; +import type { Message } from "../../types/messages/message.ts"; import { endpoints } from "../../util/constants.ts"; /** Get pinned messages in this channel. */ diff --git a/src/helpers/channels/swap_channels.ts b/src/helpers/channels/swap_channels.ts index 21dddd139..a3b3135f5 100644 --- a/src/helpers/channels/swap_channels.ts +++ b/src/helpers/channels/swap_channels.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { ModifyGuildChannelPositions } from "../../types/guilds/modify_guild_channel_position.ts"; +import type { ModifyGuildChannelPositions } from "../../types/guilds/modify_guild_channel_position.ts"; import { endpoints } from "../../util/constants.ts"; /** Modify the positions of channels on the guild. Requires MANAGE_CHANNELS permisison. */ diff --git a/src/helpers/commands/batch_edit_slash_command_permissions.ts b/src/helpers/commands/batch_edit_slash_command_permissions.ts index 139ee5981..8be782bff 100644 --- a/src/helpers/commands/batch_edit_slash_command_permissions.ts +++ b/src/helpers/commands/batch_edit_slash_command_permissions.ts @@ -1,6 +1,6 @@ import { applicationId } from "../../bot.ts"; import { rest } from "../../rest/rest.ts"; -import { ApplicationCommandPermissions } from "../../types/interactions/application_command_permissions.ts"; +import type { ApplicationCommandPermissions } from "../../types/interactions/application_command_permissions.ts"; import { endpoints } from "../../util/constants.ts"; import { camelKeysToSnakeCase } from "../../util/utils.ts"; diff --git a/src/helpers/commands/create_slash_command.ts b/src/helpers/commands/create_slash_command.ts index 9a6f1f36d..b5241f556 100644 --- a/src/helpers/commands/create_slash_command.ts +++ b/src/helpers/commands/create_slash_command.ts @@ -1,7 +1,7 @@ import { applicationId } from "../../bot.ts"; import { rest } from "../../rest/rest.ts"; -import { CreateGlobalApplicationCommand } from "../../types/interactions/create_global_application_command.ts"; -import { ApplicationCommand } from "../../types/mod.ts"; +import type { ApplicationCommand } from "../../types/interactions/application_command.ts"; +import type { CreateGlobalApplicationCommand } from "../../types/interactions/create_global_application_command.ts"; import { endpoints } from "../../util/constants.ts"; import { camelKeysToSnakeCase, diff --git a/src/helpers/commands/edit_slash_command_permissions.ts b/src/helpers/commands/edit_slash_command_permissions.ts index 743780b45..bbaae3bc4 100644 --- a/src/helpers/commands/edit_slash_command_permissions.ts +++ b/src/helpers/commands/edit_slash_command_permissions.ts @@ -1,6 +1,6 @@ import { applicationId } from "../../bot.ts"; import { rest } from "../../rest/rest.ts"; -import { ApplicationCommandPermissions } from "../../types/interactions/application_command_permissions.ts"; +import type { ApplicationCommandPermissions } from "../../types/interactions/application_command_permissions.ts"; import { endpoints } from "../../util/constants.ts"; import { camelKeysToSnakeCase } from "../../util/utils.ts"; diff --git a/src/helpers/commands/edit_slash_response.ts b/src/helpers/commands/edit_slash_response.ts index 2c458f047..9857805e6 100644 --- a/src/helpers/commands/edit_slash_response.ts +++ b/src/helpers/commands/edit_slash_response.ts @@ -1,7 +1,7 @@ import { applicationId } from "../../bot.ts"; import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { DiscordenoEditWebhookMessage } from "../../types/discordeno/edit_webhook_message.ts"; +import type { DiscordenoEditWebhookMessage } from "../../types/discordeno/edit_webhook_message.ts"; import { DiscordAllowedMentionsTypes } from "../../types/messages/allowed_mentions_types.ts"; import { Errors } from "../../types/misc/errors.ts"; import { endpoints } from "../../util/constants.ts"; diff --git a/src/helpers/commands/get_slash_command.ts b/src/helpers/commands/get_slash_command.ts index 2c0f9be01..846b47bf0 100644 --- a/src/helpers/commands/get_slash_command.ts +++ b/src/helpers/commands/get_slash_command.ts @@ -1,6 +1,6 @@ import { applicationId } from "../../bot.ts"; import { rest } from "../../rest/rest.ts"; -import { ApplicationCommand } from "../../types/interactions/application_command.ts"; +import type { ApplicationCommand } from "../../types/interactions/application_command.ts"; import { endpoints } from "../../util/constants.ts"; /** Fetchs the global command for the given Id. If a guildId is provided, the guild command will be fetched. */ diff --git a/src/helpers/commands/get_slash_command_permission.ts b/src/helpers/commands/get_slash_command_permission.ts index ead639b36..f07c92f18 100644 --- a/src/helpers/commands/get_slash_command_permission.ts +++ b/src/helpers/commands/get_slash_command_permission.ts @@ -1,6 +1,6 @@ import { applicationId } from "../../bot.ts"; import { rest } from "../../rest/rest.ts"; -import { GuildApplicationCommandPermissions } from "../../types/interactions/guild_application_command_permissions.ts"; +import type { GuildApplicationCommandPermissions } from "../../types/interactions/guild_application_command_permissions.ts"; import { endpoints } from "../../util/constants.ts"; /** Fetches command permissions for a specific command for your application in a guild. Returns a GuildApplicationCommandPermissions object. */ diff --git a/src/helpers/commands/get_slash_command_permissions.ts b/src/helpers/commands/get_slash_command_permissions.ts index 821642c8d..07c12fb8f 100644 --- a/src/helpers/commands/get_slash_command_permissions.ts +++ b/src/helpers/commands/get_slash_command_permissions.ts @@ -1,6 +1,6 @@ import { applicationId } from "../../bot.ts"; import { rest } from "../../rest/rest.ts"; -import { GuildApplicationCommandPermissions } from "../../types/interactions/guild_application_command_permissions.ts"; +import type { GuildApplicationCommandPermissions } from "../../types/interactions/guild_application_command_permissions.ts"; import { endpoints } from "../../util/constants.ts"; /** Fetches command permissions for all commands for your application in a guild. Returns an array of GuildApplicationCommandPermissions objects. */ diff --git a/src/helpers/commands/get_slash_commands.ts b/src/helpers/commands/get_slash_commands.ts index bdac9a9bc..c4f4c8eff 100644 --- a/src/helpers/commands/get_slash_commands.ts +++ b/src/helpers/commands/get_slash_commands.ts @@ -1,6 +1,6 @@ import { applicationId } from "../../bot.ts"; import { rest } from "../../rest/rest.ts"; -import { ApplicationCommand } from "../../types/interactions/application_command.ts"; +import type { ApplicationCommand } from "../../types/interactions/application_command.ts"; import { Collection } from "../../util/collection.ts"; import { endpoints } from "../../util/constants.ts"; diff --git a/src/helpers/commands/send_interaction_response.ts b/src/helpers/commands/send_interaction_response.ts index 6200c6641..dae5c23bd 100644 --- a/src/helpers/commands/send_interaction_response.ts +++ b/src/helpers/commands/send_interaction_response.ts @@ -1,7 +1,7 @@ import { applicationId, eventHandlers } from "../../bot.ts"; import { cache } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; -import { DiscordenoInteractionResponse } from "../../types/discordeno/interaction_response.ts"; +import type { DiscordenoInteractionResponse } from "../../types/discordeno/interaction_response.ts"; import { endpoints } from "../../util/constants.ts"; /** diff --git a/src/helpers/commands/upsert_slash_command.ts b/src/helpers/commands/upsert_slash_command.ts index d0211400d..ed2dc20f9 100644 --- a/src/helpers/commands/upsert_slash_command.ts +++ b/src/helpers/commands/upsert_slash_command.ts @@ -1,7 +1,7 @@ import { applicationId } from "../../bot.ts"; import { rest } from "../../rest/rest.ts"; -import { EditGlobalApplicationCommand } from "../../types/interactions/edit_global_application_command.ts"; -import { ApplicationCommand } from "../../types/mod.ts"; +import type { ApplicationCommand } from "../../types/interactions/application_command.ts"; +import type { EditGlobalApplicationCommand } from "../../types/interactions/edit_global_application_command.ts"; import { endpoints } from "../../util/constants.ts"; import { validateSlashCommands } from "../../util/utils.ts"; diff --git a/src/helpers/commands/upsert_slash_commands.ts b/src/helpers/commands/upsert_slash_commands.ts index 3be28f765..b49c2cb41 100644 --- a/src/helpers/commands/upsert_slash_commands.ts +++ b/src/helpers/commands/upsert_slash_commands.ts @@ -1,7 +1,7 @@ import { applicationId } from "../../bot.ts"; import { rest } from "../../rest/rest.ts"; -import { EditGlobalApplicationCommand } from "../../types/interactions/edit_global_application_command.ts"; -import { ApplicationCommand } from "../../types/mod.ts"; +import type { ApplicationCommand } from "../../types/interactions/application_command.ts"; +import type { EditGlobalApplicationCommand } from "../../types/interactions/edit_global_application_command.ts"; import { endpoints } from "../../util/constants.ts"; import { validateSlashCommands } from "../../util/utils.ts"; diff --git a/src/helpers/discovery/add_discovery_subcategory.ts b/src/helpers/discovery/add_discovery_subcategory.ts index 3341f394c..4061925cd 100644 --- a/src/helpers/discovery/add_discovery_subcategory.ts +++ b/src/helpers/discovery/add_discovery_subcategory.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { +import type { AddGuildDiscoverySubcategory, } from "../../types/discovery/add_guild_discovery_subcategory.ts"; import { endpoints } from "../../util/constants.ts"; diff --git a/src/helpers/discovery/edit_discovery.ts b/src/helpers/discovery/edit_discovery.ts index e94c7a60b..71f7e3ab5 100644 --- a/src/helpers/discovery/edit_discovery.ts +++ b/src/helpers/discovery/edit_discovery.ts @@ -1,6 +1,6 @@ import { rest } from "../../rest/rest.ts"; -import { DiscoveryMetadata } from "../../types/discovery/discovery_metadata.ts"; -import { ModifyGuildDiscoveryMetadata } from "../../types/discovery/modify_guild_discovery_metadata.ts"; +import type { DiscoveryMetadata } from "../../types/discovery/discovery_metadata.ts"; +import type { ModifyGuildDiscoveryMetadata } from "../../types/discovery/modify_guild_discovery_metadata.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; import { camelKeysToSnakeCase } from "../../util/utils.ts"; diff --git a/src/helpers/discovery/get_discovery_categories.ts b/src/helpers/discovery/get_discovery_categories.ts index 8ec9858f5..0ac60d848 100644 --- a/src/helpers/discovery/get_discovery_categories.ts +++ b/src/helpers/discovery/get_discovery_categories.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { DiscoveryCategory } from "../../types/discovery/discovery_category.ts"; +import type { DiscoveryCategory } from "../../types/discovery/discovery_category.ts"; import { Collection } from "../../util/collection.ts"; import { endpoints } from "../../util/constants.ts"; diff --git a/src/helpers/discovery/valid_discovery_term.ts b/src/helpers/discovery/valid_discovery_term.ts index 5a96016af..b41a60742 100644 --- a/src/helpers/discovery/valid_discovery_term.ts +++ b/src/helpers/discovery/valid_discovery_term.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { ValidateDiscoverySearchTerm } from "../../types/discovery/validate_discovery_search_term.ts"; +import type { ValidateDiscoverySearchTerm } from "../../types/discovery/validate_discovery_search_term.ts"; import { endpoints } from "../../util/constants.ts"; export async function validDiscoveryTerm(term: string) { diff --git a/src/helpers/emojis/create_emoji.ts b/src/helpers/emojis/create_emoji.ts index 504bdd299..432885fc0 100644 --- a/src/helpers/emojis/create_emoji.ts +++ b/src/helpers/emojis/create_emoji.ts @@ -1,6 +1,6 @@ import { rest } from "../../rest/rest.ts"; import { CreateGuildEmoji } from "../../types/emojis/create_guild_emoji.ts"; -import { Emoji } from "../../types/emojis/emoji.ts"; +import type { Emoji } from "../../types/emojis/emoji.ts"; import { snowflakeToBigint } from "../../util/bigint.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/emojis/edit_emoji.ts b/src/helpers/emojis/edit_emoji.ts index 5d2a0f8ed..87264c5f6 100644 --- a/src/helpers/emojis/edit_emoji.ts +++ b/src/helpers/emojis/edit_emoji.ts @@ -1,6 +1,6 @@ import { rest } from "../../rest/rest.ts"; -import { ModifyGuildEmoji } from "../../types/emojis/modify_guild_emoji.ts"; -import { Emoji } from "../../types/mod.ts"; +import type { Emoji } from "../../types/emojis/emoji.ts"; +import type { ModifyGuildEmoji } from "../../types/emojis/modify_guild_emoji.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/emojis/get_emoji.ts b/src/helpers/emojis/get_emoji.ts index d66ac2aa1..9679ee86a 100644 --- a/src/helpers/emojis/get_emoji.ts +++ b/src/helpers/emojis/get_emoji.ts @@ -1,6 +1,6 @@ import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; -import { Emoji } from "../../types/emojis/emoji.ts"; +import type { Emoji } from "../../types/emojis/emoji.ts"; import { Errors } from "../../types/misc/errors.ts"; import { endpoints } from "../../util/constants.ts"; diff --git a/src/helpers/emojis/get_emojis.ts b/src/helpers/emojis/get_emojis.ts index c0e56b65f..e3dfa30fd 100644 --- a/src/helpers/emojis/get_emojis.ts +++ b/src/helpers/emojis/get_emojis.ts @@ -1,7 +1,7 @@ import { eventHandlers } from "../../bot.ts"; import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; -import { Emoji } from "../../types/emojis/emoji.ts"; +import type { Emoji } from "../../types/emojis/emoji.ts"; import { Errors } from "../../types/misc/errors.ts"; import { snowflakeToBigint } from "../../util/bigint.ts"; import { Collection } from "../../util/collection.ts"; diff --git a/src/helpers/guilds/create_guild.ts b/src/helpers/guilds/create_guild.ts index 40c28f3fa..517a0f63c 100644 --- a/src/helpers/guilds/create_guild.ts +++ b/src/helpers/guilds/create_guild.ts @@ -2,8 +2,8 @@ import { botId } from "../../bot.ts"; import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { CreateGuild } from "../../types/guilds/create_guild.ts"; -import { Guild } from "../../types/guilds/guild.ts"; +import type { CreateGuild } from "../../types/guilds/create_guild.ts"; +import type { Guild } from "../../types/guilds/guild.ts"; import { endpoints } from "../../util/constants.ts"; import { getMember } from "../members/get_member.ts"; diff --git a/src/helpers/guilds/edit_guild.ts b/src/helpers/guilds/edit_guild.ts index 212419486..278597312 100644 --- a/src/helpers/guilds/edit_guild.ts +++ b/src/helpers/guilds/edit_guild.ts @@ -1,8 +1,8 @@ import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { Guild } from "../../types/guilds/guild.ts"; -import { ModifyGuild } from "../../types/guilds/modify_guild.ts"; +import type { Guild } from "../../types/guilds/guild.ts"; +import type { ModifyGuild } from "../../types/guilds/modify_guild.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; import { urlToBase64 } from "../../util/utils.ts"; diff --git a/src/helpers/guilds/edit_welcome_screen.ts b/src/helpers/guilds/edit_welcome_screen.ts index 284f1fb96..29114dea3 100644 --- a/src/helpers/guilds/edit_welcome_screen.ts +++ b/src/helpers/guilds/edit_welcome_screen.ts @@ -1,6 +1,6 @@ import { rest } from "../../rest/rest.ts"; -import { ModifyGuildWelcomeScreen } from "../../types/guilds/modify_guild_welcome_screen.ts"; -import { WelcomeScreen } from "../../types/mod.ts"; +import type { ModifyGuildWelcomeScreen } from "../../types/guilds/modify_guild_welcome_screen.ts"; +import type { WelcomeScreen } from "../../types/guilds/welcome_screen.ts"; import { endpoints } from "../../util/constants.ts"; import { camelKeysToSnakeCase } from "../../util/utils.ts"; diff --git a/src/helpers/guilds/edit_widget.ts b/src/helpers/guilds/edit_widget.ts index 8a27129b3..9cc0ccd69 100644 --- a/src/helpers/guilds/edit_widget.ts +++ b/src/helpers/guilds/edit_widget.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { GuildWidget } from "../../types/guilds/guild_widget.ts"; +import type { GuildWidget } from "../../types/guilds/guild_widget.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/guilds/get_audit_logs.ts b/src/helpers/guilds/get_audit_logs.ts index babcc0354..a090fbf49 100644 --- a/src/helpers/guilds/get_audit_logs.ts +++ b/src/helpers/guilds/get_audit_logs.ts @@ -1,6 +1,6 @@ import { rest } from "../../rest/rest.ts"; -import { AuditLog } from "../../types/audit_log/audit_log.ts"; -import { GetGuildAuditLog } from "../../types/audit_log/get_guild_audit_log.ts"; +import type { AuditLog } from "../../types/audit_log/audit_log.ts"; +import type { GetGuildAuditLog } from "../../types/audit_log/get_guild_audit_log.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; import { camelKeysToSnakeCase } from "../../util/utils.ts"; diff --git a/src/helpers/guilds/get_available_voice_regions.ts b/src/helpers/guilds/get_available_voice_regions.ts index 5570e4916..2111f6a3d 100644 --- a/src/helpers/guilds/get_available_voice_regions.ts +++ b/src/helpers/guilds/get_available_voice_regions.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { VoiceRegion } from "../../types/voice/voice_region.ts"; +import type { VoiceRegion } from "../../types/voice/voice_region.ts"; import { endpoints } from "../../util/constants.ts"; /** Returns an array of voice regions that can be used when creating servers. */ diff --git a/src/helpers/guilds/get_ban.ts b/src/helpers/guilds/get_ban.ts index db70fc796..c6f73a22a 100644 --- a/src/helpers/guilds/get_ban.ts +++ b/src/helpers/guilds/get_ban.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Ban } from "../../types/guilds/ban.ts"; +import type { Ban } from "../../types/guilds/ban.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/guilds/get_bans.ts b/src/helpers/guilds/get_bans.ts index ba939dfb8..f2a09617d 100644 --- a/src/helpers/guilds/get_bans.ts +++ b/src/helpers/guilds/get_bans.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Ban } from "../../types/guilds/ban.ts"; +import type { Ban } from "../../types/guilds/ban.ts"; import { snowflakeToBigint } from "../../util/bigint.ts"; import { Collection } from "../../util/collection.ts"; import { endpoints } from "../../util/constants.ts"; diff --git a/src/helpers/guilds/get_guild.ts b/src/helpers/guilds/get_guild.ts index 0a809bbf2..3b13a74dc 100644 --- a/src/helpers/guilds/get_guild.ts +++ b/src/helpers/guilds/get_guild.ts @@ -1,7 +1,7 @@ import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { Guild } from "../../types/guilds/guild.ts"; +import type { Guild } from "../../types/guilds/guild.ts"; import { endpoints } from "../../util/constants.ts"; import { ws } from "../../ws/ws.ts"; diff --git a/src/helpers/guilds/get_guild_preview.ts b/src/helpers/guilds/get_guild_preview.ts index b5024f2b8..a62379a6d 100644 --- a/src/helpers/guilds/get_guild_preview.ts +++ b/src/helpers/guilds/get_guild_preview.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { GuildPreview } from "../../types/guilds/guild_preview.ts"; +import type { GuildPreview } from "../../types/guilds/guild_preview.ts"; import { endpoints } from "../../util/constants.ts"; /** Returns the guild preview object for the given id. If the bot is not in the guild, then the guild must be Discoverable. */ diff --git a/src/helpers/guilds/get_prune_count.ts b/src/helpers/guilds/get_prune_count.ts index 27f1691cc..fe25797d6 100644 --- a/src/helpers/guilds/get_prune_count.ts +++ b/src/helpers/guilds/get_prune_count.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { GetGuildPruneCountQuery } from "../../types/guilds/get_guild_prune_count.ts"; +import type { GetGuildPruneCountQuery } from "../../types/guilds/get_guild_prune_count.ts"; import { Errors } from "../../types/misc/errors.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/guilds/get_vainty_url.ts b/src/helpers/guilds/get_vainty_url.ts index c14719b30..9554b2b04 100644 --- a/src/helpers/guilds/get_vainty_url.ts +++ b/src/helpers/guilds/get_vainty_url.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { InviteMetadata } from "../../types/invites/invite_metadata.ts"; +import type { InviteMetadata } from "../../types/invites/invite_metadata.ts"; import { endpoints } from "../../util/constants.ts"; /** Returns the code and uses of the vanity url for this server if it is enabled else `code` will be null. Requires the `MANAGE_GUILD` permission. */ diff --git a/src/helpers/guilds/get_voice_regions.ts b/src/helpers/guilds/get_voice_regions.ts index ad1598ce5..966867d82 100644 --- a/src/helpers/guilds/get_voice_regions.ts +++ b/src/helpers/guilds/get_voice_regions.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { VoiceRegion } from "../../types/voice/voice_region.ts"; +import type { VoiceRegion } from "../../types/voice/voice_region.ts"; import { Collection } from "../../util/collection.ts"; import { endpoints } from "../../util/constants.ts"; diff --git a/src/helpers/guilds/get_welcome_screen.ts b/src/helpers/guilds/get_welcome_screen.ts index f30b8e9c7..2b20e2826 100644 --- a/src/helpers/guilds/get_welcome_screen.ts +++ b/src/helpers/guilds/get_welcome_screen.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { WelcomeScreen } from "../../types/mod.ts"; +import type { WelcomeScreen } from "../../types/mod.ts"; import { endpoints } from "../../util/constants.ts"; export async function getWelcomeScreen(guildId: bigint) { diff --git a/src/helpers/guilds/get_widget.ts b/src/helpers/guilds/get_widget.ts index 0be0e4991..9a31b2c30 100644 --- a/src/helpers/guilds/get_widget.ts +++ b/src/helpers/guilds/get_widget.ts @@ -1,6 +1,6 @@ import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; -import { GuildWidgetDetails } from "../../types/guilds/guild_widget_details.ts"; +import type { GuildWidgetDetails } from "../../types/guilds/guild_widget_details.ts"; import { Errors } from "../../types/misc/errors.ts"; import { endpoints } from "../../util/constants.ts"; diff --git a/src/helpers/guilds/get_widget_image_url.ts b/src/helpers/guilds/get_widget_image_url.ts index ede9e97ff..e754b0aba 100644 --- a/src/helpers/guilds/get_widget_image_url.ts +++ b/src/helpers/guilds/get_widget_image_url.ts @@ -1,5 +1,5 @@ import { cacheHandlers } from "../../cache.ts"; -import { GetGuildWidgetImageQuery } from "../../types/guilds/get_guild_widget_image.ts"; +import type { GetGuildWidgetImageQuery } from "../../types/guilds/get_guild_widget_image.ts"; import { Errors } from "../../types/misc/errors.ts"; import { endpoints } from "../../util/constants.ts"; diff --git a/src/helpers/guilds/get_widget_settings.ts b/src/helpers/guilds/get_widget_settings.ts index e8a106816..622199621 100644 --- a/src/helpers/guilds/get_widget_settings.ts +++ b/src/helpers/guilds/get_widget_settings.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { GuildWidget } from "../../types/guilds/guild_widget.ts"; +import type { GuildWidget } from "../../types/guilds/guild_widget.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/guilds/guild_banner_url.ts b/src/helpers/guilds/guild_banner_url.ts index 030d2cab6..b539b27be 100644 --- a/src/helpers/guilds/guild_banner_url.ts +++ b/src/helpers/guilds/guild_banner_url.ts @@ -1,5 +1,5 @@ -import { DiscordImageFormat } from "../../types/misc/image_format.ts"; -import { DiscordImageSize } from "../../types/misc/image_size.ts"; +import type { DiscordImageFormat } from "../../types/misc/image_format.ts"; +import type { DiscordImageSize } from "../../types/misc/image_size.ts"; import { endpoints } from "../../util/constants.ts"; import { formatImageURL } from "../../util/utils.ts"; diff --git a/src/helpers/guilds/guild_icon_url.ts b/src/helpers/guilds/guild_icon_url.ts index 09982fec3..5a4c2104a 100644 --- a/src/helpers/guilds/guild_icon_url.ts +++ b/src/helpers/guilds/guild_icon_url.ts @@ -1,5 +1,5 @@ -import { DiscordImageFormat } from "../../types/misc/image_format.ts"; -import { DiscordImageSize } from "../../types/misc/image_size.ts"; +import type { DiscordImageFormat } from "../../types/misc/image_format.ts"; +import type { DiscordImageSize } from "../../types/misc/image_size.ts"; import { endpoints } from "../../util/constants.ts"; import { formatImageURL } from "../../util/utils.ts"; diff --git a/src/helpers/guilds/guild_splash_url.ts b/src/helpers/guilds/guild_splash_url.ts index 83d734a07..b8aef6d56 100644 --- a/src/helpers/guilds/guild_splash_url.ts +++ b/src/helpers/guilds/guild_splash_url.ts @@ -1,5 +1,5 @@ -import { DiscordImageFormat } from "../../types/misc/image_format.ts"; -import { DiscordImageSize } from "../../types/misc/image_size.ts"; +import type { DiscordImageFormat } from "../../types/misc/image_format.ts"; +import type { DiscordImageSize } from "../../types/misc/image_size.ts"; import { endpoints } from "../../util/constants.ts"; import { formatImageURL } from "../../util/utils.ts"; diff --git a/src/helpers/guilds/update_bot_voice_state.ts b/src/helpers/guilds/update_bot_voice_state.ts index e75d5ce9c..60426da49 100644 --- a/src/helpers/guilds/update_bot_voice_state.ts +++ b/src/helpers/guilds/update_bot_voice_state.ts @@ -1,6 +1,5 @@ -import { RequestManager } from "../../rest/request_manager.ts"; -import { - DiscordUpdateSelfVoiceState, +import { rest } from "../../rest/rest.ts"; +import type { UpdateSelfVoiceState, } from "../../types/guilds/update_self_voice_state.ts"; import { endpoints } from "../../util/constants.ts"; @@ -15,14 +14,13 @@ import { camelKeysToSnakeCase } from "../../util/utils.ts"; * - You must have the `REQUEST_TO_SPEAK` permission to request to speak. You can always clear your own request to speak. * - You are able to set `request_to_speak_timestamp` to any present or future time. */ -export function updateBotVoiceState( +export async function updateBotVoiceState( guildId: bigint, data: UpdateSelfVoiceState, ) { - const payload = camelKeysToSnakeCase(data); - - return RequestManager.patch( + return await rest.runMethod( + "patch", endpoints.UPDATE_VOICE_STATE(guildId), - payload, + camelKeysToSnakeCase(data), ); } diff --git a/src/helpers/guilds/update_user_voice_state.ts b/src/helpers/guilds/update_user_voice_state.ts index 88708ad10..6a8e47ebd 100644 --- a/src/helpers/guilds/update_user_voice_state.ts +++ b/src/helpers/guilds/update_user_voice_state.ts @@ -1,6 +1,5 @@ -import { RequestManager } from "../../rest/request_manager.ts"; -import { - DiscordUpdateOthersVoiceState, +import { rest } from "../../rest/rest.ts"; +import type { UpdateOthersVoiceState, } from "../../types/guilds/update_others_voice_state.ts"; import { endpoints } from "../../util/constants.ts"; @@ -20,10 +19,9 @@ export function updateVoiceState( userId: bigint, data: UpdateOthersVoiceState, ) { - const payload = camelKeysToSnakeCase(data); - - return RequestManager.patch( + return rest.runMethod( + "patch", endpoints.UPDATE_VOICE_STATE(guildId, userId), - payload, + camelKeysToSnakeCase(data), ); } diff --git a/src/helpers/integrations/get_integrations.ts b/src/helpers/integrations/get_integrations.ts index 96fd2110c..1947d3317 100644 --- a/src/helpers/integrations/get_integrations.ts +++ b/src/helpers/integrations/get_integrations.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Integration } from "../../types/mod.ts"; +import type { Integration } from "../../types/integration/integration.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/invites/create_invite.ts b/src/helpers/invites/create_invite.ts index 6761d9048..e6e3e6008 100644 --- a/src/helpers/invites/create_invite.ts +++ b/src/helpers/invites/create_invite.ts @@ -1,6 +1,6 @@ import { rest } from "../../rest/rest.ts"; -import { CreateChannelInvite } from "../../types/invites/create_channel_invite.ts"; -import { Invite } from "../../types/invites/invite.ts"; +import type { CreateChannelInvite } from "../../types/invites/create_channel_invite.ts"; +import type { Invite } from "../../types/invites/invite.ts"; import { Errors } from "../../types/misc/errors.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotChannelPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/invites/delete_invite.ts b/src/helpers/invites/delete_invite.ts index 130cd2488..01d1d1c48 100644 --- a/src/helpers/invites/delete_invite.ts +++ b/src/helpers/invites/delete_invite.ts @@ -1,6 +1,6 @@ import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; -import { Invite } from "../../types/invites/invite.ts"; +import type { Invite } from "../../types/invites/invite.ts"; import { Errors } from "../../types/misc/errors.ts"; import { endpoints } from "../../util/constants.ts"; import { diff --git a/src/helpers/invites/get_channel_invites.ts b/src/helpers/invites/get_channel_invites.ts index ecd27a6d5..42fa1e9d9 100644 --- a/src/helpers/invites/get_channel_invites.ts +++ b/src/helpers/invites/get_channel_invites.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Invite } from "../../types/invites/invite.ts"; +import type { Invite } from "../../types/invites/invite.ts"; import { Collection } from "../../util/collection.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotChannelPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/invites/get_invite.ts b/src/helpers/invites/get_invite.ts index de91249fe..f0781e927 100644 --- a/src/helpers/invites/get_invite.ts +++ b/src/helpers/invites/get_invite.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Invite } from "../../types/invites/invite.ts"; +import type { Invite } from "../../types/invites/invite.ts"; import { endpoints } from "../../util/constants.ts"; /** Returns an invite for the given code or throws an error if the invite doesn't exists. */ diff --git a/src/helpers/invites/get_invites.ts b/src/helpers/invites/get_invites.ts index 0ad0fda87..f2d1a732f 100644 --- a/src/helpers/invites/get_invites.ts +++ b/src/helpers/invites/get_invites.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Invite } from "../../types/invites/invite.ts"; +import type { Invite } from "../../types/invites/invite.ts"; import { Collection } from "../../util/collection.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/members/avatar_url.ts b/src/helpers/members/avatar_url.ts index 64a136370..0f9ad36da 100644 --- a/src/helpers/members/avatar_url.ts +++ b/src/helpers/members/avatar_url.ts @@ -1,5 +1,5 @@ -import { DiscordImageFormat } from "../../types/misc/image_format.ts"; -import { DiscordImageSize } from "../../types/misc/image_size.ts"; +import type { DiscordImageFormat } from "../../types/misc/image_format.ts"; +import type { DiscordImageSize } from "../../types/misc/image_size.ts"; import { endpoints } from "../../util/constants.ts"; import { formatImageURL } from "../../util/utils.ts"; diff --git a/src/helpers/members/ban_member.ts b/src/helpers/members/ban_member.ts index 57215ba59..7af64906c 100644 --- a/src/helpers/members/ban_member.ts +++ b/src/helpers/members/ban_member.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { CreateGuildBan } from "../../types/guilds/create_guild_ban.ts"; +import type { CreateGuildBan } from "../../types/guilds/create_guild_ban.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; import { camelKeysToSnakeCase } from "../../util/utils.ts"; diff --git a/src/helpers/members/edit_bot_profile.ts b/src/helpers/members/edit_bot_profile.ts index 2e4fd6c7c..719351636 100644 --- a/src/helpers/members/edit_bot_profile.ts +++ b/src/helpers/members/edit_bot_profile.ts @@ -1,6 +1,6 @@ import { rest } from "../../rest/rest.ts"; import { Errors } from "../../types/misc/errors.ts"; -import { User } from "../../types/mod.ts"; +import type { User } from "../../types/users/user.ts"; import { endpoints } from "../../util/constants.ts"; import { urlToBase64 } from "../../util/utils.ts"; diff --git a/src/helpers/members/edit_member.ts b/src/helpers/members/edit_member.ts index b9ad4efea..8b28e890b 100644 --- a/src/helpers/members/edit_member.ts +++ b/src/helpers/members/edit_member.ts @@ -1,10 +1,10 @@ import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { GuildMemberWithUser } from "../../types/guilds/guild_member.ts"; +import type { GuildMemberWithUser } from "../../types/guilds/guild_member.ts"; +import type { ModifyGuildMember } from "../../types/guilds/modify_guild_member.ts"; import { Errors } from "../../types/misc/errors.ts"; -import { ModifyGuildMember } from "../../types/mod.ts"; -import { PermissionStrings } from "../../types/permissions/permission_strings.ts"; +import type { PermissionStrings } from "../../types/permissions/permission_strings.ts"; import { bigintToSnowflake } from "../../util/bigint.ts"; import { endpoints } from "../../util/constants.ts"; import { diff --git a/src/helpers/members/get_member.ts b/src/helpers/members/get_member.ts index 4949f3165..b2c17db17 100644 --- a/src/helpers/members/get_member.ts +++ b/src/helpers/members/get_member.ts @@ -1,7 +1,7 @@ import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { GuildMemberWithUser } from "../../types/guilds/guild_member.ts"; +import type { GuildMemberWithUser } from "../../types/guilds/guild_member.ts"; import { endpoints } from "../../util/constants.ts"; /** Returns a guild member object for the specified user. diff --git a/src/helpers/members/get_members.ts b/src/helpers/members/get_members.ts index 9e0b10a02..6a7c95dd4 100644 --- a/src/helpers/members/get_members.ts +++ b/src/helpers/members/get_members.ts @@ -4,8 +4,8 @@ import { rest } from "../../rest/rest.ts"; import { DiscordenoMember } from "../../structures/member.ts"; import { structures } from "../../structures/mod.ts"; import { DiscordGatewayIntents } from "../../types/gateway/gateway_intents.ts"; -import { GuildMemberWithUser } from "../../types/guilds/guild_member.ts"; -import { ListGuildMembers } from "../../types/guilds/list_guild_members.ts"; +import type { GuildMemberWithUser } from "../../types/guilds/guild_member.ts"; +import type { ListGuildMembers } from "../../types/guilds/list_guild_members.ts"; import { Errors } from "../../types/misc/errors.ts"; import { bigintToSnowflake } from "../../util/bigint.ts"; import { Collection } from "../../util/collection.ts"; diff --git a/src/helpers/members/prune_members.ts b/src/helpers/members/prune_members.ts index 0ee5010fb..a59860ad5 100644 --- a/src/helpers/members/prune_members.ts +++ b/src/helpers/members/prune_members.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { BeginGuildPrune } from "../../types/guilds/begin_guild_prune.ts"; +import type { BeginGuildPrune } from "../../types/guilds/begin_guild_prune.ts"; import { Errors } from "../../types/misc/errors.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/members/search_members.ts b/src/helpers/members/search_members.ts index b57745f1d..6258c69de 100644 --- a/src/helpers/members/search_members.ts +++ b/src/helpers/members/search_members.ts @@ -2,8 +2,8 @@ import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; import { DiscordenoMember } from "../../structures/member.ts"; import { structures } from "../../structures/mod.ts"; -import { GuildMemberWithUser } from "../../types/guilds/guild_member.ts"; -import { SearchGuildMembers } from "../../types/members/search_guild_members.ts"; +import type { GuildMemberWithUser } from "../../types/guilds/guild_member.ts"; +import type { SearchGuildMembers } from "../../types/members/search_guild_members.ts"; import { Errors } from "../../types/misc/errors.ts"; import { Collection } from "../../util/collection.ts"; import { endpoints } from "../../util/constants.ts"; diff --git a/src/helpers/members/send_direct_message.ts b/src/helpers/members/send_direct_message.ts index 4aae8e391..710994a62 100644 --- a/src/helpers/members/send_direct_message.ts +++ b/src/helpers/members/send_direct_message.ts @@ -1,8 +1,8 @@ import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { Channel } from "../../types/channels/channel.ts"; -import { CreateMessage } from "../../types/messages/create_message.ts"; +import type { Channel } from "../../types/channels/channel.ts"; +import type { CreateMessage } from "../../types/messages/create_message.ts"; import { endpoints } from "../../util/constants.ts"; import { sendMessage } from "../messages/send_message.ts"; diff --git a/src/helpers/messages/edit_message.ts b/src/helpers/messages/edit_message.ts index e45bc4577..b76a55974 100644 --- a/src/helpers/messages/edit_message.ts +++ b/src/helpers/messages/edit_message.ts @@ -3,9 +3,9 @@ import { rest } from "../../rest/rest.ts"; import { DiscordenoMessage } from "../../structures/message.ts"; import { structures } from "../../structures/mod.ts"; import { EditMessage } from "../../types/messages/edit_message.ts"; -import { Message } from "../../types/messages/message.ts"; +import type { Message } from "../../types/messages/message.ts"; import { Errors } from "../../types/misc/errors.ts"; -import { PermissionStrings } from "../../types/permissions/permission_strings.ts"; +import type { PermissionStrings } from "../../types/permissions/permission_strings.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotChannelPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/messages/get_message.ts b/src/helpers/messages/get_message.ts index 7779a9d67..863eb07e0 100644 --- a/src/helpers/messages/get_message.ts +++ b/src/helpers/messages/get_message.ts @@ -1,7 +1,7 @@ import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { Message } from "../../types/messages/message.ts"; +import type { Message } from "../../types/messages/message.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotChannelPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/messages/get_messages.ts b/src/helpers/messages/get_messages.ts index f12e4eb0c..79b29d238 100644 --- a/src/helpers/messages/get_messages.ts +++ b/src/helpers/messages/get_messages.ts @@ -6,7 +6,7 @@ import { GetMessagesBefore, GetMessagesLimit, } from "../../types/messages/get_messages.ts"; -import { Message } from "../../types/messages/message.ts"; +import type { Message } from "../../types/messages/message.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotChannelPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/messages/get_reactions.ts b/src/helpers/messages/get_reactions.ts index 04ee9806e..b06dd5709 100644 --- a/src/helpers/messages/get_reactions.ts +++ b/src/helpers/messages/get_reactions.ts @@ -1,6 +1,6 @@ import { rest } from "../../rest/rest.ts"; -import { GetReactions } from "../../types/messages/message_get_reactions.ts"; -import { User } from "../../types/users/user.ts"; +import type { GetReactions } from "../../types/messages/message_get_reactions.ts"; +import type { User } from "../../types/users/user.ts"; import { Collection } from "../../util/collection.ts"; import { endpoints } from "../../util/constants.ts"; diff --git a/src/helpers/messages/publish_message.ts b/src/helpers/messages/publish_message.ts index 5c60a38bf..877d7c32d 100644 --- a/src/helpers/messages/publish_message.ts +++ b/src/helpers/messages/publish_message.ts @@ -1,6 +1,6 @@ import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { Message } from "../../types/messages/message.ts"; +import type { Message } from "../../types/messages/message.ts"; import { endpoints } from "../../util/constants.ts"; /** Crosspost a message in a News Channel to following channels. */ diff --git a/src/helpers/messages/send_message.ts b/src/helpers/messages/send_message.ts index 0dd952d6e..9b08d706a 100644 --- a/src/helpers/messages/send_message.ts +++ b/src/helpers/messages/send_message.ts @@ -4,10 +4,10 @@ import { structures } from "../../structures/mod.ts"; import { DiscordChannelTypes } from "../../types/channels/channel_types.ts"; import { DiscordAllowedMentionsTypes } from "../../types/messages/allowed_mentions_types.ts"; import { ButtonStyles } from "../../types/messages/components/button_styles.ts"; -import { CreateMessage } from "../../types/messages/create_message.ts"; -import { Message } from "../../types/messages/message.ts"; +import type { CreateMessage } from "../../types/messages/create_message.ts"; +import type { Message } from "../../types/messages/message.ts"; import { Errors } from "../../types/misc/errors.ts"; -import { PermissionStrings } from "../../types/permissions/permission_strings.ts"; +import type { PermissionStrings } from "../../types/permissions/permission_strings.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotChannelPermissions } from "../../util/permissions.ts"; import { camelKeysToSnakeCase } from "../../util/utils.ts"; diff --git a/src/helpers/misc/get_gateway_bot.ts b/src/helpers/misc/get_gateway_bot.ts index d765780be..ac7594177 100644 --- a/src/helpers/misc/get_gateway_bot.ts +++ b/src/helpers/misc/get_gateway_bot.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { GetGatewayBot } from "../../types/gateway/get_gateway_bot.ts"; +import type { GetGatewayBot } from "../../types/gateway/get_gateway_bot.ts"; import { endpoints } from "../../util/constants.ts"; /** Get the bots Gateway metadata that can help during the operation of large or sharded bots. */ diff --git a/src/helpers/misc/get_user.ts b/src/helpers/misc/get_user.ts index 0c1517c91..f4632beb5 100644 --- a/src/helpers/misc/get_user.ts +++ b/src/helpers/misc/get_user.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { User } from "../../types/users/user.ts"; +import type { User } from "../../types/users/user.ts"; import { endpoints } from "../../util/constants.ts"; /** This function will return the raw user payload in the rare cases you need to fetch a user directly from the API. */ diff --git a/src/helpers/roles/create_role.ts b/src/helpers/roles/create_role.ts index 363809489..d8050ea4f 100644 --- a/src/helpers/roles/create_role.ts +++ b/src/helpers/roles/create_role.ts @@ -2,7 +2,7 @@ import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; import { CreateGuildRole } from "../../types/guilds/create_guild_role.ts"; -import { Role } from "../../types/permissions/role.ts"; +import type { Role } from "../../types/permissions/role.ts"; import { endpoints } from "../../util/constants.ts"; import { calculateBits, diff --git a/src/helpers/roles/edit_role.ts b/src/helpers/roles/edit_role.ts index ad178d063..3b0595913 100644 --- a/src/helpers/roles/edit_role.ts +++ b/src/helpers/roles/edit_role.ts @@ -1,6 +1,7 @@ import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; -import { CreateGuildRole, Role } from "../../types/mod.ts"; +import type { CreateGuildRole } from "../../types/guilds/create_guild_role.ts"; +import type { Role } from "../../types/permissions/role.ts"; import { endpoints } from "../../util/constants.ts"; import { calculateBits, diff --git a/src/helpers/roles/get_roles.ts b/src/helpers/roles/get_roles.ts index b65dbf882..5c6967a6a 100644 --- a/src/helpers/roles/get_roles.ts +++ b/src/helpers/roles/get_roles.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Role } from "../../types/permissions/role.ts"; +import type { Role } from "../../types/permissions/role.ts"; import { Collection } from "../../util/collection.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/templates/create_guild_from_template.ts b/src/helpers/templates/create_guild_from_template.ts index 770f71299..9db4d427f 100644 --- a/src/helpers/templates/create_guild_from_template.ts +++ b/src/helpers/templates/create_guild_from_template.ts @@ -1,7 +1,7 @@ import { cacheHandlers } from "../../cache.ts"; import { rest } from "../../rest/rest.ts"; -import { Guild } from "../../types/guilds/guild.ts"; -import { CreateGuildFromTemplate } from "../../types/templates/create_guild_from_template.ts"; +import type { Guild } from "../../types/guilds/guild.ts"; +import type { CreateGuildFromTemplate } from "../../types/templates/create_guild_from_template.ts"; import { endpoints } from "../../util/constants.ts"; import { urlToBase64 } from "../../util/utils.ts"; diff --git a/src/helpers/templates/create_guild_template.ts b/src/helpers/templates/create_guild_template.ts index b6d54feed..c8f3d5dfb 100644 --- a/src/helpers/templates/create_guild_template.ts +++ b/src/helpers/templates/create_guild_template.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Template } from "../../types/templates/template.ts"; +import type { Template } from "../../types/templates/template.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/templates/delete_guild_template.ts b/src/helpers/templates/delete_guild_template.ts index 4cacb22e7..253a39b4e 100644 --- a/src/helpers/templates/delete_guild_template.ts +++ b/src/helpers/templates/delete_guild_template.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Template } from "../../types/templates/template.ts"; +import type { Template } from "../../types/templates/template.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/templates/edit_guild_template.ts b/src/helpers/templates/edit_guild_template.ts index d35779cbd..d4aee54df 100644 --- a/src/helpers/templates/edit_guild_template.ts +++ b/src/helpers/templates/edit_guild_template.ts @@ -1,6 +1,6 @@ import { rest } from "../../rest/rest.ts"; -import { ModifyGuildTemplate } from "../../types/templates/modify_guild_template.ts"; -import { Template } from "../../types/templates/template.ts"; +import type { ModifyGuildTemplate } from "../../types/templates/modify_guild_template.ts"; +import type { Template } from "../../types/templates/template.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/templates/get_guild_templates.ts b/src/helpers/templates/get_guild_templates.ts index 30ba5be5f..c2a3d8521 100644 --- a/src/helpers/templates/get_guild_templates.ts +++ b/src/helpers/templates/get_guild_templates.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Template } from "../../types/templates/template.ts"; +import type { Template } from "../../types/templates/template.ts"; import { Collection } from "../../util/collection.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/templates/get_template.ts b/src/helpers/templates/get_template.ts index 41213e967..f67d9ffe0 100644 --- a/src/helpers/templates/get_template.ts +++ b/src/helpers/templates/get_template.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Template } from "../../types/templates/template.ts"; +import type { Template } from "../../types/templates/template.ts"; import { endpoints } from "../../util/constants.ts"; /** Returns the guild template if it exists */ diff --git a/src/helpers/templates/sync_guild_template.ts b/src/helpers/templates/sync_guild_template.ts index 235952321..24fe0fc05 100644 --- a/src/helpers/templates/sync_guild_template.ts +++ b/src/helpers/templates/sync_guild_template.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Template } from "../../types/templates/template.ts"; +import type { Template } from "../../types/templates/template.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/type_guards/is_action_row.ts b/src/helpers/type_guards/is_action_row.ts index c64fc8a6d..2dec9aafe 100644 --- a/src/helpers/type_guards/is_action_row.ts +++ b/src/helpers/type_guards/is_action_row.ts @@ -1,5 +1,5 @@ -import { ActionRow } from "../../types/messages/components/action_row.ts"; -import { MessageComponent } from "../../types/messages/components/message_components.ts"; +import type { ActionRow } from "../../types/messages/components/action_row.ts"; +import type { MessageComponent } from "../../types/messages/components/message_components.ts"; import { MessageComponentTypes } from "../../types/messages/components/message_component_types.ts"; /** A type guard function to tell if it is a action row component */ diff --git a/src/helpers/type_guards/is_button.ts b/src/helpers/type_guards/is_button.ts index dfe2b92cd..acc99645b 100644 --- a/src/helpers/type_guards/is_button.ts +++ b/src/helpers/type_guards/is_button.ts @@ -1,5 +1,5 @@ -import { ButtonComponent } from "../../types/messages/components/button_component.ts"; -import { MessageComponent } from "../../types/messages/components/message_components.ts"; +import type { ButtonComponent } from "../../types/messages/components/button_component.ts"; +import type { MessageComponent } from "../../types/messages/components/message_components.ts"; import { MessageComponentTypes } from "../../types/messages/components/message_component_types.ts"; /** A type guard function to tell if it is a button component */ diff --git a/src/helpers/webhooks/create_webhook.ts b/src/helpers/webhooks/create_webhook.ts index dd169d286..a83c25147 100644 --- a/src/helpers/webhooks/create_webhook.ts +++ b/src/helpers/webhooks/create_webhook.ts @@ -1,7 +1,7 @@ import { rest } from "../../rest/rest.ts"; import { Errors } from "../../types/misc/errors.ts"; -import { CreateWebhook } from "../../types/webhooks/create_webhook.ts"; -import { Webhook } from "../../types/webhooks/webhook.ts"; +import type { CreateWebhook } from "../../types/webhooks/create_webhook.ts"; +import type { Webhook } from "../../types/webhooks/webhook.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotChannelPermissions } from "../../util/permissions.ts"; import { urlToBase64 } from "../../util/utils.ts"; diff --git a/src/helpers/webhooks/edit_webhook.ts b/src/helpers/webhooks/edit_webhook.ts index 28dc6b11a..244bd129e 100644 --- a/src/helpers/webhooks/edit_webhook.ts +++ b/src/helpers/webhooks/edit_webhook.ts @@ -1,6 +1,6 @@ import { rest } from "../../rest/rest.ts"; -import { ModifyWebhook } from "../../types/webhooks/modify_webhook.ts"; -import { Webhook } from "../../types/webhooks/webhook.ts"; +import type { ModifyWebhook } from "../../types/webhooks/modify_webhook.ts"; +import type { Webhook } from "../../types/webhooks/webhook.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotChannelPermissions } from "../../util/permissions.ts"; diff --git a/src/helpers/webhooks/edit_webhook_message.ts b/src/helpers/webhooks/edit_webhook_message.ts index d1193a885..d49ca7dfb 100644 --- a/src/helpers/webhooks/edit_webhook_message.ts +++ b/src/helpers/webhooks/edit_webhook_message.ts @@ -1,9 +1,9 @@ import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; import { DiscordAllowedMentionsTypes } from "../../types/messages/allowed_mentions_types.ts"; -import { Message } from "../../types/messages/message.ts"; +import type { Message } from "../../types/messages/message.ts"; import { Errors } from "../../types/misc/errors.ts"; -import { EditWebhookMessage } from "../../types/webhooks/edit_webhook_message.ts"; +import type { EditWebhookMessage } from "../../types/webhooks/edit_webhook_message.ts"; import { endpoints } from "../../util/constants.ts"; export async function editWebhookMessage( diff --git a/src/helpers/webhooks/edit_webhook_with_token.ts b/src/helpers/webhooks/edit_webhook_with_token.ts index 0d35ead16..3332a1d13 100644 --- a/src/helpers/webhooks/edit_webhook_with_token.ts +++ b/src/helpers/webhooks/edit_webhook_with_token.ts @@ -1,6 +1,6 @@ import { rest } from "../../rest/rest.ts"; -import { ModifyWebhook } from "../../types/webhooks/modify_webhook.ts"; -import { Webhook } from "../../types/webhooks/webhook.ts"; +import type { ModifyWebhook } from "../../types/webhooks/modify_webhook.ts"; +import type { Webhook } from "../../types/webhooks/webhook.ts"; import { endpoints } from "../../util/constants.ts"; /** Edit a webhook. Returns the updated webhook object on success. */ diff --git a/src/helpers/webhooks/execute_webhook.ts b/src/helpers/webhooks/execute_webhook.ts index 2a03e3ebb..c282cbd06 100644 --- a/src/helpers/webhooks/execute_webhook.ts +++ b/src/helpers/webhooks/execute_webhook.ts @@ -1,9 +1,9 @@ import { rest } from "../../rest/rest.ts"; import { structures } from "../../structures/mod.ts"; import { DiscordAllowedMentionsTypes } from "../../types/messages/allowed_mentions_types.ts"; -import { Message } from "../../types/messages/message.ts"; +import type { Message } from "../../types/messages/message.ts"; import { Errors } from "../../types/misc/errors.ts"; -import { ExecuteWebhook } from "../../types/webhooks/execute_webhook.ts"; +import type { ExecuteWebhook } from "../../types/webhooks/execute_webhook.ts"; import { endpoints } from "../../util/constants.ts"; /** Execute a webhook with webhook Id and webhook token */ diff --git a/src/helpers/webhooks/get_webhook.ts b/src/helpers/webhooks/get_webhook.ts index 6dd2e655d..86f40ab5e 100644 --- a/src/helpers/webhooks/get_webhook.ts +++ b/src/helpers/webhooks/get_webhook.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Webhook } from "../../types/webhooks/webhook.ts"; +import type { Webhook } from "../../types/webhooks/webhook.ts"; import { endpoints } from "../../util/constants.ts"; /** Returns the new webhook object for the given id. */ diff --git a/src/helpers/webhooks/get_webhook_with_token.ts b/src/helpers/webhooks/get_webhook_with_token.ts index 665011c84..d4085b1c1 100644 --- a/src/helpers/webhooks/get_webhook_with_token.ts +++ b/src/helpers/webhooks/get_webhook_with_token.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Webhook } from "../../types/webhooks/webhook.ts"; +import type { Webhook } from "../../types/webhooks/webhook.ts"; import { endpoints } from "../../util/constants.ts"; /** Returns the new webhook object for the given id, this call does not require authentication and returns no user in the webhook object. */ diff --git a/src/helpers/webhooks/get_webhooks.ts b/src/helpers/webhooks/get_webhooks.ts index c05c1a3cb..a9e90873d 100644 --- a/src/helpers/webhooks/get_webhooks.ts +++ b/src/helpers/webhooks/get_webhooks.ts @@ -1,5 +1,5 @@ import { rest } from "../../rest/rest.ts"; -import { Webhook } from "../../types/webhooks/webhook.ts"; +import type { Webhook } from "../../types/webhooks/webhook.ts"; import { Collection } from "../../util/collection.ts"; import { endpoints } from "../../util/constants.ts"; import { requireBotGuildPermissions } from "../../util/permissions.ts";