mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 03:18:17 +00:00
add: stage instances events (#944)
* feat: add stage instances events * feat: add stage instances events * Add new line * Add new lines * Sort event declaration alphabetically * Move to types/discordeno * Update src/types/discordeno/eventHandlers.ts * Update src/types/discordeno/stage_instance.ts * Update src/types/guilds/guild.ts * Apply suggestions * Commit from GitHub Actions (Lint) * Remove DiscordenoStageInstance * Directly pass data.d * Commit from GitHub Actions (Lint) Co-authored-by: rigormorrtiss <rigormorrtiss@users.noreply.github.com> Co-authored-by: itohatweb <to@itoh.at>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import type { StageInstance } from "../../types/channels/stage_instance.ts";
|
||||
import type { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export function handleStageInstanceCreate(data: DiscordGatewayPayload) {
|
||||
eventHandlers.stageInstanceCreate?.(data.d as StageInstance);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import type { StageInstance } from "../../types/channels/stage_instance.ts";
|
||||
import type { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export function handleStageInstanceDelete(data: DiscordGatewayPayload) {
|
||||
eventHandlers.stageInstanceDelete?.(data.d as StageInstance);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { eventHandlers } from "../../bot.ts";
|
||||
import type { StageInstance } from "../../types/channels/stage_instance.ts";
|
||||
import type { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
|
||||
export function handleStageInstanceUpdate(data: DiscordGatewayPayload) {
|
||||
eventHandlers.stageInstanceUpdate?.(data.d as StageInstance);
|
||||
}
|
||||
@@ -2,6 +2,9 @@ import { handleChannelCreate } from "./channels/CHANNEL_CREATE.ts";
|
||||
import { handleChannelDelete } from "./channels/CHANNEL_DELETE.ts";
|
||||
import { handleChannelPinsUpdate } from "./channels/CHANNEL_PINS_UPDATE.ts";
|
||||
import { handleChannelUpdate } from "./channels/CHANNEL_UPDATE.ts";
|
||||
import { handleStageInstanceCreate } from "./channels/STAGE_INSTANCE_CREATE.ts";
|
||||
import { handleStageInstanceUpdate } from "./channels/STAGE_INSTANCE_UPDATE.ts";
|
||||
import { handleStageInstanceDelete } from "./channels/STAGE_INSTANCE_DELETE.ts";
|
||||
import { handleThreadCreate } from "./channels/THREAD_CREATE.ts";
|
||||
import { handleThreadDelete } from "./channels/THREAD_DELETE.ts";
|
||||
import { handleThreadListSync } from "./channels/THREAD_LIST_SYNC.ts";
|
||||
@@ -83,6 +86,9 @@ export {
|
||||
handleMessageUpdate,
|
||||
handlePresenceUpdate,
|
||||
handleReady,
|
||||
handleStageInstanceCreate,
|
||||
handleStageInstanceDelete,
|
||||
handleStageInstanceUpdate,
|
||||
handleThreadCreate,
|
||||
handleThreadDelete,
|
||||
handleThreadListSync,
|
||||
@@ -110,6 +116,10 @@ export let handlers = {
|
||||
THREAD_LIST_SYNC: handleThreadListSync,
|
||||
THREAD_MEMBER_UPDATE: handleThreadMemberUpdate,
|
||||
THREAD_MEMBERS_UPDATE: handleThreadMembersUpdate,
|
||||
STAGE_INSTANCE_CREATE: handleStageInstanceCreate,
|
||||
STAGE_INSTANCE_UPDATE: handleStageInstanceUpdate,
|
||||
STAGE_INSTANCE_DELETE: handleStageInstanceDelete,
|
||||
|
||||
// commands
|
||||
APPLICATION_COMMAND_CREATE: handleApplicationCommandCreate,
|
||||
APPLICATION_COMMAND_DELETE: handleApplicationCommandDelete,
|
||||
|
||||
Reference in New Issue
Block a user