GCommands
GCommands Legacy
Documentation open in new window
GitHub open in new window
GCommands Legacy
Documentation open in new window
GitHub open in new window
      • Theme

    Home

    • Introduction
    • Requesting more content
    • What's new

    Getting started

    • Installing Node.js and GCommands
    • Making a basic bot

    Commands

    • Getting started
    • Creating your first command
    • Using arguments in commands
    • Using subcommands
    • Using the command builders
    • Additional Features

    Interactions

    • Context Menus

    Events

    • Setup
    • Creating a event
    • Using the event builder
    • More Events

    Components

    • Setup
    • Creating a component

    Database

    • Setup
    • Guild Prefix
    • Guild Language

    Other

    • Using a custom language file
    • Inhibitor
    • Mentions
    • The alwaysObtain option in commands

    Common questions

    • What are all the objects in the first argument of a command?
    • I keep getting the error .guild is not defined
    • I keep getting the error 403 Missing Access

    Additionals

    • Updating from v7 to v8
    • Updating from v6 to v7
    • Updating from v5 to v6
    • Updating from v4 to v5
    • Updating from v3 to v4
    • Updating from v2 to v3

# Using the event builder

The EventOptionsBuilder can be used to create EventOptions, like the name of the event.

const { Event, EventOptionsBuilder } = require("gcommands")

module.exports = class extends Event {
    constructor(client) {
        super(client, new EventOptionsBuilder()
            .setName('messageCreate')
            .setOnce(false)
            .setWs(false)
        )
    }
};
1
2
3
4
5
6
7
8
9
10
11
Edit this page open in new window
Last Updated: 10/2/2022, 10:35:07 AM

← Creating a event More Events →