<commit_before>package me.duncte123.skybot.commands;

import me.duncte123.skybot.Command;
import me.duncte123.skybot.utils.HelpEmbeds;
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;

public class HelpCommand extends Command {

    public final static String help = "shows a list of all the commands.";

    @Override
    public boolean called(String[] args, MessageReceivedEvent event) {
        // TODO Auto-generated method stub
        return true;
    }

    @Override
    public void action(String[] args, MessageReceivedEvent event) {


        event.getAuthor().openPrivateChannel().queue( (pc) -> {
            event.getTextChannel().sendMessage(event.getMember().getAsMention() +" check your DM's").queue();
            pc.sendMessage(HelpEmbeds.mainCommands).queue();
            pc.sendMessage(HelpEmbeds.musicCommands).queue();
            pc.sendMessage(HelpEmbeds.funCommands).queue();
            pc.sendMessage(HelpEmbeds.modCommands).queue();
        },
                err -> event.getChannel().sendMessage("ERROR: " + err.getMessage()).queue() );
    }

    @Override
    public String help() {
        // TODO Auto-generated method stub
        return help;
    }
}<commit_msg>Create failover for if the helpmessage fails to send<commit_after>package me.duncte123.skybot.commands;

import me.duncte123.skybot.Command;
import me.duncte123.skybot.utils.HelpEmbeds;
import net.dv8tion.jda.core.entities.TextChannel;
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;

public class HelpCommand extends Command {

    public final static String help = "shows a list of all the commands.";

    @Override
    public boolean called(String[] args, MessageReceivedEvent event) {
        // TODO Auto-generated method stub
        return true;
    }

    @Override
    public void action(String[] args, MessageReceivedEvent event) {


        event.getAuthor().openPrivateChannel().queue( (pc) -> {
            pc.sendMessage(HelpEmbeds.mainCommands).queue( msg -> {
                        pc.sendMessage(HelpEmbeds.musicCommands).queue();
                        pc.sendMessage(HelpEmbeds.funCommands).queue();
                        pc.sendMessage(HelpEmbeds.modCommands).queue();
                        event.getTextChannel().sendMessage(event.getMember().getAsMention() +" check your DM's").queue();
                    },
                    //When sending fails, send to the channel
                    err -> {
                        TextChannel currentChann = event.getTextChannel();
                        currentChann.sendMessage(HelpEmbeds.mainCommands).queue();
                        currentChann.sendMessage(HelpEmbeds.musicCommands).queue();
                        currentChann.sendMessage(HelpEmbeds.funCommands).queue();
                        currentChann.sendMessage(HelpEmbeds.modCommands).queue();
                        currentChann.sendMessage("Message could not be delivered to dm's and has been send in this channel.").queue();
                    }
            );
        },
                err -> event.getChannel().sendMessage("ERROR: " + err.getMessage()).queue()
        );
    }

    @Override
    public String help() {
        // TODO Auto-generated method stub
        return help;
    }
}
{'fraction_non_alphanumeric': 0.10934636530238241, 'fraction_numerical': 0.006414172266340868, 'mean_word_length': 2.3418367346938775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6985383', 'n_tokens_mistral': 880, 'n_tokens_neox': 842, 'n_words': 176}