// Path: src/main/java/stream/flarebot/flarebot/util/Constants.java
// public class Constants {
// 
//     public static final long OFFICIAL_GUILD = 226785954537406464L;
//     private static final String FLAREBOT_API = "https://api.flarebot.stream";
//     private static final String FLAREBOT_API_DEV = "http://localhost:8880";
//     public static final String INVITE_URL = "https://discord.gg/TTAUGvZ";
//     public static final String INVITE_MARKDOWN = "[Support Server](" + INVITE_URL + ")";
// 
//     public static final long DEVELOPER_ID = 226788297156853771L;
//     public static final long ADMINS_ID = 434438873565888542L;
//     public static final long CONTRIBUTOR_ID = 272324832279003136L;
// 
//     private static final String FLARE_TEST_BOT_CHANNEL = "242297848123621376";
//     public static final char COMMAND_CHAR = '_';
//     public static final String COMMAND_CHAR_STRING = String.valueOf(COMMAND_CHAR);
// 
//     @Deprecated
//     public static Guild getOfficialGuild() {
//         return Getters.getGuildById(OFFICIAL_GUILD);
//     }
// 
//     public static TextChannel getErrorLogChannel() {
//         return (FlareBot.instance().isTestBot() ?
//                 Getters.getChannelById(Constants.FLARE_TEST_BOT_CHANNEL) :
//                 Getters.getChannelById("226786557862871040"));
//     }
// 
//     public static TextChannel getGuildLogChannel() {
//         return (FlareBot.instance().isTestBot() ?
//                 Getters.getChannelById(Constants.FLARE_TEST_BOT_CHANNEL) :
//                 Getters.getChannelById("260401007685664768"));
//     }
// 
//     private static TextChannel getEGLogChannel() {
//         return (FlareBot.instance().isTestBot() ?
//                 Getters.getChannelById(Constants.FLARE_TEST_BOT_CHANNEL) :
//                 Getters.getChannelById("358950369642151937"));
//     }
// 
//     public static void logEG(String eg, Command command, Guild guild, User user) {
//         EmbedBuilder builder = new EmbedBuilder().setTitle("Found `" + eg + "`")
//                 .addField("Guild", guild.getId() + " (`" + guild.getName() + "`) ", true)
//                 .addField("User", user.getAsMention() + " (`" + user.getName() + "#" + user.getDiscriminator() + "`)", true)
//                 .setTimestamp(LocalDateTime.now(Clock.systemUTC()));
//         if (command != null) builder.addField("Command", command.getCommand(), true);
//         Constants.getEGLogChannel().sendMessage(builder.build()).queue();
//     }
// 
//     public static TextChannel getImportantLogChannel() {
//         return (FlareBot.instance().isTestBot() ?
//                 Getters.getChannelById(Constants.FLARE_TEST_BOT_CHANNEL) :
//                 Getters.getChannelById("358978253966278657"));
//     }
// 
//     public static String getAPI() {
//         return FlareBot.instance().isTestBot() ? FLAREBOT_API_DEV : FLAREBOT_API;
//     }
// }


