added altprefix, songinstatus, and setstatus features

slight change to internals to reduce some bugs
This commit is contained in:
John Grosh
2017-08-18 15:43:20 -04:00
parent 0912de74e9
commit dddf4c8e38
19 changed files with 394 additions and 327 deletions
@@ -35,6 +35,7 @@ import com.jagrosh.jmusicbot.gui.GUI;
import com.jagrosh.jmusicbot.utils.FormatUtil;
import net.dv8tion.jda.core.JDA;
import net.dv8tion.jda.core.Permission;
import net.dv8tion.jda.core.entities.Game;
import net.dv8tion.jda.core.entities.Guild;
import net.dv8tion.jda.core.entities.Role;
import net.dv8tion.jda.core.entities.TextChannel;
@@ -149,6 +150,14 @@ public class Bot extends ListenerAdapter {
return handler;
}
public void resetGame()
{
if(config.getGame()==null || config.getGame().equalsIgnoreCase("none"))
jda.getPresence().setGame(null);
else
jda.getPresence().setGame(Game.of(config.getGame()));
}
private void updateTopic(Guild guild, AudioHandler handler)
{
TextChannel tchan = guild.getTextChannelById(getSettings(guild).getTextId());