forked from notnull/apradiobot
add help
This commit is contained in:
parent
1cac760234
commit
1736ed2443
@ -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.')
|
||||
|
Loading…
Reference in New Issue
Block a user