diff options
| author | Brandon <bwaggone@umich.edu> | 2018-04-14 15:57:40 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-14 15:57:40 -0400 | 
| commit | 71238de0c1d63f18610c80222e587944ff5bf206 (patch) | |
| tree | 3786e817b37b0be9ae1a7d2bfc3f5080869bad0d /src/main/java/soundchan | |
| parent | e983b51b8c125663d8b1401d559d6b578d8f156d (diff) | |
| parent | 70f6beee0fb9569e8549752e627929ae506c5e0c (diff) | |
| download | SoundChan-71238de0c1d63f18610c80222e587944ff5bf206.tar.gz SoundChan-71238de0c1d63f18610c80222e587944ff5bf206.tar.bz2 SoundChan-71238de0c1d63f18610c80222e587944ff5bf206.zip | |
Merge pull request #6 from bwaggone/feature/add-help
Feature/add help
Diffstat (limited to 'src/main/java/soundchan')
| -rw-r--r-- | src/main/java/soundchan/BotListener/BotListener.java | 20 | ||||
| -rw-r--r-- | src/main/java/soundchan/BotListener/Commands.java | 3 | 
2 files changed, 20 insertions, 3 deletions
| diff --git a/src/main/java/soundchan/BotListener/BotListener.java b/src/main/java/soundchan/BotListener/BotListener.java index 044625d..fe148ce 100644 --- a/src/main/java/soundchan/BotListener/BotListener.java +++ b/src/main/java/soundchan/BotListener/BotListener.java @@ -132,7 +132,6 @@ public class BotListener extends ListenerAdapter{                  }else if(enumCommand == Commands.pause){                      // Pause the song/sound in the queue                          pauseTrack(channel); -                  }else if(enumCommand == Commands.unpause){                      // Unpause the song/sound in the queue                      unpauseTrack(channel); @@ -142,9 +141,10 @@ public class BotListener extends ListenerAdapter{                      printCurrentlyPlaying(channel);                  }else if(enumCommand == Commands.summon){                      connectToUserVoiceChannel(monitoredGuild.getAudioManager(), event.getMember().getEffectiveName()); +                }else if(enumCommand == Commands.help){ +                    help(channel);                  } -              }          } @@ -249,6 +249,22 @@ public class BotListener extends ListenerAdapter{          channel.sendMessage("Skipped to next track.").queue();      } +    private void help(final MessageChannel channel) { +        String printMessage = "List of commands:\n ```" + +                "!<sound>     - plays a sound\n" + +                "~play <URL>  - plays audio from link\n" + +                "~volume #    - sets the volume to the number as a percentage \n" + +                "~pause       - pauses the playing audio\n" + +                "~unpause     - unpauses the audio\n" + +                "~skip        - skips to the next song in queue\n" + +                "~list queue  - prints out the names of the songs in the queue\n" + +                "~list sounds - prints out the names of the sounds available\n" + +                "~playingnow  - prints out the name of the currently playing song\n" + +                "~summon      - brings SoundChan to the voice channel of the summoner\n" + +                "~help        - prints out this help message ```"; +        channel.sendMessage(printMessage).queue(); +    } +      private static void connectToFollowingVoiceChannel(AudioManager audioManager) {          if(!audioManager.isConnected()) { diff --git a/src/main/java/soundchan/BotListener/Commands.java b/src/main/java/soundchan/BotListener/Commands.java index 1a06436..e054de1 100644 --- a/src/main/java/soundchan/BotListener/Commands.java +++ b/src/main/java/soundchan/BotListener/Commands.java @@ -11,5 +11,6 @@ public enum Commands {      skip,      list,      playingnow, -    summon +    summon, +    help  } | 
