aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/soundchan/LocalAudioManager.java
diff options
context:
space:
mode:
authorMatt Kohls <mattkohls13@gmail.com>2018-07-19 20:41:24 -0400
committerMatt Kohls <mattkohls13@gmail.com>2018-07-19 20:41:24 -0400
commit8641c37bc02a1e4234e521aa7e276ab450c116ec (patch)
tree4e16aa84be91e988c1dd96daecc9c92d5ebbe81e /src/main/java/soundchan/LocalAudioManager.java
parentd6aa077b1eda1ea5694dde0250b8b5fd21f114dd (diff)
downloadSoundChan-8641c37bc02a1e4234e521aa7e276ab450c116ec.tar.gz
SoundChan-8641c37bc02a1e4234e521aa7e276ab450c116ec.tar.bz2
SoundChan-8641c37bc02a1e4234e521aa7e276ab450c116ec.zip
Adding default for usersound and way to see loaded usersounds
Diffstat (limited to 'src/main/java/soundchan/LocalAudioManager.java')
-rw-r--r--src/main/java/soundchan/LocalAudioManager.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/main/java/soundchan/LocalAudioManager.java b/src/main/java/soundchan/LocalAudioManager.java
index e645fe7..80e3790 100644
--- a/src/main/java/soundchan/LocalAudioManager.java
+++ b/src/main/java/soundchan/LocalAudioManager.java
@@ -72,6 +72,21 @@ public class LocalAudioManager {
channel.sendMessage(toPrint).queue();
}
+ /**
+ * Lists users with sounds that will play when they join the voice channel
+ * @param channel Text channel messaged on
+ */
+ public void ListUserAudio(MessageChannel channel) {
+ Set<String> userSounds = usernameDict.keySet();
+ String toPrint = "The following users have sounds that will play when they join the voice channel:\n```";
+ for (String user : userSounds) {
+ String sound = usernameDict.get(user);
+ toPrint = toPrint + " * " + user + "\t" + sound.substring(0, sound.indexOf('.')) + "\n";
+ }
+ toPrint = toPrint + "```";
+ channel.sendMessage(toPrint).queue();
+ }
+
private void PopulateFiles(){
File folder = new File(filepath);
File[] listOfFiles = folder.listFiles();
@@ -122,6 +137,4 @@ public class LocalAudioManager {
}
return properties;
}
-
-
}