fix: Non-existing data property (#9544)

fix: not existed data prop

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Jaw0r3k 2023-05-07 21:39:43 +02:00 committed by GitHub
parent c4a3120354
commit 5b8d535fd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@ const eventFiles = await readdir(eventsPath).then((files) => files.filter((file)
for (const file of eventFiles) {
const event = (await import(join(eventsPath, file))).default;
client[event.data.once ? 'once' : 'on'](event.data.name, async (...args) => event.data.execute(...args));
client[event.once ? 'once' : 'on'](event.name, async (...args) => event.execute(...args));
}
void client.login();