Type Definitions
- 
ArgData
- 
    
    Data for arguments that go into a command Properties:Name Type Attributes Default Description ArgData.nameString The name of the argument ArgData.mandBoolean <optional> 
 false Whether the argument is mandatory for the command to work or not ArgData.delimString <optional> 
 ' ' The delimiter (The character(s) that separate(s) it from the argument after it) for the argument ArgData.typeString <optional> 
 'string' The type of argument ExampleTypes: `string` - A regular string `number` - A number is parsed from the supplied argument `user` - From a username or mention, the Eris.User instance is supplied to the action `channel` - From a name or mention, the Eris.Channel instance is supplied to the action
- 
    
        AwaitAction(data) → {Array<CommandResults>|CommandResults|Array<String>|String}
- 
    
    The await action. Parameters:Name Type Description dataAwaitData Data passed from the handler 
- 
AwaitData
- 
    
    The object passed to a command action Properties:Name Type Description AwaitData.agentAgent The agent managing the bot AwaitData.clientEris.Client The Eris client AwaitData.commandsMap<String, Command> The list of bot commands AwaitData.replacersMap<String, Replacer> The list of bot replacers AwaitData.msgEris.Message The message sent by the user AwaitData.argsArray<String> The arguments supplied by the user AwaitData.attachmentsObject User-supplied data that is passed to commands AwaitData.triggerResponseEris.Message The bot's response to the message that initiated the await 
