Creates an event with the specified data and run function.
The event data.
The created event.
const myEvent = createEvent({ data: { name: 'ready', once: true }, run: (user, client, shard) => { client.logger.info(`Start ${user.username} on shard #${shard}`); }}); Copy
const myEvent = createEvent({ data: { name: 'ready', once: true }, run: (user, client, shard) => { client.logger.info(`Start ${user.username} on shard #${shard}`); }});
Creates an event with the specified data and run function.