import net.dv8tion.jda.bot.sharding.ShardManager;
import net.dv8tion.jda.core.JDA;
import net.dv8tion.jda.core.entities.Emote;
import net.dv8tion.jda.core.entities.Guild;
import net.dv8tion.jda.core.entities.Role;
import net.dv8tion.jda.core.entities.SelfUser;
import net.dv8tion.jda.core.entities.TextChannel;
import net.dv8tion.jda.core.entities.User;
import net.dv8tion.jda.core.entities.VoiceChannel;
import net.dv8tion.jda.core.exceptions.ErrorResponseException;
import net.dv8tion.jda.core.utils.cache.SnowflakeCacheView;
import stream.flarebot.flarebot.util.Constants;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
    public static long getActiveVoiceChannels() {
        return getShardManager().getGuildCache().stream()
                .filter(c -> c.getAudioManager().getConnectedChannel() != null)
                .map(g -> flareBot().getMusicManager().getPlayer(g.getId()))
                .filter(p -> p != null && p.getPlayingTrack() != null && !p.getPaused())
                .count();
    }

    public static int getSongsQueued() {
        return flareBot().getMusicManager().getPlayers().stream()
                .mapToInt(p -> p.getPlaylist().size())
                .sum();
    }

    // Other
    public static List<JDA> getShards() {
        return flareBot().getShardManager().getShards();
    }

    @Nonnull
    public static SelfUser getSelfUser() {
        return flareBot().getClient().getSelfUser();
    }

    @Nonnull
    public static ShardManager getShardManager() {
        return flareBot().getShardManager();
    }

    public static Guild getOfficialGuild() {
// Path: src/main/java/stream/flarebot/flarebot/util/Constants.java
// public class Constants {
// 
//     public static final long OFFICIAL_GUILD = 226785954537406464L;
//     private static final String FLAREBOT_API = "https://api.flarebot.stream";
//     private static final String FLAREBOT_API_DEV = "http://localhost:8880";
//     public static final String INVITE_URL = "https://discord.gg/TTAUGvZ";
//     public static final String INVITE_MARKDOWN = "[Support Server](" + INVITE_URL + ")";
// 
//     public static final long DEVELOPER_ID = 226788297156853771L;
//     public static final long ADMINS_ID = 434438873565888542L;
//     public static final long CONTRIBUTOR_ID = 272324832279003136L;
// 
//     private static final String FLARE_TEST_BOT_CHANNEL = "242297848123621376";
//     public static final char COMMAND_CHAR = '_';
//     public static final String COMMAND_CHAR_STRING = String.valueOf(COMMAND_CHAR);
// 
//     @Deprecated
//     public static Guild getOfficialGuild() {
//         return Getters.getGuildById(OFFICIAL_GUILD);
//     }
// 
//     public static TextChannel getErrorLogChannel() {
//         return (FlareBot.instance().isTestBot() ?
//                 Getters.getChannelById(Constants.FLARE_TEST_BOT_CHANNEL) :
//                 Getters.getChannelById("226786557862871040"));
//     }
// 
//     public static TextChannel getGuildLogChannel() {
//         return (FlareBot.instance().isTestBot() ?
//                 Getters.getChannelById(Constants.FLARE_TEST_BOT_CHANNEL) :
//                 Getters.getChannelById("260401007685664768"));
//     }
// 
//     private static TextChannel getEGLogChannel() {
//         return (FlareBot.instance().isTestBot() ?
//                 Getters.getChannelById(Constants.FLARE_TEST_BOT_CHANNEL) :
//                 Getters.getChannelById("358950369642151937"));
//     }
// 
//     public static void logEG(String eg, Command command, Guild guild, User user) {
//         EmbedBuilder builder = new EmbedBuilder().setTitle("Found `" + eg + "`")
//                 .addField("Guild", guild.getId() + " (`" + guild.getName() + "`) ", true)
//                 .addField("User", user.getAsMention() + " (`" + user.getName() + "#" + user.getDiscriminator() + "`)", true)
//                 .setTimestamp(LocalDateTime.now(Clock.systemUTC()));
//         if (command != null) builder.addField("Command", command.getCommand(), true);
//         Constants.getEGLogChannel().sendMessage(builder.build()).queue();
//     }
// 
//     public static TextChannel getImportantLogChannel() {
//         return (FlareBot.instance().isTestBot() ?
//                 Getters.getChannelById(Constants.FLARE_TEST_BOT_CHANNEL) :
//                 Getters.getChannelById("358978253966278657"));
//     }
// 
//     public static String getAPI() {
//         return FlareBot.instance().isTestBot() ? FLAREBOT_API_DEV : FLAREBOT_API;
//     }
// }


// Path: src/main/java/stream/flarebot/flarebot/Getters.java
import net.dv8tion.jda.bot.sharding.ShardManager;
import net.dv8tion.jda.core.JDA;
import net.dv8tion.jda.core.entities.Emote;
import net.dv8tion.jda.core.entities.Guild;
import net.dv8tion.jda.core.entities.Role;
import net.dv8tion.jda.core.entities.SelfUser;
import net.dv8tion.jda.core.entities.TextChannel;
import net.dv8tion.jda.core.entities.User;
import net.dv8tion.jda.core.entities.VoiceChannel;
import net.dv8tion.jda.core.exceptions.ErrorResponseException;
import net.dv8tion.jda.core.utils.cache.SnowflakeCacheView;
import stream.flarebot.flarebot.util.Constants;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

    public static long getActiveVoiceChannels() {
        return getShardManager().getGuildCache().stream()
                .filter(c -> c.getAudioManager().getConnectedChannel() != null)
                .map(g -> flareBot().getMusicManager().getPlayer(g.getId()))
                .filter(p -> p != null && p.getPlayingTrack() != null && !p.getPaused())
                .count();
    }

    public static int getSongsQueued() {
        return flareBot().getMusicManager().getPlayers().stream()
                .mapToInt(p -> p.getPlaylist().size())
                .sum();
    }

    // Other
    public static List<JDA> getShards() {
        return flareBot().getShardManager().getShards();
    }

    @Nonnull
    public static SelfUser getSelfUser() {
        return flareBot().getClient().getSelfUser();
    }

    @Nonnull
    public static ShardManager getShardManager() {
        return flareBot().getShardManager();
    }

    public static Guild getOfficialGuild() {
        return getGuildById(Constants.OFFICIAL_GUILD);