Skip to content

Commit

Permalink
Move ReactionHandler type
Browse files Browse the repository at this point in the history
  • Loading branch information
holzmaster committed Jul 14, 2024
1 parent 921d39a commit 398fbef
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { GatewayIntentBits, Partials, Client } from "discord.js";
import * as sentry from "@sentry/node";

import type { ReactionHandler } from "./types.js";

import { readConfig, databasePath, args } from "./service/configService.js";
import log from "@log";
Expand All @@ -10,6 +9,7 @@ import "./polyfills.js";

import * as kysely from "./storage/db/db.js";

import type { ReactionHandler } from "./handler/ReactionHandler.js";
import messageDeleteHandler from "./handler/messageDeleteHandler.js";
import defaultReactionHandler from "./handler/defaultReactionHandler.js";
import quoteReactionHandler from "./handler/quoteHandler.js";
Expand Down
12 changes: 12 additions & 0 deletions src/handler/ReactionHandler.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { MessageReaction, User } from "discord.js";
import type { BotContext } from "../context.js";

export interface ReactionHandler {
displayName: string;
execute(
reactionEvent: MessageReaction,
invoker: User,
context: BotContext,
reactionWasRemoved: boolean,
): Promise<void>;
}
11 changes: 0 additions & 11 deletions src/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
import type { Snowflake, ActivityType } from "discord.js";

import type { BotContext } from "./context.js";
import type { ProcessableMessage } from "./service/commandService.js";

export interface ReactionHandler {
displayName: string;
execute(
reactionEvent: MessageReaction,
invoker: User,
context: BotContext,
reactionWasRemoved: boolean,
): Promise<void>;
}

export interface Config {
auth: {
Expand Down

0 comments on commit 398fbef

Please sign in to comment.