Discord

This is the Base Discord Router Object.

new Discord()
Instance Members
ChatHandler()

Start

This function accepts options and starts the Bot.

Start(options: object)
Parameters
options (object) [description]
Throws
  • Error: If there is any Errors within Options.

BotHandler

This function setups the Base Ready/Disconnect Events up with the Relay.

BotHandler()

Discord#ready

Sends Ready out to the Plugins. When the Bot is online!

Discord#ready

Discord#disconnected

Sends Disconnected out to the Plugins. When the bot is offline!

Discord#disconnected

Discord#cmd

Event for the Triggering of a Command utilizing the Trigger String from Options.

Discord#cmd
Properties
cmd (string) : Is the Command without the Trigger String from Options.
args (array) : Array of Strings from the Message's Content.
message (object) : Contains the Discord.js Message Object to reply, etc.

Discord#*

This is to Handle Events Emitted from a Event Directly, using EventEmitter2. Transfering them to the Base Instance of the Object.

Discord#*
Properties
null (dynamic) :
    • Allows for accepting any Event & Amount of Arguments needed, and relay them to the main Instance of the Object.

Discord#*

This allows for sending Direct Events to the Instance of the Object.

Discord#*
Parameters
event (string) The name of the Event to Send to the Object.
Returns
dynamic:
    • Dyanmic amount of Arguments.

monitorReactions

Toggles on the Monitoring of Reactions on Messages for Plugins.

monitorReactions()

Discord#messageReactionAdd

Handles the Events for Message Reactions from Discord.js

Discord#messageReactionAdd
Properties
reaction (object) : Information for the Reaction placed on a Message.
user (object) : Information for the User who did the Reaction.

Discord#messageReactionRemove

Handles the Events for Message Reactions from Discord.js

Discord#messageReactionRemove
Properties
reaction (object) : Information for the Reaction placed on a Message.
user (object) : Information for the User who did the Reaction.

monitorMembers

Toggles on the Monitoring of Members Join/Part on a Server for Plugins.

monitorMembers()

Discord#guildMemberRemove

Handles the Events for Guild Members Join/Part the Server from Discord.js

Discord#guildMemberRemove
Properties
member (object) : Information for the Member who Left the Server.

Discord#guildMemberAdd

Handles the Events for Guild Members Join/Part the Server from Discord.js

Discord#guildMemberAdd
Properties
member (object) : Information for the Member who Joined the Server.

monitorGuilds

Toggles on the Monitoring of Bot joining/parting Servers for Plugins.

monitorGuilds()

Discord#guildCreate

Handles the Events for Joining a Server from Discord.js

Discord#guildCreate
Properties
guild (object) : Information for the Guild that the Bot Joined.

Discord#guildDelete

Handles the Events for Parting a Server from Discord.js

Discord#guildDelete
Properties
guild (object) : Information for the Guild that the Bot Left.

setActivity

This is to Set the Bot's Activity in Discord.js

setActivity(title: string, type: string)
Parameters
title (string) Title in which to Set the Activity of.
type (string) Type of Activity

Restart

Restarts the Bot if the Bot is currently Connected, or Simply Logs the Bot back-in.

Restart()

ReloadPlugins

Reloads all the Plugins associated to the Bot.

ReloadPlugins()

Login

Logs the Bot in.

Login()