This commit is contained in:
2024-12-27 02:39:06 +01:00
parent c06ac10d09
commit 06ef16581c
7 changed files with 49 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ import client from "lib/client";
import EventEmitter from "node:events";
import DiscordService from "services/discord.service";
import { WaterMeService } from "services/water-me.service";
import config from "config";
export default class DiscordController extends EventEmitter {
private discordService!: DiscordService;
@@ -20,8 +21,17 @@ export default class DiscordController extends EventEmitter {
this.discordService = new DiscordService();
this.waterMeService = new WaterMeService();
// log when running
client.once("ready", () => {
console.log("Listening...");
client.once("ready", async () => {
console.log("hello :)");
/*const channels = client.channels;
const channel = channels.cache.get(config.discord.channelId);
if (channel?.isTextBased && channel?.isSendable()) {
await channel.send({
content: "bin gerade erst aufgewacht :o",
});
}*/
});
// listen for interactions
client.on("interactionCreate", this.handleInteraction.bind(this));