Module

MainApp

The Main App module houses the bot events, process events, and initializes the bot. It also handles new members and greets them.

View Source app.js, line 14

Methods

# inner createALogger(loggerName, loggerLabelopt, handleRejectionsExceptionsopt, LogToConsoleopt) → {winston.Logger}

Will create a default logger to use.
Parameters:
Name Type Attributes Default Description
loggerName String
loggerLabel String <optional>
'' usually a more readable logger name
handleRejectionsExceptions Boolean <optional>
false will handle rejections and exceptions if true
LogToConsole Boolean <optional>
false will log all levels to console if true

View Source app.js, line 310

winston.Logger

# async inner fixDMIssue(error, member, botGuild)

Will let the member know how to fix their DM issue.
Parameters:
Name Type Description
error Error the error
member Discord.GuildMember the member with the error
botGuild BotGuildModel

View Source app.js, line 415

Error if the given error is not a DM error

# inner getConfig(args) → {Map}

Returns the config settings depending on the command line args. Read command line args to know if prod, dev, or test and what server First arg is one of prod, dev or test the second is the test server, but the first one must be test
Parameters:
Name Type Description
args Array.<string>

View Source app.js, line 29

config settings
Map

# async inner greetNewMember(member, botGuild)

Greets a member!
Parameters:
Name Type Description
member Discord.GuildMember the member to greet
botGuild BotGuildModel

View Source app.js, line 360

Error if the user has server DMs off