Changed the event handler

This commit is contained in:
2024-09-16 13:59:19 +02:00
parent 957536fb62
commit 50a70797b4
10 changed files with 20 additions and 54 deletions

View File

@@ -1,13 +1,9 @@
import { IEvent } from "interfaces"
import { ExtendedClient as Client } from "utils/Client.js"
import { color } from "utils/functions/colors.js"
export default {
name: "conolelog",
description: "console log",
event: "ready",
execute(client: Client) {
execute(client) {
console.log(color("Logged in as " + client.user!.tag + "!", "green"))
}
} as IEvent
} as IEvent<"ready">

View File

@@ -3,10 +3,7 @@ import { IEvent } from "interfaces"
import logToChannel from "utils/functions/logtochannel.js"
export default {
name: "sendonlinemessage",
description: "send an online message",
event: "ready",
execute() {
if (process.env.NODE_ENV === "dev") return
@@ -17,4 +14,4 @@ export default {
}]
})
}
} as IEvent
} as IEvent<"ready">

View File

@@ -2,14 +2,10 @@ import { guildid } from "config/options.js"
import statuses from "config/statuses.js"
import { Guild } from "discord.js"
import { IEvent } from "interfaces"
import { ExtendedClient as Client } from "utils/Client.js"
export default {
name: "status",
description: "Sets the status of the bot",
event: "ready",
execute(client: Client) {
execute(client) {
const user = client.user!
const guild = client.guilds.cache.get(guildid) as Guild
@@ -31,4 +27,4 @@ export default {
user.setStatus("dnd")
}
} as IEvent
} as IEvent<"ready">