chore: fix import and exports

This commit is contained in:
ayntee
2021-03-29 23:47:31 +04:00
parent 352a7b9f49
commit 79d57f0377
45 changed files with 67 additions and 134 deletions
-1
View File
@@ -1,7 +1,6 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { structures } from "../../structures/mod.ts";
import { DiscordGatewayPayload } from "../../types/gateway.ts";
export async function handleChannelCreate(data: DiscordGatewayPayload) {
const payload = data.d as DiscordChannel;
-1
View File
@@ -1,6 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { DiscordGatewayPayload } from "../../types/gateway.ts";
export async function handleChannelDelete(data: DiscordGatewayPayload) {
const payload = data.d as DiscordChannel;
@@ -1,9 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import {
DiscordChannelPinsUpdate,
DiscordGatewayPayload,
} from "../../types/gateway.ts";
export async function handleChannelPinsUpdate(data: DiscordGatewayPayload) {
const payload = data.d as DiscordChannelPinsUpdate;
-1
View File
@@ -1,7 +1,6 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { structures } from "../../structures/mod.ts";
import { DiscordGatewayPayload } from "../../types/gateway.ts";
export async function handleChannelUpdate(data: DiscordGatewayPayload) {
const payload = data.d as DiscordChannel;
@@ -1,8 +1,4 @@
import { eventHandlers } from "../../bot.ts";
import {
DiscordApplicationCommandCreateUpdateDelete,
DiscordGatewayPayload,
} from "../../types/gateway.ts";
export function handleApplicationCommandCreate(
data: DiscordGatewayPayload,
@@ -1,8 +1,4 @@
import { eventHandlers } from "../../bot.ts";
import {
DiscordApplicationCommandCreateUpdateDelete,
DiscordGatewayPayload,
} from "../../types/gateway.ts";
export function handleApplicationCommandDelete(data: DiscordGatewayPayload) {
const {
@@ -1,8 +1,4 @@
import { eventHandlers } from "../../bot.ts";
import {
DiscordApplicationCommandCreateUpdateDelete,
DiscordGatewayPayload,
} from "../../types/gateway.ts";
export function handleApplicationCommandUpdate(data: DiscordGatewayPayload) {
const {
@@ -1,9 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import {
DiscordGatewayPayload,
DiscordGuildEmojisUpdate,
} from "../../types/gateway.ts";
import { Collection } from "../../util/collection.ts";
export async function handleGuildEmojisUpdate(data: DiscordGatewayPayload) {
-4
View File
@@ -1,9 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import {
DiscordGatewayPayload,
DiscordGuildBanAddRemove,
} from "../../types/gateway.ts";
export async function handleGuildBanAdd(data: DiscordGatewayPayload) {
const payload = data.d as DiscordGuildBanAddRemove;
-4
View File
@@ -1,9 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import {
DiscordGatewayPayload,
DiscordGuildBanAddRemove,
} from "../../types/gateway.ts";
export async function handleGuildBanRemove(data: DiscordGatewayPayload) {
const payload = data.d as DiscordGuildBanAddRemove;
-1
View File
@@ -1,7 +1,6 @@
import { eventHandlers } from "../../bot.ts";
import { cache, cacheHandlers } from "../../cache.ts";
import { structures } from "../../structures/mod.ts";
import { DiscordGatewayPayload } from "../../types/gateway.ts";
import { basicShards } from "../../ws/shard.ts";
export async function handleGuildCreate(
-1
View File
@@ -1,6 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { DiscordGatewayPayload } from "../../types/gateway.ts";
import { basicShards } from "../../ws/shard.ts";
export async function handleGuildDelete(
@@ -1,9 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import {
DiscordGatewayPayload,
DiscordGuildIntegrationsUpdate,
} from "../../types/gateway.ts";
export async function handleGuildIntegrationsUpdate(
data: DiscordGatewayPayload,
-1
View File
@@ -1,6 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { DiscordGatewayPayload } from "../../types/gateway.ts";
export async function handleGuildUpdate(data: DiscordGatewayPayload) {
const payload = data.d as DiscordGuild;
@@ -1,5 +1,4 @@
import { eventHandlers } from "../../bot.ts";
import { DiscordGatewayPayload } from "../../types/gateway.ts";
export function handleIntegrationCreate(
data: DiscordGatewayPayload,
@@ -1,5 +1,4 @@
import { eventHandlers } from "../../bot.ts";
import { DiscordGatewayPayload } from "../../types/gateway.ts";
export function handleIntegrationDelete(data: DiscordGatewayPayload) {
const {
@@ -1,5 +1,4 @@
import { eventHandlers } from "../../bot.ts";
import { DiscordGatewayPayload } from "../../types/gateway.ts";
export function handleIntegrationUpdate(data: DiscordGatewayPayload) {
const {
@@ -1,7 +1,6 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { structures } from "../../structures/mod.ts";
import { DiscordGatewayPayload } from "../../types/gateway.ts";
export async function handleInteractionCreate(data: DiscordGatewayPayload) {
const payload = data.d as InteractionCommandPayload;
-4
View File
@@ -1,8 +1,4 @@
import { eventHandlers } from "../../bot.ts";
import {
DiscordGatewayPayload,
DiscordInviteCreate,
} from "../../types/gateway.ts";
export function handleInviteCreate(payload: DiscordGatewayPayload) {
// TODO: replace with tocamelcase
-4
View File
@@ -1,8 +1,4 @@
import { eventHandlers } from "../../bot.ts";
import {
DiscordGatewayPayload,
DiscordInviteDelete,
} from "../../types/gateway.ts";
export function handleInviteDelete(payload: DiscordGatewayPayload) {
const {
@@ -1,9 +1,5 @@
import { cache, cacheHandlers } from "../../cache.ts";
import { structures } from "../../structures/mod.ts";
import {
DiscordGatewayPayload,
DiscordGuildMembersChunk,
} from "../../types/gateway.ts";
import { Collection } from "../../util/collection.ts";
export async function handleGuildMembersChunk(data: DiscordGatewayPayload) {
-4
View File
@@ -1,10 +1,6 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { structures } from "../../structures/mod.ts";
import {
DiscordGatewayPayload,
DiscordGuildMemberAdd,
} from "../../types/gateway.ts";
export async function handleGuildMemberAdd(data: DiscordGatewayPayload) {
const payload = data.d as DiscordGuildMemberAdd;
@@ -1,9 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import {
DiscordGatewayPayload,
DiscordGuildMemberRemove,
} from "../../types/gateway.ts";
export async function handleGuildMemberRemove(data: DiscordGatewayPayload) {
const payload = data.d as DiscordGuildMemberRemove;
@@ -1,10 +1,6 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { structures } from "../../structures/mod.ts";
import {
DiscordGatewayPayload,
DiscordGuildMemberUpdate,
} from "../../types/gateway.ts";
export async function handleGuildMemberUpdate(data: DiscordGatewayPayload) {
const payload = data.d as DiscordGuildMemberUpdate;
-1
View File
@@ -1,7 +1,6 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { structures } from "../../structures/mod.ts";
import { DiscordGatewayPayload } from "../../types/gateway.ts";
export async function handleMessageCreate(data: DiscordGatewayPayload) {
const payload = data.d as DiscordMessage;
-4
View File
@@ -1,9 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import {
DiscordGatewayPayload,
DiscordMessageDelete,
} from "../../types/gateway.ts";
export async function handleMessageDelete(data: DiscordGatewayPayload) {
const payload = data.d as DiscordMessageDelete;
@@ -1,9 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import {
DiscordGatewayPayload,
DiscordMessageDeleteBulk,
} from "../../types/gateway.ts";
export async function handleMessageDeleteBulk(data: DiscordGatewayPayload) {
const payload = data.d as DiscordMessageDeleteBulk;
@@ -1,10 +1,6 @@
import { botId, eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { structures } from "../../structures/mod.ts";
import {
DiscordGatewayPayload,
DiscordMessageReactionAdd,
} from "../../types/gateway.ts";
export async function handleMessageReactionAdd(data: DiscordGatewayPayload) {
const payload = data.d as DiscordMessageReactionAdd;
@@ -1,10 +1,6 @@
import { botId, eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { structures } from "../../structures/mod.ts";
import {
DiscordGatewayPayload,
DiscordMessageReactionRemove,
} from "../../types/gateway.ts";
export async function handleMessageReactionRemove(
data: DiscordGatewayPayload,
@@ -1,9 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import {
DiscordGatewayPayload,
DiscordMessageReactionRemoveAll,
} from "../../types/gateway.ts";
export async function handleMessageReactionRemoveAll(
data: DiscordGatewayPayload,
@@ -1,9 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import {
DiscordGatewayPayload,
DiscordMessageReactionRemoveEmoji,
} from "../../types/gateway.ts";
export async function handleMessageReactionRemoveEmoji(
data: DiscordGatewayPayload,
-1
View File
@@ -1,7 +1,6 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { structures } from "../../structures/mod.ts";
import { DiscordGatewayPayload } from "../../types/gateway.ts";
export async function handleMessageUpdate(data: DiscordGatewayPayload) {
const payload = data.d as DiscordMessage;
-4
View File
@@ -1,9 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import {
DiscordGatewayPayload,
DiscordPresenceUpdate,
} from "../../types/gateway.ts";
export async function handlePresenceUpdate(data: DiscordGatewayPayload) {
const payload = data.d as DiscordPresenceUpdate;
-1
View File
@@ -7,7 +7,6 @@ import {
import { cache, cacheHandlers } from "../../cache.ts";
import { initialMemberLoadQueue } from "../../structures/guild.ts";
import { structures } from "../../structures/mod.ts";
import { DiscordGatewayPayload, DiscordReady } from "../../types/gateway.ts";
import { delay } from "../../util/utils.ts";
import { allowNextShard, basicShards } from "../../ws/mod.ts";
-4
View File
@@ -1,8 +1,4 @@
import { eventHandlers } from "../../bot.ts";
import {
DiscordGatewayPayload,
DiscordTypingStart,
} from "../../types/gateway.ts";
export function handleTypingStart(data: DiscordGatewayPayload) {
eventHandlers.typingStart?.(data.d as DiscordTypingStart);
-1
View File
@@ -1,6 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { DiscordGatewayPayload } from "../../types/gateway.ts";
export async function handleUserUpdate(data: DiscordGatewayPayload) {
const userData = data.d as DiscordUser;
-4
View File
@@ -1,10 +1,6 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { structures } from "../../structures/mod.ts";
import {
DiscordGatewayPayload,
DiscordGuildRoleCreateUpdate,
} from "../../types/gateway.ts";
export async function handleGuildRoleCreate(data: DiscordGatewayPayload) {
const payload = data.d as DiscordGuildRoleCreateUpdate;
-4
View File
@@ -1,9 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import {
DiscordGatewayPayload,
DiscordGuildRoleDelete,
} from "../../types/gateway.ts";
export async function handleGuildRoleDelete(data: DiscordGatewayPayload) {
const payload = data.d as DiscordGuildRoleDelete;
-4
View File
@@ -1,10 +1,6 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { structures } from "../../structures/mod.ts";
import {
DiscordGatewayPayload,
DiscordGuildRoleCreateUpdate,
} from "../../types/gateway.ts";
export async function handleGuildRoleUpdate(data: DiscordGatewayPayload) {
const payload = data.d as DiscordGuildRoleCreateUpdate;
@@ -1,6 +1,5 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { DiscordVoiceServerUpdate } from "../../types/gateway.ts";
export async function handleVoiceServerUpdate(data: DiscordPayload) {
const payload = data.d as DiscordVoiceServerUpdate;
-1
View File
@@ -1,7 +1,6 @@
import { eventHandlers } from "../../bot.ts";
import { cacheHandlers } from "../../cache.ts";
import { structures } from "../../structures/mod.ts";
import { DiscordGatewayPayload } from "../../types/gateway.ts";
export async function handleVoiceStateUpdate(data: DiscordGatewayPayload) {
const payload = data.d as DiscordVoiceState;
-4
View File
@@ -1,8 +1,4 @@
import { eventHandlers } from "../../bot.ts";
import {
DiscordGatewayPayload,
DiscordWebhooksUpdate,
} from "../../types/gateway.ts";
export function handleWebhooksUpdate(data: DiscordGatewayPayload) {
const options = data.d as DiscordWebhooksUpdate;