added embed for /hilfe
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Commands, type CommandsType } from "components/commands.component";
|
||||
import { Commands, type CommandsType } from "commands";
|
||||
import type {
|
||||
ButtonInteraction,
|
||||
CacheType,
|
||||
@@ -9,20 +9,24 @@ import type {
|
||||
import client from "lib/client";
|
||||
import EventEmitter from "node:events";
|
||||
import DiscordService from "services/discord.service";
|
||||
import { WaterMeService } from "actions/waterMe/waterMe.service";
|
||||
import config from "config";
|
||||
import { WaterMeService } from "actions/waterMe/waterMe.service";
|
||||
import { MedicationService } from "actions/medication/medication.service";
|
||||
import { HelpService } from "actions/help/help.service";
|
||||
import { custom } from "zod";
|
||||
|
||||
export default class DiscordController extends EventEmitter {
|
||||
private discordService!: DiscordService;
|
||||
waterMeService: WaterMeService;
|
||||
medicationService: MedicationService;
|
||||
helpService: HelpService;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.discordService = new DiscordService();
|
||||
this.waterMeService = new WaterMeService();
|
||||
this.medicationService = new MedicationService();
|
||||
this.helpService = new HelpService();
|
||||
// log when running
|
||||
client.once("ready", async () => {
|
||||
client.user?.setActivity("HALLOOO HOERT IHR MICH?", { type: 4 });
|
||||
@@ -36,7 +40,7 @@ export default class DiscordController extends EventEmitter {
|
||||
|
||||
if (channel?.isTextBased && channel?.isSendable()) {
|
||||
await channel.send({
|
||||
content: "bin gerade erst aufgewacht :o",
|
||||
content: "bin wieder da :o war kurz weg :3",
|
||||
});
|
||||
}*/
|
||||
});
|
||||
@@ -69,7 +73,7 @@ export default class DiscordController extends EventEmitter {
|
||||
const { customId } = interaction;
|
||||
console.log(interaction.customId);
|
||||
|
||||
if (customId === "moreWater") {
|
||||
if (customId.toLowerCase().includes("moreWater")) {
|
||||
await this.waterMeService.handleInteraction(interaction);
|
||||
}
|
||||
if (customId.toLowerCase().includes("medication")) {
|
||||
@@ -90,6 +94,9 @@ export default class DiscordController extends EventEmitter {
|
||||
case Commands.Enum.medikamente:
|
||||
await this.medicationService.handleInteraction(interaction);
|
||||
return;
|
||||
case Commands.Enum.hilfe:
|
||||
await this.helpService.handleInteraction(interaction);
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user