mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-20 14:44:44 +12:00
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:
parent
c4a3120354
commit
5b8d535fd6
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue