mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 03:18:17 +00:00
chore: fix import and exports
This commit is contained in:
@@ -1,9 +1,4 @@
|
|||||||
import { getGatewayBot } from "./helpers/misc/get_gateway_bot.ts";
|
import { getGatewayBot } from "./helpers/misc/get_gateway_bot.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayIntents,
|
|
||||||
DiscordGetGatewayBot,
|
|
||||||
DiscordIdentify,
|
|
||||||
} from "./types/gateway.ts";
|
|
||||||
import { baseEndpoints, GATEWAY_VERSION } from "./util/constants.ts";
|
import { baseEndpoints, GATEWAY_VERSION } from "./util/constants.ts";
|
||||||
import { spawnShards } from "./ws/shard_manager.ts";
|
import { spawnShards } from "./ws/shard_manager.ts";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import { DiscordGatewayPayload } from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleChannelCreate(data: DiscordGatewayPayload) {
|
export async function handleChannelCreate(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordChannel;
|
const payload = data.d as DiscordChannel;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { DiscordGatewayPayload } from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleChannelDelete(data: DiscordGatewayPayload) {
|
export async function handleChannelDelete(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordChannel;
|
const payload = data.d as DiscordChannel;
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import {
|
|
||||||
DiscordChannelPinsUpdate,
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleChannelPinsUpdate(data: DiscordGatewayPayload) {
|
export async function handleChannelPinsUpdate(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordChannelPinsUpdate;
|
const payload = data.d as DiscordChannelPinsUpdate;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import { DiscordGatewayPayload } from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleChannelUpdate(data: DiscordGatewayPayload) {
|
export async function handleChannelUpdate(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordChannel;
|
const payload = data.d as DiscordChannel;
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import {
|
|
||||||
DiscordApplicationCommandCreateUpdateDelete,
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export function handleApplicationCommandCreate(
|
export function handleApplicationCommandCreate(
|
||||||
data: DiscordGatewayPayload,
|
data: DiscordGatewayPayload,
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import {
|
|
||||||
DiscordApplicationCommandCreateUpdateDelete,
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export function handleApplicationCommandDelete(data: DiscordGatewayPayload) {
|
export function handleApplicationCommandDelete(data: DiscordGatewayPayload) {
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import {
|
|
||||||
DiscordApplicationCommandCreateUpdateDelete,
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export function handleApplicationCommandUpdate(data: DiscordGatewayPayload) {
|
export function handleApplicationCommandUpdate(data: DiscordGatewayPayload) {
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordGuildEmojisUpdate,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
import { Collection } from "../../util/collection.ts";
|
import { Collection } from "../../util/collection.ts";
|
||||||
|
|
||||||
export async function handleGuildEmojisUpdate(data: DiscordGatewayPayload) {
|
export async function handleGuildEmojisUpdate(data: DiscordGatewayPayload) {
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordGuildBanAddRemove,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleGuildBanAdd(data: DiscordGatewayPayload) {
|
export async function handleGuildBanAdd(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordGuildBanAddRemove;
|
const payload = data.d as DiscordGuildBanAddRemove;
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordGuildBanAddRemove,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleGuildBanRemove(data: DiscordGatewayPayload) {
|
export async function handleGuildBanRemove(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordGuildBanAddRemove;
|
const payload = data.d as DiscordGuildBanAddRemove;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cache, cacheHandlers } from "../../cache.ts";
|
import { cache, cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import { DiscordGatewayPayload } from "../../types/gateway.ts";
|
|
||||||
import { basicShards } from "../../ws/shard.ts";
|
import { basicShards } from "../../ws/shard.ts";
|
||||||
|
|
||||||
export async function handleGuildCreate(
|
export async function handleGuildCreate(
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { DiscordGatewayPayload } from "../../types/gateway.ts";
|
|
||||||
import { basicShards } from "../../ws/shard.ts";
|
import { basicShards } from "../../ws/shard.ts";
|
||||||
|
|
||||||
export async function handleGuildDelete(
|
export async function handleGuildDelete(
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordGuildIntegrationsUpdate,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleGuildIntegrationsUpdate(
|
export async function handleGuildIntegrationsUpdate(
|
||||||
data: DiscordGatewayPayload,
|
data: DiscordGatewayPayload,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { DiscordGatewayPayload } from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleGuildUpdate(data: DiscordGatewayPayload) {
|
export async function handleGuildUpdate(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordGuild;
|
const payload = data.d as DiscordGuild;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { DiscordGatewayPayload } from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export function handleIntegrationCreate(
|
export function handleIntegrationCreate(
|
||||||
data: DiscordGatewayPayload,
|
data: DiscordGatewayPayload,
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { DiscordGatewayPayload } from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export function handleIntegrationDelete(data: DiscordGatewayPayload) {
|
export function handleIntegrationDelete(data: DiscordGatewayPayload) {
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { DiscordGatewayPayload } from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export function handleIntegrationUpdate(data: DiscordGatewayPayload) {
|
export function handleIntegrationUpdate(data: DiscordGatewayPayload) {
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import { DiscordGatewayPayload } from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleInteractionCreate(data: DiscordGatewayPayload) {
|
export async function handleInteractionCreate(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as InteractionCommandPayload;
|
const payload = data.d as InteractionCommandPayload;
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordInviteCreate,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export function handleInviteCreate(payload: DiscordGatewayPayload) {
|
export function handleInviteCreate(payload: DiscordGatewayPayload) {
|
||||||
// TODO: replace with tocamelcase
|
// TODO: replace with tocamelcase
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordInviteDelete,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export function handleInviteDelete(payload: DiscordGatewayPayload) {
|
export function handleInviteDelete(payload: DiscordGatewayPayload) {
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { cache, cacheHandlers } from "../../cache.ts";
|
import { cache, cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordGuildMembersChunk,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
import { Collection } from "../../util/collection.ts";
|
import { Collection } from "../../util/collection.ts";
|
||||||
|
|
||||||
export async function handleGuildMembersChunk(data: DiscordGatewayPayload) {
|
export async function handleGuildMembersChunk(data: DiscordGatewayPayload) {
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordGuildMemberAdd,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleGuildMemberAdd(data: DiscordGatewayPayload) {
|
export async function handleGuildMemberAdd(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordGuildMemberAdd;
|
const payload = data.d as DiscordGuildMemberAdd;
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordGuildMemberRemove,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleGuildMemberRemove(data: DiscordGatewayPayload) {
|
export async function handleGuildMemberRemove(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordGuildMemberRemove;
|
const payload = data.d as DiscordGuildMemberRemove;
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordGuildMemberUpdate,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleGuildMemberUpdate(data: DiscordGatewayPayload) {
|
export async function handleGuildMemberUpdate(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordGuildMemberUpdate;
|
const payload = data.d as DiscordGuildMemberUpdate;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import { DiscordGatewayPayload } from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleMessageCreate(data: DiscordGatewayPayload) {
|
export async function handleMessageCreate(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordMessage;
|
const payload = data.d as DiscordMessage;
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordMessageDelete,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleMessageDelete(data: DiscordGatewayPayload) {
|
export async function handleMessageDelete(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordMessageDelete;
|
const payload = data.d as DiscordMessageDelete;
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordMessageDeleteBulk,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleMessageDeleteBulk(data: DiscordGatewayPayload) {
|
export async function handleMessageDeleteBulk(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordMessageDeleteBulk;
|
const payload = data.d as DiscordMessageDeleteBulk;
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
import { botId, eventHandlers } from "../../bot.ts";
|
import { botId, eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordMessageReactionAdd,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleMessageReactionAdd(data: DiscordGatewayPayload) {
|
export async function handleMessageReactionAdd(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordMessageReactionAdd;
|
const payload = data.d as DiscordMessageReactionAdd;
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
import { botId, eventHandlers } from "../../bot.ts";
|
import { botId, eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordMessageReactionRemove,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleMessageReactionRemove(
|
export async function handleMessageReactionRemove(
|
||||||
data: DiscordGatewayPayload,
|
data: DiscordGatewayPayload,
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordMessageReactionRemoveAll,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleMessageReactionRemoveAll(
|
export async function handleMessageReactionRemoveAll(
|
||||||
data: DiscordGatewayPayload,
|
data: DiscordGatewayPayload,
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordMessageReactionRemoveEmoji,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleMessageReactionRemoveEmoji(
|
export async function handleMessageReactionRemoveEmoji(
|
||||||
data: DiscordGatewayPayload,
|
data: DiscordGatewayPayload,
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import { DiscordGatewayPayload } from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleMessageUpdate(data: DiscordGatewayPayload) {
|
export async function handleMessageUpdate(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordMessage;
|
const payload = data.d as DiscordMessage;
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordPresenceUpdate,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handlePresenceUpdate(data: DiscordGatewayPayload) {
|
export async function handlePresenceUpdate(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordPresenceUpdate;
|
const payload = data.d as DiscordPresenceUpdate;
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import {
|
|||||||
import { cache, cacheHandlers } from "../../cache.ts";
|
import { cache, cacheHandlers } from "../../cache.ts";
|
||||||
import { initialMemberLoadQueue } from "../../structures/guild.ts";
|
import { initialMemberLoadQueue } from "../../structures/guild.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import { DiscordGatewayPayload, DiscordReady } from "../../types/gateway.ts";
|
|
||||||
import { delay } from "../../util/utils.ts";
|
import { delay } from "../../util/utils.ts";
|
||||||
import { allowNextShard, basicShards } from "../../ws/mod.ts";
|
import { allowNextShard, basicShards } from "../../ws/mod.ts";
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordTypingStart,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export function handleTypingStart(data: DiscordGatewayPayload) {
|
export function handleTypingStart(data: DiscordGatewayPayload) {
|
||||||
eventHandlers.typingStart?.(data.d as DiscordTypingStart);
|
eventHandlers.typingStart?.(data.d as DiscordTypingStart);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { DiscordGatewayPayload } from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleUserUpdate(data: DiscordGatewayPayload) {
|
export async function handleUserUpdate(data: DiscordGatewayPayload) {
|
||||||
const userData = data.d as DiscordUser;
|
const userData = data.d as DiscordUser;
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordGuildRoleCreateUpdate,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleGuildRoleCreate(data: DiscordGatewayPayload) {
|
export async function handleGuildRoleCreate(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordGuildRoleCreateUpdate;
|
const payload = data.d as DiscordGuildRoleCreateUpdate;
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordGuildRoleDelete,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleGuildRoleDelete(data: DiscordGatewayPayload) {
|
export async function handleGuildRoleDelete(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordGuildRoleDelete;
|
const payload = data.d as DiscordGuildRoleDelete;
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordGuildRoleCreateUpdate,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleGuildRoleUpdate(data: DiscordGatewayPayload) {
|
export async function handleGuildRoleUpdate(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordGuildRoleCreateUpdate;
|
const payload = data.d as DiscordGuildRoleCreateUpdate;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { DiscordVoiceServerUpdate } from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleVoiceServerUpdate(data: DiscordPayload) {
|
export async function handleVoiceServerUpdate(data: DiscordPayload) {
|
||||||
const payload = data.d as DiscordVoiceServerUpdate;
|
const payload = data.d as DiscordVoiceServerUpdate;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import { cacheHandlers } from "../../cache.ts";
|
import { cacheHandlers } from "../../cache.ts";
|
||||||
import { structures } from "../../structures/mod.ts";
|
import { structures } from "../../structures/mod.ts";
|
||||||
import { DiscordGatewayPayload } from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export async function handleVoiceStateUpdate(data: DiscordGatewayPayload) {
|
export async function handleVoiceStateUpdate(data: DiscordGatewayPayload) {
|
||||||
const payload = data.d as DiscordVoiceState;
|
const payload = data.d as DiscordVoiceState;
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
import { eventHandlers } from "../../bot.ts";
|
import { eventHandlers } from "../../bot.ts";
|
||||||
import {
|
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordWebhooksUpdate,
|
|
||||||
} from "../../types/gateway.ts";
|
|
||||||
|
|
||||||
export function handleWebhooksUpdate(data: DiscordGatewayPayload) {
|
export function handleWebhooksUpdate(data: DiscordGatewayPayload) {
|
||||||
const options = data.d as DiscordWebhooksUpdate;
|
const options = data.d as DiscordWebhooksUpdate;
|
||||||
|
|||||||
+66
-2
@@ -7,6 +7,7 @@ export * from "./audit_log/get_guild_audit_log.ts";
|
|||||||
export * from "./audit_log/optional_audit_entry_info.ts";
|
export * from "./audit_log/optional_audit_entry_info.ts";
|
||||||
export * from "./channels/channel.ts";
|
export * from "./channels/channel.ts";
|
||||||
export * from "./channels/channel_mention.ts";
|
export * from "./channels/channel_mention.ts";
|
||||||
|
export * from "./channels/channel_pins_update.ts";
|
||||||
export * from "./channels/channel_types.ts";
|
export * from "./channels/channel_types.ts";
|
||||||
export * from "./channels/create_message.ts";
|
export * from "./channels/create_message.ts";
|
||||||
export * from "./channels/followed_channel.ts";
|
export * from "./channels/followed_channel.ts";
|
||||||
@@ -24,13 +25,54 @@ export * from "./embeds/embed_types.ts";
|
|||||||
export * from "./embeds/embed_video.ts";
|
export * from "./embeds/embed_video.ts";
|
||||||
export * from "./emojis/create_guild_emoji.ts";
|
export * from "./emojis/create_guild_emoji.ts";
|
||||||
export * from "./emojis/emoji.ts";
|
export * from "./emojis/emoji.ts";
|
||||||
|
export * from "./emojis/guild_emojis_update.ts";
|
||||||
export * from "./emojis/modify_guild_emoji.ts";
|
export * from "./emojis/modify_guild_emoji.ts";
|
||||||
export * from "./gateway.ts";
|
export * from "./gateway/gateway_intents.ts";
|
||||||
export * from "./gateway/opcodes.ts";
|
export * from "./gateway/gateway_opcodes.ts";
|
||||||
|
export * from "./gateway/gateway_payload.ts";
|
||||||
|
export * from "./gateway/gateway_url_params.ts";
|
||||||
|
export * from "./gateway/get_gateway_bot.ts";
|
||||||
|
export * from "./gateway/hello.ts";
|
||||||
|
export * from "./gateway/identify.ts";
|
||||||
|
export * from "./gateway/identify_connection_properties.ts";
|
||||||
|
export * from "./gateway/ready.ts";
|
||||||
|
export * from "./gateway/resume.ts";
|
||||||
|
export * from "./gateway/session_start_limit.ts";
|
||||||
|
export * from "./gateway/status_types.ts";
|
||||||
|
export * from "./gateway/update_status.ts";
|
||||||
|
export * from "./guilds/guild_ban_add_remove.ts";
|
||||||
|
export * from "./guilds/guild_ban_remove.ts";
|
||||||
|
export * from "./guilds/guild_integrations_update.ts";
|
||||||
|
export * from "./guilds/guild_role_create.ts";
|
||||||
|
export * from "./guilds/guild_role_delete.ts";
|
||||||
|
export * from "./guilds/guild_role_update.ts";
|
||||||
|
export * from "./guilds/request_guild_members.ts";
|
||||||
|
export * from "./interactions/application_command.ts";
|
||||||
|
export * from "./interactions/application_command_callback_data.ts";
|
||||||
|
export * from "./interactions/application_command_interaction_data.ts";
|
||||||
|
export * from "./interactions/application_command_interaction_data_option.ts";
|
||||||
|
export * from "./interactions/application_command_option.ts";
|
||||||
|
export * from "./interactions/application_command_option_choice.ts";
|
||||||
|
export * from "./interactions/application_command_option_types.ts";
|
||||||
|
export * from "./interactions/create_global_application_command.ts";
|
||||||
|
export * from "./interactions/create_guild_application_command.ts";
|
||||||
|
export * from "./interactions/edit_global_application_command.ts";
|
||||||
|
export * from "./interactions/edit_guild_application_command.ts";
|
||||||
|
export * from "./interactions/interaction.ts";
|
||||||
|
export * from "./interactions/interaction_response.ts";
|
||||||
|
export * from "./interactions/interaction_response_types.ts";
|
||||||
|
export * from "./interactions/interaction_types.ts";
|
||||||
|
export * from "./interactions/message_interaction.ts";
|
||||||
export * from "./invites/get_invite.ts";
|
export * from "./invites/get_invite.ts";
|
||||||
export * from "./invites/invite.ts";
|
export * from "./invites/invite.ts";
|
||||||
|
export * from "./invites/invite_create.ts";
|
||||||
|
export * from "./invites/invite_delete.ts";
|
||||||
export * from "./invites/invite_metadata.ts";
|
export * from "./invites/invite_metadata.ts";
|
||||||
export * from "./invites/target_user_types.ts";
|
export * from "./invites/target_user_types.ts";
|
||||||
|
export * from "./members/guild_members_chunk.ts";
|
||||||
|
export * from "./members/guild_member_add.ts";
|
||||||
|
export * from "./members/guild_member_remove.ts";
|
||||||
|
export * from "./members/guild_member_update.ts";
|
||||||
export * from "./messages/allowed_mentions.ts";
|
export * from "./messages/allowed_mentions.ts";
|
||||||
export * from "./messages/allowed_mentions_types.ts";
|
export * from "./messages/allowed_mentions_types.ts";
|
||||||
export * from "./messages/attachment.ts";
|
export * from "./messages/attachment.ts";
|
||||||
@@ -38,14 +80,33 @@ export * from "./messages/message.ts";
|
|||||||
export * from "./messages/message_activity.ts";
|
export * from "./messages/message_activity.ts";
|
||||||
export * from "./messages/message_activity_types.ts";
|
export * from "./messages/message_activity_types.ts";
|
||||||
export * from "./messages/message_application.ts";
|
export * from "./messages/message_application.ts";
|
||||||
|
export * from "./messages/message_delete.ts";
|
||||||
|
export * from "./messages/message_delete_bulk.ts";
|
||||||
export * from "./messages/message_flags.ts";
|
export * from "./messages/message_flags.ts";
|
||||||
|
export * from "./messages/message_reaction_add.ts";
|
||||||
|
export * from "./messages/message_reaction_remove.ts";
|
||||||
|
export * from "./messages/message_reaction_remove_all.ts";
|
||||||
|
export * from "./messages/message_reaction_remove_emoji.ts";
|
||||||
export * from "./messages/message_reference.ts";
|
export * from "./messages/message_reference.ts";
|
||||||
export * from "./messages/message_sticker.ts";
|
export * from "./messages/message_sticker.ts";
|
||||||
export * from "./messages/message_sticker_format_types.ts";
|
export * from "./messages/message_sticker_format_types.ts";
|
||||||
export * from "./messages/message_types.ts";
|
export * from "./messages/message_types.ts";
|
||||||
export * from "./messages/reaction.ts";
|
export * from "./messages/reaction.ts";
|
||||||
|
export * from "./misc/activity.ts";
|
||||||
|
export * from "./misc/activity_assets.ts";
|
||||||
|
export * from "./misc/activity_emoji.ts";
|
||||||
|
export * from "./misc/activity_flags.ts";
|
||||||
|
export * from "./misc/activity_party.ts";
|
||||||
|
export * from "./misc/activity_secrets.ts";
|
||||||
|
export * from "./misc/activity_timestamps.ts";
|
||||||
|
export * from "./misc/activity_types.ts";
|
||||||
export * from "./misc/bitwise_permission_flags.ts";
|
export * from "./misc/bitwise_permission_flags.ts";
|
||||||
|
export * from "./misc/client_status.ts";
|
||||||
|
export * from "./misc/errors.ts";
|
||||||
export * from "./misc/permission_strings.ts";
|
export * from "./misc/permission_strings.ts";
|
||||||
|
export * from "./misc/presence_update.ts";
|
||||||
|
export * from "./misc/typing_start.ts";
|
||||||
|
export * from "./mod.ts";
|
||||||
export * from "./templates/create_guild_from_template.ts";
|
export * from "./templates/create_guild_from_template.ts";
|
||||||
export * from "./templates/modify_guild_template.ts";
|
export * from "./templates/modify_guild_template.ts";
|
||||||
export * from "./templates/template.ts";
|
export * from "./templates/template.ts";
|
||||||
@@ -58,7 +119,9 @@ export * from "./users/user.ts";
|
|||||||
export * from "./users/user_flags.ts";
|
export * from "./users/user_flags.ts";
|
||||||
export * from "./users/visibility_types.ts";
|
export * from "./users/visibility_types.ts";
|
||||||
export * from "./util.ts";
|
export * from "./util.ts";
|
||||||
|
export * from "./voice/update_voice_state.ts";
|
||||||
export * from "./voice/voice_region.ts";
|
export * from "./voice/voice_region.ts";
|
||||||
|
export * from "./voice/voice_server_update.ts";
|
||||||
export * from "./voice/voice_state.ts";
|
export * from "./voice/voice_state.ts";
|
||||||
export * from "./webhooks/create_webhook.ts";
|
export * from "./webhooks/create_webhook.ts";
|
||||||
export * from "./webhooks/discord_webhook_types.ts";
|
export * from "./webhooks/discord_webhook_types.ts";
|
||||||
@@ -66,3 +129,4 @@ export * from "./webhooks/edit_webhook_message.ts";
|
|||||||
export * from "./webhooks/execute_webhook.ts";
|
export * from "./webhooks/execute_webhook.ts";
|
||||||
export * from "./webhooks/modify_webhook.ts";
|
export * from "./webhooks/modify_webhook.ts";
|
||||||
export * from "./webhooks/webhook.ts";
|
export * from "./webhooks/webhook.ts";
|
||||||
|
export * from "./webhooks/webhooks_update.ts";
|
||||||
|
|||||||
+1
-7
@@ -1,11 +1,5 @@
|
|||||||
import { botGatewayData, eventHandlers, proxyWSURL } from "../bot.ts";
|
import { botGatewayData, eventHandlers, proxyWSURL } from "../bot.ts";
|
||||||
import {
|
import { DiscordGatewayOpcodes } from "../types/gateway/gateway_opcodes.ts";
|
||||||
DiscordGatewayPayload,
|
|
||||||
DiscordGetGatewayBot,
|
|
||||||
DiscordHello,
|
|
||||||
DiscordIdentify,
|
|
||||||
} from "../types/gateway.ts";
|
|
||||||
import { DiscordGatewayOpcodes } from "../types/mod.ts";
|
|
||||||
import { Collection } from "../util/collection.ts";
|
import { Collection } from "../util/collection.ts";
|
||||||
import { delay } from "../util/utils.ts";
|
import { delay } from "../util/utils.ts";
|
||||||
import { decompressWith } from "./deps.ts";
|
import { decompressWith } from "./deps.ts";
|
||||||
|
|||||||
Reference in New Issue
Block a user