Added !stream command

This commit is contained in:
dbroqua 2020-01-07 09:55:55 +01:00
parent b395b4d835
commit a885a3208c
2 changed files with 18 additions and 0 deletions

View file

@ -193,6 +193,9 @@ const actions = (where, message, from) => {
case '!notifications': case '!notifications':
preferences.notifications(botSay, where, from, exploded) preferences.notifications(botSay, where, from, exploded)
break break
case '!stream':
botSay(where, `${process.env.RADIO_ALIAS} : ${process.env.PUBLIC_RADIO_STREAM}`)
break
default: default:
break break
} }

View file

@ -25,6 +25,9 @@ class Help {
case '!notifications': case '!notifications':
Help.showNotifications(say, where) Help.showNotifications(say, where)
break break
case '!stream':
Help.showStream(say, where)
break
default: default:
break break
} }
@ -37,10 +40,22 @@ class Help {
say(where, '!list <period> <artist/song>') say(where, '!list <period> <artist/song>')
say(where, '!help {command}') say(where, '!help {command}')
say(where, '!notifications <on/off/state>') say(where, '!notifications <on/off/state>')
say(where, '!stream')
} }
say(where, '__ END __') say(where, '__ END __')
} }
/**
* Fonction affichant l'aide sur la commande !stream
* @param {Function} say
* @param {String} where
* @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')
}
/** /**
* Fonction affichant l'aide sur les commandes !artist et !song * Fonction affichant l'aide sur les commandes !artist et !song
* @param {Function} say * @param {Function} say