wip
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
import config from "config";
|
||||
import client from "lib/client";
|
||||
import { getRandomInt } from "lib/utils";
|
||||
|
||||
export class GreetingService {
|
||||
private greetContent = ["HALLOOOO"] as const;
|
||||
private sleepContent = ["zzzzZZ..", "*schnarch*"] as const;
|
||||
getContent(asleep: boolean) {
|
||||
if (asleep) {
|
||||
return this.sleepContent[getRandomInt(0, this.sleepContent.length - 1)];
|
||||
}
|
||||
|
||||
return this.greetContent[getRandomInt(0, this.greetContent.length - 1)];
|
||||
}
|
||||
|
||||
async greet() {
|
||||
const channels = client.channels;
|
||||
|
||||
@@ -11,4 +22,14 @@ export class GreetingService {
|
||||
await channel.send({ content: "HALLOOOO" });
|
||||
}
|
||||
}
|
||||
|
||||
async sleep() {
|
||||
const channels = client.channels;
|
||||
|
||||
const channel = channels.cache.get(config.discord.channelId);
|
||||
|
||||
if (channel?.isTextBased && channel?.isSendable()) {
|
||||
await channel.send({ content: this.getContent(true) });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export class WaterMeService {
|
||||
|
||||
getReply() {
|
||||
const thirstyReplies = [
|
||||
"... wow das wars schon???",
|
||||
"... wow das wars schon??? ich brauche noch mehr wasser :(",
|
||||
"dankeeeee!!!! ich waer fast verdurstet :(((",
|
||||
"*roelpssssss*",
|
||||
];
|
||||
@@ -67,6 +67,7 @@ export class WaterMeService {
|
||||
const reply = this.getReply();
|
||||
|
||||
this.waterLevel++;
|
||||
console.log(this.waterLevel);
|
||||
|
||||
return {
|
||||
reply,
|
||||
@@ -77,7 +78,7 @@ export class WaterMeService {
|
||||
const result = this.waterMe();
|
||||
|
||||
const moreButton = new ButtonBuilder()
|
||||
.setCustomId("more")
|
||||
.setCustomId("moreWater")
|
||||
.setLabel("mehr")
|
||||
.setStyle(ButtonStyle.Secondary);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user