add MOTD support to help dialogue

This commit is contained in:
hgw 2023-10-02 02:11:26 +00:00
parent 483a77930f
commit fc2ff4c028

View File

@ -46,19 +46,28 @@ async function help(sub) {
}
if (sub === "default") {
if (config.misc.display_help_logo === 'true' ) {
var randomMOTD = config.motd.list[Math.floor(Math.random() * config.motd.list.length)];
consoleLog('[help.default] Logo enabled, including in output')
content.push(''+config.colours.help_logo+' ____ ___ ___ ____________ _________ __')
content.push(''+config.colours.help_logo+' / __ `__ \\/ _ \\/ ___/ ___/ / / / ___/ / / /')
content.push(''+config.colours.help_logo+' / / / / / / __/ / / /__/ /_/ / / / /_/ / ')
content.push(''+config.colours.help_logo+'/_/ /_/ /_/\\___/_/ \\___/\\__,_/_/ \\__, / ')
content.push(''+config.colours.help_logo+' /____/ ')
if (config.motd.enable == "true") {
content.push(''+config.colours.help_motd+' '+randomMOTD.padEnd(35)+''+config.colours.help_logo+'/____/ ')
} else if (config.motd.enable == "version" ) {
content.push(''+config.colours.help_motd+' '+config.motd.version.padEnd(35)+''+config.colours.help_logo+'/____/ ')
} else if (config.motd.enable == "false" || config.motd.emable != "true" || config.motd.enable != "version") {
content.push(''+config.colours.help_logo+' /____/ ')
}
} else if (config.misc.display_help_logo !== 'true') {
consoleLog('[help.default] Logo disabled, not including in output')
}
content.push('Mercury RSS Client - https://git.supernets.org/hogwart7/mercury')
content.push('Mercury RSS Client - https://git.supernets.org/hgw/mercury')
content.push('m!feed [USER/FEED/ALIAS] [ENTRIES] - Return the last x amount of entries from any RSS feed or your own saved feeds (if you have saved feeds)')
content.push("m!twitter [USER] [ENTRIES] - Return the last x amount of tweets from a particular user")
content.push("m!opt [CATEGORY] [OPTION] [VALUE] - Control bot options, see wiki for info on usage.")
content.push('m!help - Brings up this dialogue')
sendUpstream(content)
}
}