Merge branch 'dev' into 'main'
Bug fix temp change See merge request illegitimate/illegitimate-bot!180
This commit is contained in:
@@ -7,6 +7,7 @@ export = {
|
|||||||
description: "Evaluate a JavaScript expression",
|
description: "Evaluate a JavaScript expression",
|
||||||
type: "event",
|
type: "event",
|
||||||
event: "messageCreate",
|
event: "messageCreate",
|
||||||
|
disabled: true,
|
||||||
|
|
||||||
async execute(message: Message) {
|
async execute(message: Message) {
|
||||||
if (message.author.bot) return
|
if (message.author.bot) return
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export = {
|
|||||||
description: "Logs messages for the snipe command",
|
description: "Logs messages for the snipe command",
|
||||||
type: "event",
|
type: "event",
|
||||||
event: "messageDelete",
|
event: "messageDelete",
|
||||||
|
disabled: true,
|
||||||
|
|
||||||
async execute(message: Message) {
|
async execute(message: Message) {
|
||||||
if (message.channel.type !== ChannelType.GuildText) return
|
if (message.channel.type !== ChannelType.GuildText) return
|
||||||
|
|||||||
@@ -6,5 +6,6 @@ export default interface Event {
|
|||||||
description: string
|
description: string
|
||||||
type: "event"
|
type: "event"
|
||||||
event: keyof ClientEvents
|
event: keyof ClientEvents
|
||||||
|
disabled?: boolean
|
||||||
execute(...args: any[]): void
|
execute(...args: any[]): void
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ export default function loadEvents(client: Client) {
|
|||||||
for (const eventFile of eventFiles) {
|
for (const eventFile of eventFiles) {
|
||||||
const eventPath = path.join(serverDir, eventDir, eventFile)
|
const eventPath = path.join(serverDir, eventDir, eventFile)
|
||||||
const event: Event = require(eventPath)
|
const event: Event = require(eventPath)
|
||||||
|
if (!event.disabled) {
|
||||||
client.on(event.event, event.execute)
|
client.on(event.event, event.execute)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user