# Base Event

A BaseEvent instance is the basic example of how an event should look like once it's been constructed. It should always supply a name for the event.

# Example of how to construct a BaseEvent correctly

(TS)

import { BaseEvent, AbrevioClient } from "abrevio";

export default class extends BaseEvent {

  constructor(client: AbrevioClient) {
      
    super(client, {
      name: "ready",
      enabled: true,
      event: "ready"
    });
  }

  async run() {

    console.log(
      "[DISCORD]: Established a successful WebSocket connection to Discord's Gateway"
    );
  }
}

(JS)

const { BaseEvent } = require("abrevio");

module.exports.default = class extends BaseEvent {

  constructor(client) {

    super(client, {
      name: "ready",
      enabled: true,
      event: "ready"
    });
  }

  async run() {

    console.log(
      "[DISCORD]: Established a successful WebSocket connection to Discord's gateway"
    );
  }
};