Bug fix temp change
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,5 +6,6 @@ export default interface Event {
|
||||
description: string
|
||||
type: "event"
|
||||
event: keyof ClientEvents
|
||||
disabled?: boolean
|
||||
execute(...args: any[]): void
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
client.on(event.event, event.execute)
|
||||
if (!event.disabled) {
|
||||
client.on(event.event, event.execute)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user