mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 03:18:17 +00:00
Merge pull request #742 from discordeno/fix-errors-imports
fix: bunch of imports that were missing
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { DiscordChannel, DiscordGatewayPayload } from "../../types/mod.ts";
|
||||
import { DiscordChannel } from "../../types/channels/channel.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export async function handleChannelCreate(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordChannel;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import {
|
||||
DiscordChannel,
|
||||
DiscordChannelTypes,
|
||||
DiscordGatewayPayload,
|
||||
} from "../../types/mod.ts";
|
||||
import { DiscordChannel } from "../../types/channels/channel.ts";
|
||||
import { DiscordChannelTypes } from "../../types/channels/channel_types.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export async function handleChannelDelete(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordChannel;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import {
|
||||
DiscordChannelPinsUpdate,
|
||||
DiscordGatewayPayload,
|
||||
} from "../../types/mod.ts";
|
||||
import { DiscordChannelPinsUpdate } from "../../types/channels/channel_pins_update.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export async function handleChannelPinsUpdate(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordChannelPinsUpdate;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { DiscordChannel, DiscordGatewayPayload } from "../../types/mod.ts";
|
||||
import { DiscordChannel } from "../../types/channels/channel.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export async function handleChannelUpdate(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordChannel;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export function handleApplicationCommandCreate(
|
||||
data: DiscordGatewayPayload,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export function handleApplicationCommandDelete(data: DiscordGatewayPayload) {
|
||||
const {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export function handleApplicationCommandUpdate(data: DiscordGatewayPayload) {
|
||||
const {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import {
|
||||
DiscordGatewayPayload,
|
||||
DiscordGuildEmojisUpdate,
|
||||
} from "../../types/mod.ts";
|
||||
import { Collection } from "../../util/collection.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordGuildEmojisUpdate } from "../../types/emojis/guild_emojis_update.ts";
|
||||
|
||||
export async function handleGuildEmojisUpdate(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordGuildEmojisUpdate;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export async function handleGuildBanAdd(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordGuildBanAddRemove;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export async function handleGuildBanRemove(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordGuildBanAddRemove;
|
||||
|
||||
@@ -2,6 +2,8 @@ import { eventHandlers } from "../../bot.ts";
|
||||
import { cache, cacheHandlers } from "../../cache.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { basicShards } from "../../ws/shard.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordGuild } from "../../types/guilds/guild.ts";
|
||||
|
||||
export async function handleGuildCreate(
|
||||
data: DiscordGatewayPayload,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { basicShards } from "../../ws/shard.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordUnavailableGuild } from "../../types/guilds/unavailable_guild.ts";
|
||||
|
||||
export async function handleGuildDelete(
|
||||
data: DiscordGatewayPayload,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordGuildIntegrationsUpdate } from "../../types/guilds/guild_integrations_update.ts";
|
||||
|
||||
export async function handleGuildIntegrationsUpdate(
|
||||
data: DiscordGatewayPayload,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordGuild } from "../../types/guilds/guild.ts";
|
||||
|
||||
export async function handleGuildUpdate(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordGuild;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export function handleIntegrationCreate(
|
||||
data: DiscordGatewayPayload,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export function handleIntegrationDelete(data: DiscordGatewayPayload) {
|
||||
const {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export function handleIntegrationUpdate(data: DiscordGatewayPayload) {
|
||||
const {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export async function handleInteractionCreate(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as InteractionCommandPayload;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordInviteCreate } from "../../types/invites/invite_create.ts";
|
||||
|
||||
export function handleInviteCreate(payload: DiscordGatewayPayload) {
|
||||
// TODO: replace with tocamelcase
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { DiscordInviteDelete } from "../../types/invites/invite_delete.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export function handleInviteDelete(payload: DiscordGatewayPayload) {
|
||||
const {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { cache, cacheHandlers } from "../../cache.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { Collection } from "../../util/collection.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordGuildMembersChunk } from "../../types/members/guild_members_chunk.ts";
|
||||
|
||||
export async function handleGuildMembersChunk(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordGuildMembersChunk;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordGuildMemberAdd } from "../../types/members/guild_member_add.ts";
|
||||
|
||||
export async function handleGuildMemberAdd(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordGuildMemberAdd;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordGuildMemberRemove } from "../../types/members/guild_member_remove.ts";
|
||||
|
||||
export async function handleGuildMemberRemove(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordGuildMemberRemove;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordGuildMemberUpdate } from "../../types/members/guild_member_update.ts";
|
||||
|
||||
export async function handleGuildMemberUpdate(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordGuildMemberUpdate;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordMessage } from "../../types/messages/message.ts";
|
||||
|
||||
export async function handleMessageCreate(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordMessage;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordMessageDelete } from "../../types/messages/message_delete.ts";
|
||||
|
||||
export async function handleMessageDelete(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordMessageDelete;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordMessageDeleteBulk } from "../../types/messages/message_delete_bulk.ts";
|
||||
|
||||
export async function handleMessageDeleteBulk(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordMessageDeleteBulk;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { botId, eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordMessageReactionAdd } from "../../types/messages/message_reaction_add.ts";
|
||||
|
||||
export async function handleMessageReactionAdd(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordMessageReactionAdd;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { botId, eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordMessageReactionRemove } from "../../types/messages/message_reaction_remove.ts";
|
||||
|
||||
export async function handleMessageReactionRemove(
|
||||
data: DiscordGatewayPayload,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordMessageReactionRemoveAll } from "../../types/messages/message_reaction_remove_all.ts";
|
||||
|
||||
export async function handleMessageReactionRemoveAll(
|
||||
data: DiscordGatewayPayload,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordMessageReactionRemoveEmoji } from "../../types/messages/message_reaction_remove_emoji.ts";
|
||||
|
||||
export async function handleMessageReactionRemoveEmoji(
|
||||
data: DiscordGatewayPayload,
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordMessage } from "../../types/messages/message.ts";
|
||||
|
||||
export async function handleMessageUpdate(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordMessage;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordPresenceUpdate } from "../../types/misc/presence_update.ts";
|
||||
|
||||
export async function handlePresenceUpdate(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordPresenceUpdate;
|
||||
|
||||
@@ -9,6 +9,8 @@ import { initialMemberLoadQueue } from "../../structures/guild.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { delay } from "../../util/utils.ts";
|
||||
import { allowNextShard, basicShards } from "../../ws/mod.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordReady } from "../../types/gateway/ready.ts";
|
||||
|
||||
export async function handleReady(
|
||||
data: DiscordGatewayPayload,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordTypingStart } from "../../types/misc/typing_start.ts";
|
||||
|
||||
export function handleTypingStart(data: DiscordGatewayPayload) {
|
||||
eventHandlers.typingStart?.(data.d as DiscordTypingStart);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordUser } from "../../types/users/user.ts";
|
||||
|
||||
export async function handleUserUpdate(data: DiscordGatewayPayload) {
|
||||
const userData = data.d as DiscordUser;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export async function handleGuildRoleCreate(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordGuildRoleCreateUpdate;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordGuildRoleDelete } from "../../types/guilds/guild_role_delete.ts";
|
||||
|
||||
export async function handleGuildRoleDelete(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordGuildRoleDelete;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export async function handleGuildRoleUpdate(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordGuildRoleCreateUpdate;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordVoiceState } from "../../types/voice/voice_state.ts";
|
||||
|
||||
export async function handleVoiceStateUpdate(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as DiscordVoiceState;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { DiscordWebhooksUpdate } from "../../types/webhooks/webhooks_update.ts";
|
||||
|
||||
export function handleWebhooksUpdate(data: DiscordGatewayPayload) {
|
||||
const options = data.d as DiscordWebhooksUpdate;
|
||||
|
||||
Reference in New Issue
Block a user