<commit_before>package fredboat.util;

import fredboat.FredBoat;
import java.util.List;
import net.dv8tion.jda.JDA;
import net.dv8tion.jda.entities.Guild;
import net.dv8tion.jda.entities.Role;
import net.dv8tion.jda.entities.User;

public class DiscordUtil {

    public static boolean isOtherBotPresent(Guild guild) {
        JDA jda = guild.getJDA();
        User other = jda.getUserById(FredBoat.OTHER_BOT_ID);
        return guild.getUsers().contains(other);
    }
    
    public static boolean isUserBotCommander(Guild guild, User user){
        List<Role> roles = guild.getRolesForUser(user);
        
        for(Role r : roles){
            if(r.getName().equals("Bot Commander")){
                return true;<commit_msg>Added more functions to DiscordUtil<commit_after>package fredboat.util;

import fredboat.FredBoat;
import java.util.List;
import net.dv8tion.jda.JDA;
import net.dv8tion.jda.entities.Guild;
import net.dv8tion.jda.entities.Role;
import net.dv8tion.jda.entities.User;

public class DiscordUtil {

    public static boolean isMainBot(){
        return (FredBoat.scopes & 0x100) != 0;
    }
    
    public static boolean isMusicBot(){
        return (FredBoat.scopes & 0x010) != 0;
    }
    
    public static boolean isSelfBot(){
        return (FredBoat.scopes & 0x001) != 0;
    }
    
    public static boolean isMainBotPresent(Guild guild) {
        JDA jda = guild.getJDA();
        User other = jda.getUserById(FredBoat.MAIN_BOT_ID);
        return guild.getUsers().contains(other);
    }
    
    public static boolean isMusicBotPresent(Guild guild) {
        JDA jda = guild.getJDA();
        User other = jda.getUserById(FredBoat.MUSIC_BOT_ID);
        return guild.getUsers().contains(other);
    }
    
    public static boolean isUserBotCommander(Guild guild, User user){
        List<Role> roles = guild.getRolesForUser(user);
        
        for(Role r : roles){
            if(r.getName().equals("Bot Commander")){
                return true;
{'fraction_non_alphanumeric': 0.10714285714285714, 'fraction_numerical': 0.011569416498993963, 'mean_word_length': 2.8471953578336557, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3007963', 'n_tokens_mistral': 691, 'n_tokens_neox': 649, 'n_words': 134}