diff --git a/src/irc-bot.js b/src/irc-bot.js index 9fb74a6..2ed70b7 100644 --- a/src/irc-bot.js +++ b/src/irc-bot.js @@ -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.')