Event

class Event<V extends keyof ClientEvents, T = unknown> implements EventInterface<T>

constructor(options: EventInterface<V, T>)

const { Event } = require("afkhandler");

module.exports = new Event({
  name: "guildMemberAdd", // event name
  once: false,
  // if the command only runs once
  run({ client, gadget }, member) {
    // run can be execute, callback, fire or emit
    console.log(`${member.user.username} joined a guild!`);
  },
});

Last updated

Was this helpful?