- 
BuildHelpReturnObject
- 
    
    An object returned by the agent's buildHelp method (Properties may vary based on what was supplied to the method) Properties:Name Type Description embedObject | undefined If embed data was supplied, the resulting help menu in a Discord embed format reactInterfaceReactInterface | undefined If embed data was supplied and the help menu is more than one page, a react interface to scroll the help menu pagesArray<String> The pages of the help menu. Only one is displayed in the embed and it's chosen by the page parameter (It's standard practice to build a new help menu for every command initiation) 
- 
    
        CancelFunction(wait)
- 
    
    The code that runs once an await is cancelled Parameters:Name Type Description waitAwait The await 
- 
    
        CheckFunction(msg, content) → {Boolean}
- 
    
    The condition to be met for the await to trigger Parameters:Name Type Description msgEris.Message The message object, but if a prefix is required, the message content will not include the prefix contentString The message content (processed by command handler (DO NOT USE msg.content))Returns:Boolean -Whether the message meets the await requirements 
- 
    
        CommandAction(data) → {Array<CommandResults>|CommandResults|Array<String>|String}
- 
    
    The command action Parameters:Name Type Description dataCommandData Data passed from the handler 
- 
CommandData
- 
    
    The object passed to a command action Properties:Name Type Description CommandData.agentAgent The agent managing the bot CommandData.clientEris.Client The Eris client CommandData.commandsMap<String, Command> The list of bot commands CommandData.replacersMap<String, Replacer> The list of bot replacers CommandData.msgEris.Message The message sent by the user CommandData.argsArray<(String|Number|Eris.Channel|Eris.User)> The arguments supplied by the user CommandData.attachmentsObject User-supplied data that is passed to commands 
- 
CommandHandlerResult
- 
    
    Result of a handled command Properties:Name Type Description CommandHandlerResult.optionsObject Additional options resulting from the command PropertiesName Type Description channelsArray<String> The IDs of the channels the responses were sent to awaitsArray<Await> A list of actions that are awaited after the results are processed reactInterfaceReactInterface A react interface that is bound to the resulting message deleteAfterNumber How long until the response is deleted CommandHandlerResult.responsesArray<Eris.Message> The resulting responses of the command 
- 
CommandHandlerResultList
- 
    
    Object returned by the handle method Properties:Name Type Description CommandHandlerResultList.commandCommand | Await The object of the command called CommandHandlerResultList.resultsArray<CommandHandlerResult> The results of every message sent 
- 
CommandResults
- 
    
    Object returned by a command action Properties:Name Type Attributes Default Description CommandResults.contentString <optional> 
 The resulting message content sent by the bot CommandResults.embedEris.Embed <optional> 
 The resulting embed sent by the bot CommandResults.fileBuffer <optional> 
 The resulting file sent by the bot CommandResults.optionsObject <optional> 
 {} Options for the response message PropertiesName Type Attributes Description channelsArray<String> | String <optional> 
 The channel IDs to send the resulting messages. By default, it's the same channel the executing message was sent awaitsArray<Await> | Await <optional> 
 An action or list of actions that are awaited after the results are processed reactInterfaceReactInterface <optional> 
 A react interface that is bound to the resulting message deleteAfterNumber <optional> 
 The number of milliseconds to wait before deleting the response 
- 
GuildData
- 
    
    
    
    Properties:Name Type Description guildIDObject The ID of the guild mapped to its data PropertiesName Type Description permissionsPermissionList The authority levels of roles in a guild prefixString The custom server-side prefix for the guild 
- 
    
        Middleware(msg, member, command)
- 
    
    
    
    
    
    Parameters:Name Type Description msgEris.Message The message memberEris.Member The subject member of the guild commandCommand | ReactCommand The command 
- 
Normalized
- 
    
    Normalized message content Properties:Name Type Description contentString The processed content prefixedBoolean Whether the content was prefixed or not (Bot mention counts) (Always returns true if message channel is DM channel) 
- 
PermissionList
- 
    
    A list of permissions for each role of a guild Properties:Name Type Description roleIDNumber The ID of the role mapped with its authority level 
- 
    
        PostMessageFunction(msg, results)
- 
    
    A function that runs after every message whether it triggers a command or not Parameters:Name Type Description msgEris.Message The message that triggered the command resultsCommandHandlerResults The results of the command 
- 
    
        PostPermissionFunction(guild, role, level, oldLevel)
- 
    
    A function that runs after a permission is changed Parameters:Name Type Description guildString The ID of the guild roleString The ID of the role being altered levelNumber The new authority level of the role oldLevelNumber The old authority level of the role 
- 
    
        PostPrefixFunction(guild, prefix, oldPrefix)
- 
    
    A function that runs after a guild prefix is changed Parameters:Name Type Description guildString The ID of the guild prefixString The new prefix oldPrefixString The old prefix of the guild 
- 
    
        PostReactionFunction(msg, emoji, user, results)
- 
    
    A function that runs after every reaction whether it triggers a react command or not Parameters:Name Type Description msgEris.Message The message reacted on emojiObject The data of the emoji reacted with userEris.User The user who reacted resultsReactionHandlerResults The results of the react command 
- 
Prefix
- 
    
    
    
- 
PrefixList
- 
    
    A list of prefixes for each guild supplied to the Agent. It is mapped with a guild's ID equalling its prefix Properties:Name Type Description guildIDPrefix Example{ '463886367496339458': '>' }
- 
    
        reactCommandAction(data) → {Array<CommandResults>|CommandResults|Array<String>|String}
- 
    
    The react command action Parameters:Name Type Description dataReactCommandData Data passed from the handler 
- 
ReactCommandData
- 
    
    The object passed to a react command action Properties:Name Type Description ReactCommandData.agentAgent The agent managing the bot ReactCommandData.clientEris.Client The Eris client ReactCommandData.reactCommandsMap<String, ReactCommand> The list of bot react commands ReactCommandData.msgEris.Message The message reacted on ReactCommandData.emojiString The emoji reacted with ReactCommandData.userEris.User The user who reacted ReactCommandData.attachmentsObject User-supplied data that is passed to commands ReactCommandData.parentInterfaceReactInterface If the react command was a button, the interface it was a part of 
- 
ReactionHandlerResult
- 
    
    Result of a handled react command Properties:Name Type Description ReactionHandlerResult.optionsObject Additional options resulting from the react command PropertiesName Type Description channelsArray<String> The ID of the channel the response was sent to awaitsArray<Await> A list of actions that are awaited after the results are processed reactInterfaceReactInterface A react interface that is bound to the resulting message deleteAfterNumber How long until the response is deleted ReactionHandlerResult.responsesArray<Eris.Message> The resulting responses of the react command 
- 
ReactionHandlerResultList
- 
    
    Object returned by the handle method Properties:Name Type Description ReactionHandlerResultList.commandCommand The command that was triggered ReactionHandlerResultList.parentInterfaceReactInterface If the command was an interface button, the interface it was a part of ReactionHandlerResultList.resultsArray<ReactionHandlerResult> The results of every message sent 
- 
    
        ReplacerAction(data) → {String}
- 
    
    The replacer action Parameters:Name Type Description dataObject The data passed to the replacer Returns:String -The content to inject Properties:Name Type Description data.contentString The content of the message data.captureString What was captured in the replacer braces data.argsArray<(String|Number|Eris.User|Eris.Channel)> The arguments provided for the replacer 
- 
    
        StatusMessageFunction(editStatus, agent, shard)
- 
    
    The status for the bot. It's a callback function for each shard Parameters:Name Type Description editStatusEris.Shard.editStatus The setStatus function from the Eris client agentAgent The agent shardNumber The Eris shard the status is being applied to