Fixed bug

This commit is contained in:
dbroqua 2020-01-13 11:42:51 +01:00
parent d0d4ffef6d
commit 7f0f627512

View File

@ -58,36 +58,36 @@ class Help {
break break
} }
} else { } else {
this.say(say, where, 'IRC Radio Bot :: Help') Help.say(say, where, 'IRC Radio Bot :: Help')
if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!artist') !== -1) { if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!artist') !== -1) {
this.say(say, where, '!artist <add/del> {nom à sauvegarder si différent du morceau en cours}') Help.say(say, where, '!artist <add/del> {nom à sauvegarder si différent du morceau en cours}')
} }
if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!song') !== -1) { if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!song') !== -1) {
this.say(say, where, '!song <add/del> {nom à sauvegarder si différent du morceau en cours}') Help.say(say, where, '!song <add/del> {nom à sauvegarder si différent du morceau en cours}')
} }
if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!stats') !== -1) { if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!stats') !== -1) {
this.say(say, where, '!stats <period> {artist/song}') Help.say(say, where, '!stats <period> {artist/song}')
} }
if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!when') !== -1) { if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!when') !== -1) {
this.say(say, where, '!when <period> <artist/song>') Help.say(say, where, '!when <period> <artist/song>')
} }
if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!list') !== -1) { if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!list') !== -1) {
this.say(say, where, '!list <period> <artist/song>') Help.say(say, where, '!list <period> <artist/song>')
} }
if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!help') !== -1) { if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!help') !== -1) {
this.say(say, where, '!help {command}') Help.say(say, where, '!help {command}')
} }
if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!notifications') !== -1) { if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!notifications') !== -1) {
this.say(say, where, '!notifications <on/off/state>') Help.say(say, where, '!notifications <on/off/state>')
} }
if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!stream') !== -1) { if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!stream') !== -1) {
this.say(say, where, '!stream') Help.say(say, where, '!stream')
} }
if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!mute') !== -1) { if (allowedCmds[0] === 'ALL' || allowedCmds.indexOf('!mute') !== -1) {
this.say(say, where, '!mute <on/off/state>') Help.say(say, where, '!mute <on/off/state>')
} }
} }
this.say(say, where, '__ END __') Help.say(say, where, '__ END __')
} }
/** /**
@ -97,9 +97,9 @@ class Help {
* @param {Array} args * @param {Array} args
*/ */
static showStream (say, where, args) { static showStream (say, where, args) {
this.say(say, where, 'IRC Radio Bot :: Stream', false, true) Help.say(say, where, 'IRC Radio Bot :: Stream', false, true)
this.say(say, where, 'Affiche l\'url du flux radio pour ton player favoris', false, true) Help.say(say, where, 'Affiche l\'url du flux radio pour ton player favoris', false, true)
this.say(say, where, '!stream') Help.say(say, where, '!stream')
} }
/** /**
@ -109,11 +109,11 @@ class Help {
* @param {Array} args * @param {Array} args
*/ */
static showMute (say, where, args) { static showMute (say, where, args) {
this.say(say, where, 'IRC Radio Bot :: Mute') Help.say(say, where, 'IRC Radio Bot :: Mute')
this.say(say, where, 'Permet d\'activer ou de désactiver les messages publics du bot') Help.say(say, where, 'Permet d\'activer ou de désactiver les messages publics du bot')
this.say(say, where, '!mute on') Help.say(say, where, '!mute on')
this.say(say, where, '!mute off') Help.say(say, where, '!mute off')
this.say(say, where, '!mute state') Help.say(say, where, '!mute state')
} }
/** /**
@ -123,9 +123,9 @@ class Help {
* @param {Array} args * @param {Array} args
*/ */
static showArtistSong (say, where, args) { static showArtistSong (say, where, args) {
this.say(say, where, 'IRC Radio Bot :: Artist/Song') Help.say(say, where, 'IRC Radio Bot :: Artist/Song')
this.say(say, where, `${args[2]} add {[facultatif] nom} < Permet de rajouter une notification sur ${args[2] === '!artist' ? 'cet artiste' : 'ce morceau'}`) Help.say(say, where, `${args[2]} add {[facultatif] nom} < Permet de rajouter une notification sur ${args[2] === '!artist' ? 'cet artiste' : 'ce morceau'}`)
this.say(say, where, `${args[2]} del {[facultatif] nom} < Permet de supprimer une notification sur ${args[2] === '!artist' ? 'cet artiste' : 'ce morceau'}`) Help.say(say, where, `${args[2]} del {[facultatif] nom} < Permet de supprimer une notification sur ${args[2] === '!artist' ? 'cet artiste' : 'ce morceau'}`)
} }
/** /**
@ -134,17 +134,17 @@ class Help {
* @param {String} where * @param {String} where
*/ */
static showStats (say, where) { static showStats (say, where) {
this.say(say, where, 'IRC Radio Bot :: Stats') Help.say(say, where, 'IRC Radio Bot :: Stats')
this.say(say, where, 'Permet d\'afficher le nombre de passage à l\'antenne d\'un artiste/morceau sur une période donnée') Help.say(say, where, 'Permet d\'afficher le nombre de passage à l\'antenne d\'un artiste/morceau sur une période donnée')
this.say(say, where, '!stats day <title>') Help.say(say, where, '!stats day <title>')
this.say(say, where, '!stats week <title>') Help.say(say, where, '!stats week <title>')
this.say(say, where, '!stats month <title>') Help.say(say, where, '!stats month <title>')
this.say(say, where, '!stats year <title>') Help.say(say, where, '!stats year <title>')
this.say(say, where, '!stats lastday <title>') Help.say(say, where, '!stats lastday <title>')
this.say(say, where, '!stats lastweek <title>') Help.say(say, where, '!stats lastweek <title>')
this.say(say, where, '!stats lastmonth <title>') Help.say(say, where, '!stats lastmonth <title>')
this.say(say, where, '!stats lastyear <title>') Help.say(say, where, '!stats lastyear <title>')
this.say(say, where, 'Si <title> n\'est pas spécifie la stats concerne le nombre d\'artistes différents pour cette période') Help.say(say, where, 'Si <title> n\'est pas spécifie la stats concerne le nombre d\'artistes différents pour cette période')
} }
/** /**
@ -153,16 +153,16 @@ class Help {
* @param {String} where * @param {String} where
*/ */
static showWhen (say, where) { static showWhen (say, where) {
this.say(say, where, 'IRC Radio Bot :: When') Help.say(say, where, 'IRC Radio Bot :: When')
this.say(say, where, 'Permet d\'afficher la dernier passage d\'un artiste/morceau sur une période donnée') Help.say(say, where, 'Permet d\'afficher la dernier passage d\'un artiste/morceau sur une période donnée')
this.say(say, where, '!when day <title>') Help.say(say, where, '!when day <title>')
this.say(say, where, '!when week <title>') Help.say(say, where, '!when week <title>')
this.say(say, where, '!when month <title>') Help.say(say, where, '!when month <title>')
this.say(say, where, '!when year <title>') Help.say(say, where, '!when year <title>')
this.say(say, where, '!when lastday <title>') Help.say(say, where, '!when lastday <title>')
this.say(say, where, '!when lastweek <title>') Help.say(say, where, '!when lastweek <title>')
this.say(say, where, '!when lastmonth <title>') Help.say(say, where, '!when lastmonth <title>')
this.say(say, where, '!when lastyear <title>') Help.say(say, where, '!when lastyear <title>')
} }
/** /**
@ -171,16 +171,16 @@ class Help {
* @param {String} where * @param {String} where
*/ */
static showList (say, where) { static showList (say, where) {
this.say(say, where, 'IRC Radio Bot :: List') Help.say(say, where, 'IRC Radio Bot :: List')
this.say(say, where, 'Permet d\'afficher la liste des titres joués pour un artiste sr une période donnée') Help.say(say, where, 'Permet d\'afficher la liste des titres joués pour un artiste sr une période donnée')
this.say(say, where, '!list day <artist>') Help.say(say, where, '!list day <artist>')
this.say(say, where, '!list week <artist>') Help.say(say, where, '!list week <artist>')
this.say(say, where, '!list month <artist>') Help.say(say, where, '!list month <artist>')
this.say(say, where, '!list year <artist>') Help.say(say, where, '!list year <artist>')
this.say(say, where, '!list lastday <artist>') Help.say(say, where, '!list lastday <artist>')
this.say(say, where, '!list lastweek <artist>') Help.say(say, where, '!list lastweek <artist>')
this.say(say, where, '!list lastmonth <artist>') Help.say(say, where, '!list lastmonth <artist>')
this.say(say, where, '!list lastyear <artist>') Help.say(say, where, '!list lastyear <artist>')
} }
/** /**
@ -189,11 +189,11 @@ class Help {
* @param {String} where * @param {String} where
*/ */
static showNotifications (say, where) { static showNotifications (say, where) {
this.say(say, where, 'IRC Radio Bot :: Notifications') Help.say(say, where, 'IRC Radio Bot :: Notifications')
this.say(say, where, 'Permet d\'activer et de désactiver les notifications pour soit') Help.say(say, where, 'Permet d\'activer et de désactiver les notifications pour soit')
this.say(say, where, '!notifications off') Help.say(say, where, '!notifications off')
this.say(say, where, '!notifications off') Help.say(say, where, '!notifications off')
this.say(say, where, '!notifications state < Permet de voir si l\'on a désactivé ou non les notifications') Help.say(say, where, '!notifications state < Permet de voir si l\'on a désactivé ou non les notifications')
} }
} }