1
0
forked from notnull/apradiobot
This commit is contained in:
notnull 2019-12-21 21:43:36 -05:00
parent 1cac760234
commit 1736ed2443

View File

@ -35,6 +35,7 @@ bot.matchMessage(/^!playlist/, event => sendPlaylist(event))
bot.matchMessage(/^!request/, event => requestTrack(event))
bot.matchMessage(/^!search/, event => searchTrack(event))
bot.matchMessage(/^!skip/, event => sendSkipTrack(event))
bot.matchMessage(/^!help/, event => sendHelp(event))
bot.matchMessage(/^!np/, event => sendCurrentTrack(event))
const handleJoin = event => {
@ -59,6 +60,17 @@ const sendPlaylist = event => {
splitPlaylist.map(s => bot.say(event.nick, s))
}
const sendHelp = event => {
const help = [
'to search: !search "track name" artist "artist name" (artist and artist name optional)',
'to request: !request "track name" artist "artist name" (artist and artist name optional)',
'to skip current track: !skip',
"to view what's currently playing: !np",
'to view five upcoming tracks: !playlist',
]
help.map(h => bot.say(event.nick, h))
}
const sendCurrentTrack = event => {
const { error, track } = getCurrentTrack()
if (error) return event.reply('Something went wrong.')