This commit is contained in:
2025-01-12 19:55:19 +01:00
parent 6707a95648
commit d902cd1042
10 changed files with 247 additions and 97 deletions

View File

@@ -20,7 +20,7 @@ import { HelpService } from "actions/help/help.service";
import { GreetingService } from "actions/greeting/greeting.service";
import { ActivityService } from "actions/activity/activity.service";
import { DmService } from "actions/dm/dm.service";
import { EmbedService } from "actions/embed/embed.service";
import { CustomMessageService } from "actions/customMessage/customMessage.service";
export default class DiscordController extends EventEmitter {
private discordService!: DiscordService;
@@ -30,7 +30,7 @@ export default class DiscordController extends EventEmitter {
helpService: HelpService;
activityService: ActivityService;
dmService: DmService;
embedService: EmbedService;
customMessageService: CustomMessageService;
constructor() {
super();
@@ -41,7 +41,7 @@ export default class DiscordController extends EventEmitter {
this.helpService = new HelpService();
this.activityService = new ActivityService();
this.dmService = new DmService();
this.embedService = new EmbedService();
this.customMessageService = new CustomMessageService();
// log when running
client.once("ready", async () => {
await this.setActivity();
@@ -128,7 +128,10 @@ export default class DiscordController extends EventEmitter {
await this.greetingService.handleInteraction(interaction);
return;
case Commands.Enum.embed:
await this.embedService.handleInteraction(interaction);
await this.customMessageService.handleInteraction(interaction);
return;
case Commands.Enum.message:
await this.customMessageService.handleInteraction(interaction);
return;
default:
break;