diff --git a/docs/content/djs.md b/docs/content/djs.md index 593d00b55..afc0465a9 100644 --- a/docs/content/djs.md +++ b/docs/content/djs.md @@ -110,9 +110,9 @@ import Client, { import { configs } from "./configs.ts"; import { Intents } from "https://x.nest.land/Discordeno@9.0.1/src/types/options.ts"; import { eventHandlers } from "./src/events/eventHandlers.ts"; -import type { Message } from "https://x.nest.land/Discordeno@9.0.1/src/structures/message.ts"; -import type { Command } from "./src/types/commands.ts"; -import type { Guild } from "https://x.nest.land/Discordeno@9.0.1/src/structures/guild.ts"; +import { Message } from "https://x.nest.land/Discordeno@9.0.1/src/structures/message.ts"; +import { Command } from "./src/types/commands.ts"; +import { Guild } from "https://x.nest.land/Discordeno@9.0.1/src/structures/guild.ts"; export const botCache = { commands: new Map(), @@ -346,7 +346,7 @@ module.exports = class kickCommand extends Command { Discordeno Version ```ts import { sendMessage } from "https://x.nest.land/Discordeno@9.0.1/src/handlers/channel.ts"; -import type { Member } from "https://x.nest.land/Discordeno@9.0.1/src/structures/member.ts"; +import { Member } from "https://x.nest.land/Discordeno@9.0.1/src/structures/member.ts"; import { kick } from "https://x.nest.land/Discordeno@9.0.1/src/handlers/member.ts"; import { deleteMessage } from "https://x.nest.land/Discordeno@9.0.1/src/handlers/message.ts"; import { botCache } from "../../mod.ts"; diff --git a/src/controllers/bans.ts b/src/controllers/bans.ts index dbd4cf10c..fca5c7f6f 100644 --- a/src/controllers/bans.ts +++ b/src/controllers/bans.ts @@ -1,6 +1,6 @@ import { eventHandlers } from "../module/client.ts"; -import type { DiscordPayload } from "../types/discord.ts"; -import type { GuildBanPayload } from "../types/guild.ts"; +import { DiscordPayload } from "../types/discord.ts"; +import { GuildBanPayload } from "../types/guild.ts"; import { cacheHandlers } from "./cache.ts"; export async function handleInternalGuildBanAdd(data: DiscordPayload) { diff --git a/src/controllers/cache.ts b/src/controllers/cache.ts index 676d45534..55829c14a 100644 --- a/src/controllers/cache.ts +++ b/src/controllers/cache.ts @@ -1,9 +1,9 @@ -import type { Channel } from "../structures/channel.ts"; -import type { Guild } from "../structures/guild.ts"; -import type { Message } from "../structures/message.ts"; -import type { PresenceUpdatePayload } from "../types/discord.ts"; +import { Channel } from "../structures/channel.ts"; +import { Guild } from "../structures/guild.ts"; +import { Message } from "../structures/message.ts"; +import { PresenceUpdatePayload } from "../types/discord.ts"; import { cache } from "../utils/cache.ts"; -import type { Collection } from "../utils/collection.ts"; +import { Collection } from "../utils/collection.ts"; export type TableName = | "guilds" diff --git a/src/controllers/channels.ts b/src/controllers/channels.ts index 36d78c576..1812e6c20 100644 --- a/src/controllers/channels.ts +++ b/src/controllers/channels.ts @@ -1,8 +1,7 @@ import { eventHandlers } from "../module/client.ts"; import { structures } from "../structures/mod.ts"; -import type { ChannelCreatePayload } from "../types/channel.ts"; -import { ChannelTypes } from "../types/channel.ts"; -import type { DiscordPayload } from "../types/discord.ts"; +import { ChannelCreatePayload, ChannelTypes } from "../types/channel.ts"; +import { DiscordPayload } from "../types/discord.ts"; import { cacheHandlers } from "./cache.ts"; export async function handleInternalChannelCreate(data: DiscordPayload) { diff --git a/src/controllers/guilds.ts b/src/controllers/guilds.ts index ef4d4c271..61a2777c6 100644 --- a/src/controllers/guilds.ts +++ b/src/controllers/guilds.ts @@ -1,13 +1,13 @@ import { eventHandlers } from "../module/client.ts"; import { structures } from "../structures/mod.ts"; -import type { DiscordPayload } from "../types/discord.ts"; -import type { +import { DiscordPayload } from "../types/discord.ts"; +import { CreateGuildPayload, GuildDeletePayload, GuildEmojisUpdatePayload, UpdateGuildPayload, } from "../types/guild.ts"; -import type { GuildUpdateChange } from "../types/options.ts"; +import { GuildUpdateChange } from "../types/options.ts"; import { cache } from "../utils/cache.ts"; import { cacheHandlers } from "./cache.ts"; diff --git a/src/controllers/members.ts b/src/controllers/members.ts index 0083f158f..f1101525b 100644 --- a/src/controllers/members.ts +++ b/src/controllers/members.ts @@ -1,7 +1,7 @@ import { eventHandlers } from "../module/client.ts"; import { structures } from "../structures/mod.ts"; -import type { DiscordPayload } from "../types/discord.ts"; -import type { +import { DiscordPayload } from "../types/discord.ts"; +import { GuildBanPayload, GuildMemberAddPayload, GuildMemberChunkPayload, diff --git a/src/controllers/messages.ts b/src/controllers/messages.ts index a0e72dfdc..3f4298858 100644 --- a/src/controllers/messages.ts +++ b/src/controllers/messages.ts @@ -1,7 +1,7 @@ import { eventHandlers } from "../module/client.ts"; import { structures } from "../structures/mod.ts"; -import type { DiscordPayload } from "../types/discord.ts"; -import type { +import { DiscordPayload } from "../types/discord.ts"; +import { MessageCreateOptions, MessageDeleteBulkPayload, MessageDeletePayload, diff --git a/src/controllers/misc.ts b/src/controllers/misc.ts index 3cd7bc813..54f60991d 100644 --- a/src/controllers/misc.ts +++ b/src/controllers/misc.ts @@ -2,7 +2,7 @@ import { delay } from "../../deps.ts"; import { eventHandlers, setBotID } from "../module/client.ts"; import { allowNextShard } from "../module/shardingManager.ts"; import { structures } from "../structures/mod.ts"; -import type { +import { DiscordPayload, PresenceUpdatePayload, ReadyPayload, @@ -10,7 +10,7 @@ import type { VoiceStateUpdatePayload, WebhookUpdatePayload, } from "../types/discord.ts"; -import type { UserPayload } from "../types/guild.ts"; +import { UserPayload } from "../types/guild.ts"; import { cache } from "../utils/cache.ts"; import { cacheHandlers } from "./cache.ts"; diff --git a/src/controllers/reactions.ts b/src/controllers/reactions.ts index 670a7126d..3e867a9b8 100644 --- a/src/controllers/reactions.ts +++ b/src/controllers/reactions.ts @@ -1,7 +1,7 @@ import { botID, eventHandlers } from "../module/client.ts"; import { structures } from "../structures/mod.ts"; -import type { DiscordPayload } from "../types/discord.ts"; -import type { +import { DiscordPayload } from "../types/discord.ts"; +import { BaseMessageReactionPayload, MessageReactionPayload, MessageReactionRemoveEmojiPayload, diff --git a/src/controllers/roles.ts b/src/controllers/roles.ts index 62cf72eb1..fe6718798 100644 --- a/src/controllers/roles.ts +++ b/src/controllers/roles.ts @@ -1,10 +1,7 @@ import { eventHandlers } from "../module/client.ts"; import { structures } from "../structures/mod.ts"; -import type { DiscordPayload } from "../types/discord.ts"; -import type { - GuildRoleDeletePayload, - GuildRolePayload, -} from "../types/guild.ts"; +import { DiscordPayload } from "../types/discord.ts"; +import { GuildRoleDeletePayload, GuildRolePayload } from "../types/guild.ts"; import { cacheHandlers } from "./cache.ts"; export async function handleInternalGuildRoleCreate(data: DiscordPayload) { diff --git a/src/handlers/channel.ts b/src/handlers/channel.ts index 0e2580996..fa5d7b6dc 100644 --- a/src/handlers/channel.ts +++ b/src/handlers/channel.ts @@ -14,8 +14,8 @@ import { MessageContent, } from "../types/channel.ts"; import { Errors } from "../types/errors.ts"; -import type { RawOverwrite } from "../types/guild.ts"; -import type { MessageCreateOptions } from "../types/message.ts"; +import { RawOverwrite } from "../types/guild.ts"; +import { MessageCreateOptions } from "../types/message.ts"; import { Permissions } from "../types/permission.ts"; import { botHasChannelPermissions } from "../utils/permissions.ts"; diff --git a/src/handlers/guild.ts b/src/handlers/guild.ts index b045affe6..385b2c017 100644 --- a/src/handlers/guild.ts +++ b/src/handlers/guild.ts @@ -3,13 +3,13 @@ import { cacheHandlers } from "../controllers/cache.ts"; import { identifyPayload } from "../module/client.ts"; import { RequestManager } from "../module/requestManager.ts"; import { requestAllMembers } from "../module/shardingManager.ts"; -import type { Guild } from "../structures/guild.ts"; -import type { Member } from "../structures/member.ts"; +import { Guild } from "../structures/guild.ts"; +import { Member } from "../structures/member.ts"; import { structures } from "../structures/mod.ts"; -import type { ImageFormats, ImageSize } from "../types/cdn.ts"; +import { ImageFormats, ImageSize } from "../types/cdn.ts"; import { ChannelCreatePayload, ChannelTypes } from "../types/channel.ts"; import { Errors } from "../types/errors.ts"; -import type { +import { BannedUser, BanOptions, ChannelCreateOptions, @@ -26,10 +26,10 @@ import type { PrunePayload, UserPayload, } from "../types/guild.ts"; -import type { MemberCreatePayload } from "../types/member.ts"; +import { MemberCreatePayload } from "../types/member.ts"; import { Intents } from "../types/options.ts"; import { Permissions } from "../types/permission.ts"; -import type { RoleData } from "../types/role.ts"; +import { RoleData } from "../types/role.ts"; import { formatImageURL } from "../utils/cdn.ts"; import { Collection } from "../utils/collection.ts"; import { botHasPermission, calculateBits } from "../utils/permissions.ts"; diff --git a/src/handlers/member.ts b/src/handlers/member.ts index 9d31cf4af..8b0faf83e 100644 --- a/src/handlers/member.ts +++ b/src/handlers/member.ts @@ -2,15 +2,12 @@ import { endpoints } from "../constants/discord.ts"; import { cacheHandlers } from "../controllers/cache.ts"; import { botID } from "../module/client.ts"; import { RequestManager } from "../module/requestManager.ts"; -import type { Member } from "../structures/member.ts"; +import { Member } from "../structures/member.ts"; import { structures } from "../structures/mod.ts"; -import type { ImageFormats, ImageSize } from "../types/cdn.ts"; -import type { - DMChannelCreatePayload, - MessageContent, -} from "../types/channel.ts"; +import { ImageFormats, ImageSize } from "../types/cdn.ts"; +import { DMChannelCreatePayload, MessageContent } from "../types/channel.ts"; import { Errors } from "../types/errors.ts"; -import type { EditMemberOptions } from "../types/member.ts"; +import { EditMemberOptions } from "../types/member.ts"; import { Permissions } from "../types/permission.ts"; import { formatImageURL } from "../utils/cdn.ts"; import { diff --git a/src/handlers/message.ts b/src/handlers/message.ts index 3b99c5b32..243404125 100644 --- a/src/handlers/message.ts +++ b/src/handlers/message.ts @@ -3,12 +3,12 @@ import { endpoints } from "../constants/discord.ts"; import { cacheHandlers } from "../controllers/cache.ts"; import { botID } from "../module/client.ts"; import { RequestManager } from "../module/requestManager.ts"; -import type { Message } from "../structures/message.ts"; +import { Message } from "../structures/message.ts"; import { structures } from "../structures/mod.ts"; -import type { MessageContent } from "../types/channel.ts"; +import { MessageContent } from "../types/channel.ts"; import { Errors } from "../types/errors.ts"; -import type { UserPayload } from "../types/guild.ts"; -import type { MessageCreateOptions } from "../types/message.ts"; +import { UserPayload } from "../types/guild.ts"; +import { MessageCreateOptions } from "../types/message.ts"; import { Permissions } from "../types/permission.ts"; import { botHasChannelPermissions } from "../utils/permissions.ts"; diff --git a/src/handlers/webhook.ts b/src/handlers/webhook.ts index e4b37509a..7bb9400b3 100644 --- a/src/handlers/webhook.ts +++ b/src/handlers/webhook.ts @@ -2,9 +2,9 @@ import { endpoints } from "../constants/discord.ts"; import { RequestManager } from "../module/requestManager.ts"; import { structures } from "../structures/mod.ts"; import { Errors } from "../types/errors.ts"; -import type { MessageCreateOptions } from "../types/message.ts"; +import { MessageCreateOptions } from "../types/message.ts"; import { Permissions } from "../types/permission.ts"; -import type { +import { ExecuteWebhookOptions, WebhookCreateOptions, WebhookPayload, diff --git a/src/module/basicShard.ts b/src/module/basicShard.ts index 68b9196ff..ee1a9cc04 100644 --- a/src/module/basicShard.ts +++ b/src/module/basicShard.ts @@ -7,16 +7,15 @@ import { isWebSocketPongEvent, WebSocket, } from "../../deps.ts"; -import type { +import { DiscordBotGatewayData, DiscordHeartbeatPayload, + GatewayOpcode, ReadyPayload, } from "../types/discord.ts"; -import { GatewayOpcode } from "../types/discord.ts"; -import type { FetchMembersOptions } from "../types/guild.ts"; -import type { BotStatusRequest } from "../utils/utils.ts"; -import type { IdentifyPayload } from "./client.ts"; -import { botGatewayData, eventHandlers } from "./client.ts"; +import { FetchMembersOptions } from "../types/guild.ts"; +import { BotStatusRequest } from "../utils/utils.ts"; +import { botGatewayData, eventHandlers, IdentifyPayload } from "./client.ts"; import { handleDiscordPayload } from "./shardingManager.ts"; const basicShards = new Map(); diff --git a/src/module/client.ts b/src/module/client.ts index 53dbcf843..01f311460 100644 --- a/src/module/client.ts +++ b/src/module/client.ts @@ -1,6 +1,6 @@ import { endpoints } from "../constants/discord.ts"; -import type { DiscordBotGatewayData } from "../types/discord.ts"; -import type { ClientOptions, EventHandlers } from "../types/options.ts"; +import { DiscordBotGatewayData } from "../types/discord.ts"; +import { ClientOptions, EventHandlers } from "../types/options.ts"; import { RequestManager } from "./requestManager.ts"; import { spawnShards } from "./shardingManager.ts"; diff --git a/src/module/requestManager.ts b/src/module/requestManager.ts index c74abe25c..dbbdabd15 100644 --- a/src/module/requestManager.ts +++ b/src/module/requestManager.ts @@ -2,7 +2,7 @@ import { delay } from "../../deps.ts"; import { baseEndpoints } from "../constants/discord.ts"; import { HttpResponseCode } from "../types/discord.ts"; import { Errors } from "../types/errors.ts"; -import type { RequestMethods } from "../types/fetch.ts"; +import { RequestMethods } from "../types/fetch.ts"; import { authorization, eventHandlers } from "./client.ts"; const pathQueues: { [key: string]: QueuedRequest[] } = {}; diff --git a/src/module/shard.ts b/src/module/shard.ts index c2e864487..8e7353127 100644 --- a/src/module/shard.ts +++ b/src/module/shard.ts @@ -1,13 +1,17 @@ -import type { WebSocket } from "../../deps.ts"; -import { connectWebSocket, delay, isWebSocketCloseEvent } from "../../deps.ts"; -import type { +import { + connectWebSocket, + delay, + isWebSocketCloseEvent, + WebSocket, +} from "../../deps.ts"; +import { DiscordBotGatewayData, DiscordHeartbeatPayload, + GatewayOpcode, ReadyPayload, } from "../types/discord.ts"; -import { GatewayOpcode } from "../types/discord.ts"; -import type { FetchMembersOptions } from "../types/guild.ts"; -import type { DebugArg } from "../types/options.ts"; +import { FetchMembersOptions } from "../types/guild.ts"; +import { DebugArg } from "../types/options.ts"; let shardSocket: WebSocket; diff --git a/src/module/shardingManager.ts b/src/module/shardingManager.ts index 4b1cb2d31..e95ed6c0d 100644 --- a/src/module/shardingManager.ts +++ b/src/module/shardingManager.ts @@ -1,21 +1,25 @@ import { delay } from "../../deps.ts"; import { controllers } from "../controllers/mod.ts"; -import type { Guild } from "../structures/guild.ts"; -import type { +import { Guild } from "../structures/guild.ts"; +import { DiscordBotGatewayData, DiscordPayload, + GatewayOpcode, } from "../types/discord.ts"; -import { GatewayOpcode } from "../types/discord.ts"; -import type { FetchMembersOptions } from "../types/guild.ts"; +import { FetchMembersOptions } from "../types/guild.ts"; import { cache } from "../utils/cache.ts"; -import type { BotStatusRequest } from "../utils/utils.ts"; +import { BotStatusRequest } from "../utils/utils.ts"; import { botGatewayStatusRequest, createBasicShard, requestGuildMembers, } from "./basicShard.ts"; -import type { IdentifyPayload } from "./client.ts"; -import { botGatewayData, eventHandlers, identifyPayload } from "./client.ts"; +import { + botGatewayData, + eventHandlers, + IdentifyPayload, + identifyPayload, +} from "./client.ts"; let shardCounter = 0; let basicSharding = false; diff --git a/src/structures/channel.ts b/src/structures/channel.ts index 00e28eaff..acc29ebb4 100644 --- a/src/structures/channel.ts +++ b/src/structures/channel.ts @@ -1,6 +1,6 @@ import { cacheHandlers } from "../controllers/cache.ts"; -import type { ChannelCreatePayload } from "../types/channel.ts"; -import type { Unpromise } from "../types/misc.ts"; +import { ChannelCreatePayload } from "../types/channel.ts"; +import { Unpromise } from "../types/misc.ts"; import { calculatePermissions } from "../utils/permissions.ts"; export async function createChannel( diff --git a/src/structures/guild.ts b/src/structures/guild.ts index 70f391c7f..3cde3638f 100644 --- a/src/structures/guild.ts +++ b/src/structures/guild.ts @@ -1,7 +1,7 @@ -import type { CreateGuildPayload } from "../types/guild.ts"; -import type { Unpromise } from "../types/misc.ts"; +import { CreateGuildPayload } from "../types/guild.ts"; +import { Unpromise } from "../types/misc.ts"; import { Collection } from "../utils/collection.ts"; -import type { Member } from "./member.ts"; +import { Member } from "./member.ts"; import { structures } from "./mod.ts"; export async function createGuild(data: CreateGuildPayload, shardID: number) { diff --git a/src/structures/member.ts b/src/structures/member.ts index a62391876..97e91e832 100644 --- a/src/structures/member.ts +++ b/src/structures/member.ts @@ -1,5 +1,5 @@ -import type { MemberCreatePayload } from "../types/member.ts"; -import type { Unpromise } from "../types/misc.ts"; +import { MemberCreatePayload } from "../types/member.ts"; +import { Unpromise } from "../types/misc.ts"; export async function createMember(data: MemberCreatePayload, guildID: string) { const { diff --git a/src/structures/message.ts b/src/structures/message.ts index bd41e48ed..3c2fab5e5 100644 --- a/src/structures/message.ts +++ b/src/structures/message.ts @@ -1,5 +1,5 @@ -import type { MessageCreateOptions } from "../types/message.ts"; -import type { Unpromise } from "../types/misc.ts"; +import { MessageCreateOptions } from "../types/message.ts"; +import { Unpromise } from "../types/misc.ts"; export async function createMessage(data: MessageCreateOptions) { const { diff --git a/src/structures/role.ts b/src/structures/role.ts index 6aaba4e5a..8f8f87e3d 100644 --- a/src/structures/role.ts +++ b/src/structures/role.ts @@ -1,5 +1,5 @@ -import type { Unpromise } from "../types/misc.ts"; -import type { RoleData } from "../types/role.ts"; +import { Unpromise } from "../types/misc.ts"; +import { RoleData } from "../types/role.ts"; export async function createRole(data: RoleData) { return { diff --git a/src/types/channel.ts b/src/types/channel.ts index f4892bad2..d81d8c810 100644 --- a/src/types/channel.ts +++ b/src/types/channel.ts @@ -1,5 +1,5 @@ -import type { Overwrite, RawOverwrite } from "./guild.ts"; -import type { Embed } from "./message.ts"; +import { Overwrite, RawOverwrite } from "./guild.ts"; +import { Embed } from "./message.ts"; export interface ChannelEditOptions { /** 2-100 character channel name. All */ diff --git a/src/types/discord.ts b/src/types/discord.ts index 58e08b343..d750d9e24 100644 --- a/src/types/discord.ts +++ b/src/types/discord.ts @@ -1,7 +1,7 @@ -import type { PartialUser, UserPayload } from "./guild.ts"; -import type { MemberCreatePayload } from "./member.ts"; -import type { Activity } from "./message.ts"; -import type { ClientStatusPayload } from "./presence.ts"; +import { PartialUser, UserPayload } from "./guild.ts"; +import { MemberCreatePayload } from "./member.ts"; +import { Activity } from "./message.ts"; +import { ClientStatusPayload } from "./presence.ts"; export interface DiscordPayload { /** OP code for the payload */ diff --git a/src/types/guild.ts b/src/types/guild.ts index 8e35d70d2..7bcd4991e 100644 --- a/src/types/guild.ts +++ b/src/types/guild.ts @@ -1,10 +1,10 @@ -import type { ChannelCreatePayload, ChannelTypes } from "./channel.ts"; -import type { Emoji, StatusType } from "./discord.ts"; -import type { MemberCreatePayload } from "./member.ts"; -import type { Activity } from "./message.ts"; -import type { Permission } from "./permission.ts"; -import type { ClientStatusPayload } from "./presence.ts"; -import type { RoleData } from "./role.ts"; +import { ChannelCreatePayload, ChannelTypes } from "./channel.ts"; +import { Emoji, StatusType } from "./discord.ts"; +import { MemberCreatePayload } from "./member.ts"; +import { Activity } from "./message.ts"; +import { Permission } from "./permission.ts"; +import { ClientStatusPayload } from "./presence.ts"; +import { RoleData } from "./role.ts"; export interface GuildRolePayload { /** The id of the guild */ diff --git a/src/types/member.ts b/src/types/member.ts index a68f7c887..199e0fef5 100644 --- a/src/types/member.ts +++ b/src/types/member.ts @@ -1,4 +1,4 @@ -import type { UserPayload } from "./guild.ts"; +import { UserPayload } from "./guild.ts"; export interface EditMemberOptions { /** Value to set users nickname to. Requires MANAGE_NICKNAMES permission. */ diff --git a/src/types/message.ts b/src/types/message.ts index 8bb2fdd18..1e631d3cc 100644 --- a/src/types/message.ts +++ b/src/types/message.ts @@ -1,7 +1,7 @@ -import type { Channel } from "../structures/channel.ts"; -import type { ChannelType } from "./channel.ts"; -import type { UserPayload } from "./guild.ts"; -import type { MemberCreatePayload } from "./member.ts"; +import { Channel } from "../structures/channel.ts"; +import { ChannelType } from "./channel.ts"; +import { UserPayload } from "./guild.ts"; +import { MemberCreatePayload } from "./member.ts"; export interface MentionedUser extends UserPayload { member: MemberCreatePayload; diff --git a/src/types/options.ts b/src/types/options.ts index 641432ada..f3c66fc01 100644 --- a/src/types/options.ts +++ b/src/types/options.ts @@ -1,9 +1,9 @@ -import type { Channel } from "../structures/channel.ts"; -import type { Guild } from "../structures/guild.ts"; -import type { Member } from "../structures/member.ts"; -import type { Message } from "../structures/message.ts"; -import type { Role } from "../structures/role.ts"; -import type { +import { Channel } from "../structures/channel.ts"; +import { Guild } from "../structures/guild.ts"; +import { Member } from "../structures/member.ts"; +import { Message } from "../structures/message.ts"; +import { Role } from "../structures/role.ts"; +import { DiscordPayload, Emoji, PresenceUpdatePayload, @@ -11,8 +11,8 @@ import type { TypingStartPayload, VoiceStateUpdatePayload, } from "./discord.ts"; -import type { UserPayload } from "./guild.ts"; -import type { +import { UserPayload } from "./guild.ts"; +import { Attachment, BaseMessageReactionPayload, Embed, diff --git a/src/types/presence.ts b/src/types/presence.ts index 1efc05220..e2ebd6f73 100644 --- a/src/types/presence.ts +++ b/src/types/presence.ts @@ -1,4 +1,4 @@ -import type { StatusType } from "./discord.ts"; +import { StatusType } from "./discord.ts"; export interface ClientStatusPayload { /** The user's status set for an active desktop (Windows, Linux, Mac) application session */ diff --git a/src/types/webhook.ts b/src/types/webhook.ts index 81adb0c13..8974e6575 100644 --- a/src/types/webhook.ts +++ b/src/types/webhook.ts @@ -1,5 +1,5 @@ -import type { UserPayload } from "./guild.ts"; -import type { Embed } from "./message.ts"; +import { UserPayload } from "./guild.ts"; +import { Embed } from "./message.ts"; export interface WebhookPayload { /** The id of the webhook */ diff --git a/src/utils/cache.ts b/src/utils/cache.ts index aec07ede7..dbd89b898 100644 --- a/src/utils/cache.ts +++ b/src/utils/cache.ts @@ -1,7 +1,7 @@ -import type { Channel } from "../structures/channel.ts"; -import type { Guild } from "../structures/guild.ts"; -import type { Message } from "../structures/message.ts"; -import type { PresenceUpdatePayload } from "../types/discord.ts"; +import { Channel } from "../structures/channel.ts"; +import { Guild } from "../structures/guild.ts"; +import { Message } from "../structures/message.ts"; +import { PresenceUpdatePayload } from "../types/discord.ts"; import { Collection } from "./collection.ts"; export interface CacheData { diff --git a/src/utils/cdn.ts b/src/utils/cdn.ts index b4748e219..6c5275ac5 100644 --- a/src/utils/cdn.ts +++ b/src/utils/cdn.ts @@ -1,4 +1,4 @@ -import type { ImageFormats, ImageSize } from "../types/cdn.ts"; +import { ImageFormats, ImageSize } from "../types/cdn.ts"; export const formatImageURL = ( url: string, diff --git a/src/utils/permissions.ts b/src/utils/permissions.ts index db572b199..0c4583a34 100644 --- a/src/utils/permissions.ts +++ b/src/utils/permissions.ts @@ -1,10 +1,9 @@ import { cacheHandlers } from "../controllers/cache.ts"; import { botID } from "../module/client.ts"; -import type { Guild } from "../structures/guild.ts"; -import type { Role } from "../structures/role.ts"; -import type { RawOverwrite } from "../types/guild.ts"; -import type { Permission } from "../types/permission.ts"; -import { Permissions } from "../types/permission.ts"; +import { Guild } from "../structures/guild.ts"; +import { Role } from "../structures/role.ts"; +import { RawOverwrite } from "../types/guild.ts"; +import { Permission, Permissions } from "../types/permission.ts"; /** Checks if the member has this permission. If the member is an owner or has admin perms it will always be true. */ export async function memberIDHasPermission( diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 78591d522..c73a6033f 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -1,7 +1,7 @@ import { encode } from "../../deps.ts"; import { sendGatewayCommand } from "../module/shardingManager.ts"; import { ActivityType } from "../types/activity.ts"; -import type { StatusType } from "../types/discord.ts"; +import { StatusType } from "../types/discord.ts"; export const sleep = (timeout: number) => { return new Promise((resolve) => setTimeout(resolve, timeout));