# Event

implements IEvent

Creates a event.

Properties
Methods
  • name
  • type
  • run

# Import

import { Event } from 'discordkit';
const { Event } = require('discordkit');

# Constructor

new Event({
    name: keyof ClientEvents, // from discord.js
    type: EventType, // check enums
    run: (bot: Bot, ...args: any) => Promise<any> | any
});

# Properties

# .name

The name of the event.
Type: keyof ClientEvents


# .type

Will the event run once or every time?
Type: EventType


# Methods

# .run(bot, ...args)

It runs when the event is triggered.

Parameter Type Description
bot Bot Extended Discord.js client.
...args any Any Arg

Returns: Promise<any> | any