@1-mute-loud
This commit is contained in:
parent
211a00ddaf
commit
9cf3131738
2 changed files with 102 additions and 57 deletions
125
libs/Help.js
125
libs/Help.js
|
@ -1,5 +1,9 @@
|
|||
|
||||
class Help {
|
||||
static helpSay (say, where, message) {
|
||||
say(where, message, true, true)
|
||||
}
|
||||
|
||||
/**
|
||||
* Fonction affichant l'aide générale
|
||||
* @param {Function} say
|
||||
|
@ -28,21 +32,25 @@ class Help {
|
|||
case '!stream':
|
||||
Help.showStream(say, where)
|
||||
break
|
||||
case '!mute':
|
||||
Help.showMute(say, where)
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
} else {
|
||||
say(where, 'IRC Radio Bot :: Help')
|
||||
say(where, '!artist <add/del> {nom à sauvegarder si différent du morceau en cours}')
|
||||
say(where, '!song <add/del> {nom à sauvegarder si différent du morceau en cours}')
|
||||
say(where, '!stats <period> {artist/song}')
|
||||
say(where, '!when <period> <artist/song>')
|
||||
say(where, '!list <period> <artist/song>')
|
||||
say(where, '!help {command}')
|
||||
say(where, '!notifications <on/off/state>')
|
||||
say(where, '!stream')
|
||||
this.say(say, where, 'IRC Radio Bot :: Help')
|
||||
this.say(say, where, '!artist <add/del> {nom à sauvegarder si différent du morceau en cours}')
|
||||
this.say(say, where, '!song <add/del> {nom à sauvegarder si différent du morceau en cours}')
|
||||
this.say(say, where, '!stats <period> {artist/song}')
|
||||
this.say(say, where, '!when <period> <artist/song>')
|
||||
this.say(say, where, '!list <period> <artist/song>')
|
||||
this.say(say, where, '!help {command}')
|
||||
this.say(say, where, '!notifications <on/off/state>')
|
||||
this.say(say, where, '!stream')
|
||||
this.say(say, where, '!mute <on/off/state>')
|
||||
}
|
||||
say(where, '__ END __')
|
||||
this.say(say, where, '__ END __')
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,8 +60,23 @@ class Help {
|
|||
* @param {Array} args
|
||||
*/
|
||||
static showStream (say, where, args) {
|
||||
say(where, 'IRC Radio Bot :: Stream')
|
||||
say(where, '!stream < Affiche l\'url du flux radio pour ton player favoris')
|
||||
this.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)
|
||||
this.say(say, where, '!stream')
|
||||
}
|
||||
|
||||
/**
|
||||
* Fonction affichant l'aide sur la commande !mute
|
||||
* @param {Function} say
|
||||
* @param {String} where
|
||||
* @param {Array} args
|
||||
*/
|
||||
static showMute (say, where, args) {
|
||||
this.say(say, where, 'IRC Radio Bot :: Mute')
|
||||
this.say(say, where, 'Permet d\'activer ou de désactiver les messages publics du bot')
|
||||
this.say(say, where, '!mute on')
|
||||
this.say(say, where, '!mute off')
|
||||
this.say(say, where, '!mute state')
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -63,9 +86,9 @@ class Help {
|
|||
* @param {Array} args
|
||||
*/
|
||||
static showArtistSong (say, where, args) {
|
||||
say(where, 'IRC Radio Bot :: Artist/Song')
|
||||
say(where, `${args[2]} add {[facultatif] nom} < Permet de rajouter une notification sur ${args[2] === '!artist' ? 'cet artiste' : 'ce morceau'}`)
|
||||
say(where, `${args[2]} del {[facultatif] nom} < Permet de supprimer une notification sur ${args[2] === '!artist' ? 'cet artiste' : 'ce morceau'}`)
|
||||
this.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'}`)
|
||||
this.say(say, where, `${args[2]} del {[facultatif] nom} < Permet de supprimer une notification sur ${args[2] === '!artist' ? 'cet artiste' : 'ce morceau'}`)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -74,17 +97,17 @@ class Help {
|
|||
* @param {String} where
|
||||
*/
|
||||
static showStats (say, where) {
|
||||
say(where, 'IRC Radio Bot :: Stats')
|
||||
say(where, 'Permet d\'afficher le nombre de passage à l\'antenne d\'un artiste/morceau sur une période donnée')
|
||||
say(where, '!stats day <title>')
|
||||
say(where, '!stats week <title>')
|
||||
say(where, '!stats month <title>')
|
||||
say(where, '!stats year <title>')
|
||||
say(where, '!stats lastday <title>')
|
||||
say(where, '!stats lastweek <title>')
|
||||
say(where, '!stats lastmonth <title>')
|
||||
say(where, '!stats lastyear <title>')
|
||||
say(where, 'Si <title> n\'est pas spécifie la stats concerne le nombre d\'artistes différents pour cette période')
|
||||
this.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')
|
||||
this.say(say, where, '!stats day <title>')
|
||||
this.say(say, where, '!stats week <title>')
|
||||
this.say(say, where, '!stats month <title>')
|
||||
this.say(say, where, '!stats year <title>')
|
||||
this.say(say, where, '!stats lastday <title>')
|
||||
this.say(say, where, '!stats lastweek <title>')
|
||||
this.say(say, where, '!stats lastmonth <title>')
|
||||
this.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')
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -93,16 +116,16 @@ class Help {
|
|||
* @param {String} where
|
||||
*/
|
||||
static showWhen (say, where) {
|
||||
say(where, 'IRC Radio Bot :: When')
|
||||
say(where, 'Permet d\'afficher la dernier passage d\'un artiste/morceau sur une période donnée')
|
||||
say(where, '!when day <title>')
|
||||
say(where, '!when week <title>')
|
||||
say(where, '!when month <title>')
|
||||
say(where, '!when year <title>')
|
||||
say(where, '!when lastday <title>')
|
||||
say(where, '!when lastweek <title>')
|
||||
say(where, '!when lastmonth <title>')
|
||||
say(where, '!when lastyear <title>')
|
||||
this.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')
|
||||
this.say(say, where, '!when day <title>')
|
||||
this.say(say, where, '!when week <title>')
|
||||
this.say(say, where, '!when month <title>')
|
||||
this.say(say, where, '!when year <title>')
|
||||
this.say(say, where, '!when lastday <title>')
|
||||
this.say(say, where, '!when lastweek <title>')
|
||||
this.say(say, where, '!when lastmonth <title>')
|
||||
this.say(say, where, '!when lastyear <title>')
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -111,16 +134,16 @@ class Help {
|
|||
* @param {String} where
|
||||
*/
|
||||
static showList (say, where) {
|
||||
say(where, 'IRC Radio Bot :: List')
|
||||
say(where, 'Permet d\'afficher la liste des titres joués pour un artiste sr une période donnée')
|
||||
say(where, '!list day <artist>')
|
||||
say(where, '!list week <artist>')
|
||||
say(where, '!list month <artist>')
|
||||
say(where, '!list year <artist>')
|
||||
say(where, '!list lastday <artist>')
|
||||
say(where, '!list lastweek <artist>')
|
||||
say(where, '!list lastmonth <artist>')
|
||||
say(where, '!list lastyear <artist>')
|
||||
this.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')
|
||||
this.say(say, where, '!list day <artist>')
|
||||
this.say(say, where, '!list week <artist>')
|
||||
this.say(say, where, '!list month <artist>')
|
||||
this.say(say, where, '!list year <artist>')
|
||||
this.say(say, where, '!list lastday <artist>')
|
||||
this.say(say, where, '!list lastweek <artist>')
|
||||
this.say(say, where, '!list lastmonth <artist>')
|
||||
this.say(say, where, '!list lastyear <artist>')
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -129,11 +152,11 @@ class Help {
|
|||
* @param {String} where
|
||||
*/
|
||||
static showNotifications (say, where) {
|
||||
say(where, 'IRC Radio Bot :: Notifications')
|
||||
say(where, 'Permet d\'activer et de désactiver les notifications pour soit')
|
||||
say(where, '!notifications off')
|
||||
say(where, '!notifications off')
|
||||
say(where, '!notifications state < Permet de voir si l\'on a désactivé ou non les notifications')
|
||||
this.say(say, where, 'IRC Radio Bot :: Notifications')
|
||||
this.say(say, where, 'Permet d\'activer et de désactiver les notifications pour soit')
|
||||
this.say(say, where, '!notifications off')
|
||||
this.say(say, where, '!notifications off')
|
||||
this.say(say, where, '!notifications state < Permet de voir si l\'on a désactivé ou non les notifications')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue