diff --git a/src/bot.ts b/src/bot.ts index 63f41b5c3..39ab12e11 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -1,9 +1,4 @@ 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 { spawnShards } from "./ws/shard_manager.ts"; diff --git a/src/handlers/channels/CHANNEL_CREATE.ts b/src/handlers/channels/CHANNEL_CREATE.ts index d0b97d037..2074c6c6c 100644 --- a/src/handlers/channels/CHANNEL_CREATE.ts +++ b/src/handlers/channels/CHANNEL_CREATE.ts @@ -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; diff --git a/src/handlers/channels/CHANNEL_DELETE.ts b/src/handlers/channels/CHANNEL_DELETE.ts index a9ba2744d..91f7947d6 100644 --- a/src/handlers/channels/CHANNEL_DELETE.ts +++ b/src/handlers/channels/CHANNEL_DELETE.ts @@ -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; diff --git a/src/handlers/channels/CHANNEL_PINS_UPDATE.ts b/src/handlers/channels/CHANNEL_PINS_UPDATE.ts index 58a6c2e7e..83de391d3 100644 --- a/src/handlers/channels/CHANNEL_PINS_UPDATE.ts +++ b/src/handlers/channels/CHANNEL_PINS_UPDATE.ts @@ -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; diff --git a/src/handlers/channels/CHANNEL_UPDATE.ts b/src/handlers/channels/CHANNEL_UPDATE.ts index fd60c7396..961b4ddd8 100644 --- a/src/handlers/channels/CHANNEL_UPDATE.ts +++ b/src/handlers/channels/CHANNEL_UPDATE.ts @@ -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; diff --git a/src/handlers/commands/APPLICATION_COMMAND_CREATE.ts b/src/handlers/commands/APPLICATION_COMMAND_CREATE.ts index 707780312..08acf2cb1 100644 --- a/src/handlers/commands/APPLICATION_COMMAND_CREATE.ts +++ b/src/handlers/commands/APPLICATION_COMMAND_CREATE.ts @@ -1,8 +1,4 @@ import { eventHandlers } from "../../bot.ts"; -import { - DiscordApplicationCommandCreateUpdateDelete, - DiscordGatewayPayload, -} from "../../types/gateway.ts"; export function handleApplicationCommandCreate( data: DiscordGatewayPayload, diff --git a/src/handlers/commands/APPLICATION_COMMAND_DELETE.ts b/src/handlers/commands/APPLICATION_COMMAND_DELETE.ts index 40f04dc8d..92a5bf25c 100644 --- a/src/handlers/commands/APPLICATION_COMMAND_DELETE.ts +++ b/src/handlers/commands/APPLICATION_COMMAND_DELETE.ts @@ -1,8 +1,4 @@ import { eventHandlers } from "../../bot.ts"; -import { - DiscordApplicationCommandCreateUpdateDelete, - DiscordGatewayPayload, -} from "../../types/gateway.ts"; export function handleApplicationCommandDelete(data: DiscordGatewayPayload) { const { diff --git a/src/handlers/commands/APPLICATION_COMMAND_UPDATE.ts b/src/handlers/commands/APPLICATION_COMMAND_UPDATE.ts index e4fd270c8..db36be346 100644 --- a/src/handlers/commands/APPLICATION_COMMAND_UPDATE.ts +++ b/src/handlers/commands/APPLICATION_COMMAND_UPDATE.ts @@ -1,8 +1,4 @@ import { eventHandlers } from "../../bot.ts"; -import { - DiscordApplicationCommandCreateUpdateDelete, - DiscordGatewayPayload, -} from "../../types/gateway.ts"; export function handleApplicationCommandUpdate(data: DiscordGatewayPayload) { const { diff --git a/src/handlers/emojis/GUILD_EMOJIS_UPDATE.ts b/src/handlers/emojis/GUILD_EMOJIS_UPDATE.ts index 6ef317c47..e84b592cb 100644 --- a/src/handlers/emojis/GUILD_EMOJIS_UPDATE.ts +++ b/src/handlers/emojis/GUILD_EMOJIS_UPDATE.ts @@ -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) { diff --git a/src/handlers/guilds/GUILD_BAN_ADD.ts b/src/handlers/guilds/GUILD_BAN_ADD.ts index 9204aaafe..96d48d84a 100644 --- a/src/handlers/guilds/GUILD_BAN_ADD.ts +++ b/src/handlers/guilds/GUILD_BAN_ADD.ts @@ -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; diff --git a/src/handlers/guilds/GUILD_BAN_REMOVE.ts b/src/handlers/guilds/GUILD_BAN_REMOVE.ts index 93e3bf519..7b6c160c4 100644 --- a/src/handlers/guilds/GUILD_BAN_REMOVE.ts +++ b/src/handlers/guilds/GUILD_BAN_REMOVE.ts @@ -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; diff --git a/src/handlers/guilds/GUILD_CREATE.ts b/src/handlers/guilds/GUILD_CREATE.ts index 00f42073e..3bd318705 100644 --- a/src/handlers/guilds/GUILD_CREATE.ts +++ b/src/handlers/guilds/GUILD_CREATE.ts @@ -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( diff --git a/src/handlers/guilds/GUILD_DELETE.ts b/src/handlers/guilds/GUILD_DELETE.ts index 8c582bb59..10ab94493 100644 --- a/src/handlers/guilds/GUILD_DELETE.ts +++ b/src/handlers/guilds/GUILD_DELETE.ts @@ -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( diff --git a/src/handlers/guilds/GUILD_INTEGRATIONS_UPDATE.ts b/src/handlers/guilds/GUILD_INTEGRATIONS_UPDATE.ts index d6c82560c..8b5c251a2 100644 --- a/src/handlers/guilds/GUILD_INTEGRATIONS_UPDATE.ts +++ b/src/handlers/guilds/GUILD_INTEGRATIONS_UPDATE.ts @@ -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, diff --git a/src/handlers/guilds/GUILD_UPDATE.ts b/src/handlers/guilds/GUILD_UPDATE.ts index b8602c316..53064fc3d 100644 --- a/src/handlers/guilds/GUILD_UPDATE.ts +++ b/src/handlers/guilds/GUILD_UPDATE.ts @@ -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; diff --git a/src/handlers/integrations/INTEGRATION_CREATE.ts b/src/handlers/integrations/INTEGRATION_CREATE.ts index a558e7fd7..0fb5d2cd0 100644 --- a/src/handlers/integrations/INTEGRATION_CREATE.ts +++ b/src/handlers/integrations/INTEGRATION_CREATE.ts @@ -1,5 +1,4 @@ import { eventHandlers } from "../../bot.ts"; -import { DiscordGatewayPayload } from "../../types/gateway.ts"; export function handleIntegrationCreate( data: DiscordGatewayPayload, diff --git a/src/handlers/integrations/INTEGRATION_DELETE.ts b/src/handlers/integrations/INTEGRATION_DELETE.ts index 2df762c06..2b4df37fe 100644 --- a/src/handlers/integrations/INTEGRATION_DELETE.ts +++ b/src/handlers/integrations/INTEGRATION_DELETE.ts @@ -1,5 +1,4 @@ import { eventHandlers } from "../../bot.ts"; -import { DiscordGatewayPayload } from "../../types/gateway.ts"; export function handleIntegrationDelete(data: DiscordGatewayPayload) { const { diff --git a/src/handlers/integrations/INTEGRATION_UPDATE.ts b/src/handlers/integrations/INTEGRATION_UPDATE.ts index 12415de80..086ae10e2 100644 --- a/src/handlers/integrations/INTEGRATION_UPDATE.ts +++ b/src/handlers/integrations/INTEGRATION_UPDATE.ts @@ -1,5 +1,4 @@ import { eventHandlers } from "../../bot.ts"; -import { DiscordGatewayPayload } from "../../types/gateway.ts"; export function handleIntegrationUpdate(data: DiscordGatewayPayload) { const { diff --git a/src/handlers/interactions/INTERACTION_CREATE.ts b/src/handlers/interactions/INTERACTION_CREATE.ts index 4aba548f7..40282a4b4 100644 --- a/src/handlers/interactions/INTERACTION_CREATE.ts +++ b/src/handlers/interactions/INTERACTION_CREATE.ts @@ -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; diff --git a/src/handlers/invites/INVITE_CREATE.ts b/src/handlers/invites/INVITE_CREATE.ts index bf33433d1..9f1df9af1 100644 --- a/src/handlers/invites/INVITE_CREATE.ts +++ b/src/handlers/invites/INVITE_CREATE.ts @@ -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 diff --git a/src/handlers/invites/INVITE_DELETE.ts b/src/handlers/invites/INVITE_DELETE.ts index 12fd390a1..057c5820c 100644 --- a/src/handlers/invites/INVITE_DELETE.ts +++ b/src/handlers/invites/INVITE_DELETE.ts @@ -1,8 +1,4 @@ import { eventHandlers } from "../../bot.ts"; -import { - DiscordGatewayPayload, - DiscordInviteDelete, -} from "../../types/gateway.ts"; export function handleInviteDelete(payload: DiscordGatewayPayload) { const { diff --git a/src/handlers/members/GUILD_MEMBERS_CHUNK.ts b/src/handlers/members/GUILD_MEMBERS_CHUNK.ts index fbf35ac3f..c3427ea57 100644 --- a/src/handlers/members/GUILD_MEMBERS_CHUNK.ts +++ b/src/handlers/members/GUILD_MEMBERS_CHUNK.ts @@ -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) { diff --git a/src/handlers/members/GUILD_MEMBER_ADD.ts b/src/handlers/members/GUILD_MEMBER_ADD.ts index edf44f805..f548baa4c 100644 --- a/src/handlers/members/GUILD_MEMBER_ADD.ts +++ b/src/handlers/members/GUILD_MEMBER_ADD.ts @@ -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; diff --git a/src/handlers/members/GUILD_MEMBER_REMOVE.ts b/src/handlers/members/GUILD_MEMBER_REMOVE.ts index 638413207..59415f038 100644 --- a/src/handlers/members/GUILD_MEMBER_REMOVE.ts +++ b/src/handlers/members/GUILD_MEMBER_REMOVE.ts @@ -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; diff --git a/src/handlers/members/GUILD_MEMBER_UPDATE.ts b/src/handlers/members/GUILD_MEMBER_UPDATE.ts index ae8155f44..1a9619560 100644 --- a/src/handlers/members/GUILD_MEMBER_UPDATE.ts +++ b/src/handlers/members/GUILD_MEMBER_UPDATE.ts @@ -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; diff --git a/src/handlers/messages/MESSAGE_CREATE.ts b/src/handlers/messages/MESSAGE_CREATE.ts index b1a7e7e9d..017f5bf74 100644 --- a/src/handlers/messages/MESSAGE_CREATE.ts +++ b/src/handlers/messages/MESSAGE_CREATE.ts @@ -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; diff --git a/src/handlers/messages/MESSAGE_DELETE.ts b/src/handlers/messages/MESSAGE_DELETE.ts index f926bcf0a..99a1e0394 100644 --- a/src/handlers/messages/MESSAGE_DELETE.ts +++ b/src/handlers/messages/MESSAGE_DELETE.ts @@ -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; diff --git a/src/handlers/messages/MESSAGE_DELETE_BULK.ts b/src/handlers/messages/MESSAGE_DELETE_BULK.ts index b6a89aa29..188493557 100644 --- a/src/handlers/messages/MESSAGE_DELETE_BULK.ts +++ b/src/handlers/messages/MESSAGE_DELETE_BULK.ts @@ -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; diff --git a/src/handlers/messages/MESSAGE_REACTION_ADD.ts b/src/handlers/messages/MESSAGE_REACTION_ADD.ts index 2c387e117..b5878fbc1 100644 --- a/src/handlers/messages/MESSAGE_REACTION_ADD.ts +++ b/src/handlers/messages/MESSAGE_REACTION_ADD.ts @@ -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; diff --git a/src/handlers/messages/MESSAGE_REACTION_REMOVE.ts b/src/handlers/messages/MESSAGE_REACTION_REMOVE.ts index b55c1270f..8a530fa00 100644 --- a/src/handlers/messages/MESSAGE_REACTION_REMOVE.ts +++ b/src/handlers/messages/MESSAGE_REACTION_REMOVE.ts @@ -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, diff --git a/src/handlers/messages/MESSAGE_REACTION_REMOVE_ALL.ts b/src/handlers/messages/MESSAGE_REACTION_REMOVE_ALL.ts index 06c4646e0..218baa31e 100644 --- a/src/handlers/messages/MESSAGE_REACTION_REMOVE_ALL.ts +++ b/src/handlers/messages/MESSAGE_REACTION_REMOVE_ALL.ts @@ -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, diff --git a/src/handlers/messages/MESSAGE_REACTION_REMOVE_EMOJI.ts b/src/handlers/messages/MESSAGE_REACTION_REMOVE_EMOJI.ts index 8dc6a596c..ccac604ca 100644 --- a/src/handlers/messages/MESSAGE_REACTION_REMOVE_EMOJI.ts +++ b/src/handlers/messages/MESSAGE_REACTION_REMOVE_EMOJI.ts @@ -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, diff --git a/src/handlers/messages/MESSAGE_UPDATE.ts b/src/handlers/messages/MESSAGE_UPDATE.ts index a3b3f8a3b..7544106ea 100644 --- a/src/handlers/messages/MESSAGE_UPDATE.ts +++ b/src/handlers/messages/MESSAGE_UPDATE.ts @@ -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; diff --git a/src/handlers/misc/PRESENCE_UPDATE.ts b/src/handlers/misc/PRESENCE_UPDATE.ts index 46a058200..0590c0955 100644 --- a/src/handlers/misc/PRESENCE_UPDATE.ts +++ b/src/handlers/misc/PRESENCE_UPDATE.ts @@ -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; diff --git a/src/handlers/misc/READY.ts b/src/handlers/misc/READY.ts index f8723b7b9..793c6cca7 100644 --- a/src/handlers/misc/READY.ts +++ b/src/handlers/misc/READY.ts @@ -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"; diff --git a/src/handlers/misc/TYPING_START.ts b/src/handlers/misc/TYPING_START.ts index 5f1b67a1e..8f0274953 100644 --- a/src/handlers/misc/TYPING_START.ts +++ b/src/handlers/misc/TYPING_START.ts @@ -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); diff --git a/src/handlers/misc/USER_UPDATE.ts b/src/handlers/misc/USER_UPDATE.ts index 5efcef4b7..7008702eb 100644 --- a/src/handlers/misc/USER_UPDATE.ts +++ b/src/handlers/misc/USER_UPDATE.ts @@ -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; diff --git a/src/handlers/roles/GUILD_ROLE_CREATE.ts b/src/handlers/roles/GUILD_ROLE_CREATE.ts index c3105d6cc..cc6880660 100644 --- a/src/handlers/roles/GUILD_ROLE_CREATE.ts +++ b/src/handlers/roles/GUILD_ROLE_CREATE.ts @@ -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; diff --git a/src/handlers/roles/GUILD_ROLE_DELETE.ts b/src/handlers/roles/GUILD_ROLE_DELETE.ts index 0eb6c179b..b06f1da9e 100644 --- a/src/handlers/roles/GUILD_ROLE_DELETE.ts +++ b/src/handlers/roles/GUILD_ROLE_DELETE.ts @@ -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; diff --git a/src/handlers/roles/GUILD_ROLE_UPDATE.ts b/src/handlers/roles/GUILD_ROLE_UPDATE.ts index bd9856ca8..55032d3c5 100644 --- a/src/handlers/roles/GUILD_ROLE_UPDATE.ts +++ b/src/handlers/roles/GUILD_ROLE_UPDATE.ts @@ -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; diff --git a/src/handlers/voice/VOICE_SERVER_UPDATE.ts b/src/handlers/voice/VOICE_SERVER_UPDATE.ts index 87a6ea429..24e738b65 100644 --- a/src/handlers/voice/VOICE_SERVER_UPDATE.ts +++ b/src/handlers/voice/VOICE_SERVER_UPDATE.ts @@ -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; diff --git a/src/handlers/voice/VOICE_STATE_UPDATE.ts b/src/handlers/voice/VOICE_STATE_UPDATE.ts index 196afbc20..d67f55d58 100644 --- a/src/handlers/voice/VOICE_STATE_UPDATE.ts +++ b/src/handlers/voice/VOICE_STATE_UPDATE.ts @@ -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; diff --git a/src/handlers/webhooks/WEBHOOKS_UPDATE.ts b/src/handlers/webhooks/WEBHOOKS_UPDATE.ts index 8c00f5fd1..0b1f53d19 100644 --- a/src/handlers/webhooks/WEBHOOKS_UPDATE.ts +++ b/src/handlers/webhooks/WEBHOOKS_UPDATE.ts @@ -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; diff --git a/src/types/mod.ts b/src/types/mod.ts index f564bee47..b2ee32724 100644 --- a/src/types/mod.ts +++ b/src/types/mod.ts @@ -7,6 +7,7 @@ export * from "./audit_log/get_guild_audit_log.ts"; export * from "./audit_log/optional_audit_entry_info.ts"; export * from "./channels/channel.ts"; export * from "./channels/channel_mention.ts"; +export * from "./channels/channel_pins_update.ts"; export * from "./channels/channel_types.ts"; export * from "./channels/create_message.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 "./emojis/create_guild_emoji.ts"; export * from "./emojis/emoji.ts"; +export * from "./emojis/guild_emojis_update.ts"; export * from "./emojis/modify_guild_emoji.ts"; -export * from "./gateway.ts"; -export * from "./gateway/opcodes.ts"; +export * from "./gateway/gateway_intents.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/invite.ts"; +export * from "./invites/invite_create.ts"; +export * from "./invites/invite_delete.ts"; export * from "./invites/invite_metadata.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_types.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_types.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_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_sticker.ts"; export * from "./messages/message_sticker_format_types.ts"; export * from "./messages/message_types.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/client_status.ts"; +export * from "./misc/errors.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/modify_guild_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/visibility_types.ts"; export * from "./util.ts"; +export * from "./voice/update_voice_state.ts"; export * from "./voice/voice_region.ts"; +export * from "./voice/voice_server_update.ts"; export * from "./voice/voice_state.ts"; export * from "./webhooks/create_webhook.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/modify_webhook.ts"; export * from "./webhooks/webhook.ts"; +export * from "./webhooks/webhooks_update.ts"; diff --git a/src/ws/shard.ts b/src/ws/shard.ts index cc69155d0..f2f517adb 100644 --- a/src/ws/shard.ts +++ b/src/ws/shard.ts @@ -1,11 +1,5 @@ import { botGatewayData, eventHandlers, proxyWSURL } from "../bot.ts"; -import { - DiscordGatewayPayload, - DiscordGetGatewayBot, - DiscordHello, - DiscordIdentify, -} from "../types/gateway.ts"; -import { DiscordGatewayOpcodes } from "../types/mod.ts"; +import { DiscordGatewayOpcodes } from "../types/gateway/gateway_opcodes.ts"; import { Collection } from "../util/collection.ts"; import { delay } from "../util/utils.ts"; import { decompressWith } from "./deps.ts";