mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 08:50:07 +00:00
Merge pull request #154 from Skillz4Killz/remove-import-type-syntax
Replace all occurrences of "import type" syntax to "import" syntax
This commit is contained in:
@@ -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<string, Command>(),
|
||||
@@ -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";
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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<number, BasicShard>();
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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[] } = {};
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ImageFormats, ImageSize } from "../types/cdn.ts";
|
||||
import { ImageFormats, ImageSize } from "../types/cdn.ts";
|
||||
|
||||
export const formatImageURL = (
|
||||
url: string,
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user