deps: segregate third-party deps to deps.ts file

This commit is contained in:
ayntee 2020-12-25 15:47:24 +04:00
parent 3695b81de6
commit 0a14264b0e
10 changed files with 16 additions and 10 deletions

7
deps.ts Normal file
View file

@ -0,0 +1,7 @@
export { EventEmitter } from "https://deno.land/std@0.82.0/node/events.ts";
export { unzlib } from "https://deno.land/x/denoflate@1.1/mod.ts";
export { fetchAuto } from "https://raw.githubusercontent.com/DjDeveloperr/fetch-base64/main/mod.ts";
export { parse } from "https://deno.land/x/mutil@0.1.2/mod.ts";
export { connect } from "https://deno.land/x/redis@v0.14.1/mod.ts";
export type { Redis, RedisConnectOptions } from "https://deno.land/x/redis@v0.14.1/mod.ts"
export { Manager, Player } from "https://raw.githubusercontent.com/Lavaclient/lavadeno/master/mod.ts";

1
mod.ts
View file

@ -1,5 +1,4 @@
export { GatewayIntents } from './src/types/gateway.ts'
export { default as EventEmitter } from 'https://deno.land/std@0.74.0/node/events.ts'
export { Base } from './src/structures/base.ts'
export { Gateway } from './src/gateway/index.ts'
export type { ClientEvents } from './src/gateway/handlers/index.ts'

View file

@ -1,4 +1,4 @@
import { unzlib } from 'https://deno.land/x/denoflate@1.1/mod.ts'
import { unzlib } from '../../deps.ts'
import { Client } from '../models/client.ts'
import {
DISCORD_GATEWAY_URL,
@ -18,7 +18,7 @@ import { GatewayCache } from '../managers/gatewayCache.ts'
import { delay } from '../utils/delay.ts'
import { VoiceChannel } from '../structures/guildVoiceChannel.ts'
import { Guild } from '../structures/guild.ts'
import EventEmitter from 'https://deno.land/std@0.74.0/node/events.ts'
import { EventEmitter } from '../../deps.ts'
export interface RequestMembersOptions {
limit?: number

View file

@ -6,7 +6,7 @@ import { EmojiPayload } from '../types/emoji.ts'
import { CHANNEL, GUILD_EMOJI, GUILD_EMOJIS } from '../types/endpoint.ts'
import { BaseChildManager } from './baseChild.ts'
import { EmojisManager } from './emojis.ts'
import { fetchAuto } from 'https://raw.githubusercontent.com/DjDeveloperr/fetch-base64/main/mod.ts'
import { fetchAuto } from '../../deps.ts'
export class GuildEmojisManager extends BaseChildManager<EmojiPayload, Emoji> {
guild: Guild

View file

@ -3,7 +3,7 @@ import {
connect,
Redis,
RedisConnectOptions
} from 'https://denopkg.com/keroxp/deno-redis/mod.ts'
} from '../../deps.ts'
/**
* ICacheAdapter is the interface to be implemented by Cache Adapters for them to be usable with Harmony.

View file

@ -2,7 +2,7 @@ import { User } from '../structures/user.ts'
import { GatewayIntents } from '../types/gateway.ts'
import { Gateway } from '../gateway/index.ts'
import { RESTManager } from './rest.ts'
import EventEmitter from 'https://deno.land/std@0.74.0/node/events.ts'
import { EventEmitter } from '../../deps.ts'
import { DefaultCacheAdapter, ICacheAdapter } from './cacheAdapter.ts'
import { UsersManager } from '../managers/users.ts'
import { GuildManager } from '../managers/guilds.ts'

View file

@ -5,7 +5,7 @@ import { User } from '../structures/user.ts'
import { Collection } from '../utils/collection.ts'
import { CommandClient } from './commandClient.ts'
import { Extension } from './extensions.ts'
import { parse } from 'https://deno.land/x/mutil@0.1.2/mod.ts'
import { parse } from '../../deps.ts'
export interface CommandContext {
/** The Client object */

View file

@ -1,6 +1,6 @@
import { Collection } from '../utils/collection.ts'
import { Client, ClientOptions } from './client.ts'
import EventEmitter from 'https://deno.land/std@0.74.0/node/events.ts'
import {EventEmitter} from '../../deps.ts'
import { RESTManager } from './rest.ts'
// import { GATEWAY_BOT } from '../types/endpoint.ts'
// import { GatewayBotPayload } from '../types/gatewayBot.ts'

View file

@ -11,7 +11,7 @@ import { Embed } from './embed.ts'
import { Message } from './message.ts'
import { TextChannel } from './textChannel.ts'
import { User } from './user.ts'
import { fetchAuto } from 'https://raw.githubusercontent.com/DjDeveloperr/fetch-base64/main/mod.ts'
import { fetchAuto } from '../../deps.ts'
import { WEBHOOK_MESSAGE } from '../types/endpoint.ts'
export interface WebhookMessageOptions extends MessageOption {

View file

@ -13,7 +13,7 @@ import { LL_IP, LL_PASS, LL_PORT, TOKEN } from './config.ts'
import {
Manager,
Player
} from 'https://raw.githubusercontent.com/Lavaclient/lavadeno/master/mod.ts'
} from '../../deps.ts'
import { Interaction } from '../structures/slash.ts'
import { slash } from '../models/client.ts'
// import { SlashCommandOptionType } from '../types/slash.ts'