Diswrap.js
  • Diswrap.js
  • Installation
  • Example Bot
  • Beta Information
  • Usage Agreement of Diswrap.js Pro
  • Classes
    • Client
    • commandsBuilder
    • commandsManager
    • publishCommand
  • Types
    • Commands
    • Intents
    • SlashCommandLocale
    • SlashCommandOperations
    • SlashCommandOptionType
  • Definitions
    • clientOptions
Powered by GitBook
On this page
  • Properties
  • client
  • commands
  • customCommands
  • intents
  • token
  • Methods
  • commandsCreate
  • onEventRun
  • publishCommand
  1. Classes

Client

The main process that handles everything about the bot

PreviousUsage Agreement of Diswrap.js ProNextcommandsBuilder

Last updated 2 years ago

new Client(clientOptions)
Argument
Type
Description

clientOptions

The options for the client

Properties

client

Returns the client object of the bot, as returned by Discord.js

commands

Returns an object with information on loaded template commands

Object

customCommands

Returns an object with information on loaded custom commands

Object

intents

Returns the intents that the bot is using

Array

token

Returns the token used to log the bot in

String

Methods

commandsCreate

commandsCreate(commandBuilder, custom)
Argument
Required
Type
Description

commandBuilder

The object containing all the information about the command, derived from commandsBuilder class

custom

Function

The function is to run once the command is executed. This will override all the built-in actions to the template.

Returns: Object

onEventRun

onEventRun(event, callback)
Argument
Required
Type
Description

event

String

The name of the command

callback

Function

The description of the command, used for slash command registration

publishCommand

publishCommand(operation)
Argument
Required
Type
Description

operation

Number

The type contain an Object of all the available template commands' class.

The operation to perform on the command. | Use the module.

Client
Commands
commandsBuilder
clientOptions
commandsBuilder
SlashCommandOperations