Add single repeat (#359)
* Add single repeat mode * Toggle between NONE and REPEAT modes when no argument has been given * Allow single as repeat mode * Add one to the arguments * Add backwards comparability for old versions of MusicBot. * Use JSONObject#getEnum for parsing repeat mode * Rename repeat modes & fix repeat one not repeating properly * Add copyright notice & author to RepeatMode * Fix spacing in SettingsManager * Rename REPEAT_ONE to One in RepeatMode * Rename repeat to repeat_mode * Use variable on track end in AudioHandler & update RepeatMode & its usages * Use user friendly name in RepeatCmd * Remove unused constants * Fix spacing in SettingsManager * Rename repeat modes to off/all/single respectively
This commit is contained in:
@@ -18,6 +18,7 @@ package com.jagrosh.jmusicbot.commands.general;
|
||||
import com.jagrosh.jdautilities.command.Command;
|
||||
import com.jagrosh.jdautilities.command.CommandEvent;
|
||||
import com.jagrosh.jmusicbot.Bot;
|
||||
import com.jagrosh.jmusicbot.settings.RepeatMode;
|
||||
import com.jagrosh.jmusicbot.settings.Settings;
|
||||
import com.jagrosh.jmusicbot.utils.FormatUtil;
|
||||
import net.dv8tion.jda.api.EmbedBuilder;
|
||||
@@ -59,7 +60,9 @@ public class SettingsCmd extends Command
|
||||
+ "\nVoice Channel: " + (vchan == null ? "Any" : "**" + vchan.getName() + "**")
|
||||
+ "\nDJ Role: " + (role == null ? "None" : "**" + role.getName() + "**")
|
||||
+ "\nCustom Prefix: " + (s.getPrefix() == null ? "None" : "`" + s.getPrefix() + "`")
|
||||
+ "\nRepeat Mode: **" + (s.getRepeatMode() ? "On" : "Off") + "**"
|
||||
+ "\nRepeat Mode: " + (s.getRepeatMode() == RepeatMode.OFF
|
||||
? s.getRepeatMode().getUserFriendlyName()
|
||||
: "**"+s.getRepeatMode().getUserFriendlyName()+"**")
|
||||
+ "\nDefault Playlist: " + (s.getDefaultPlaylist() == null ? "None" : "**" + s.getDefaultPlaylist() + "**")
|
||||
)
|
||||
.setFooter(event.getJDA().getGuilds().size() + " servers | "
|
||||
|
||||
Reference in New Issue
Block a user