Merge branch 'dev' into 'main'

Bug fix temp change

See merge request illegitimate/illegitimate-bot!180
This commit is contained in:
2024-01-18 14:11:29 +00:00
4 changed files with 6 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ export = {
description: "Evaluate a JavaScript expression",
type: "event",
event: "messageCreate",
disabled: true,
async execute(message: Message) {
if (message.author.bot) return

View File

@@ -9,6 +9,7 @@ export = {
description: "Logs messages for the snipe command",
type: "event",
event: "messageDelete",
disabled: true,
async execute(message: Message) {
if (message.channel.type !== ChannelType.GuildText) return

View File

@@ -6,5 +6,6 @@ export default interface Event {
description: string
type: "event"
event: keyof ClientEvents
disabled?: boolean
execute(...args: any[]): void
}

View File

@@ -11,7 +11,9 @@ export default function loadEvents(client: Client) {
for (const eventFile of eventFiles) {
const eventPath = path.join(serverDir, eventDir, eventFile)
const event: Event = require(eventPath)
if (!event.disabled) {
client.on(event.event, event.execute)
}
}
}
}