ad044 / navi

very cool bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

navi, help is truncated and doesn't show all the commands

SUBREEMFIREWALL opened this issue · comments

test code

public class TestHelpCommand {
    public static void main(String[] args) {
        HelpCommand h = new HelpCommand();
        MessageEmbed m = h.constructHelpMessage();

        System.out.println("max length bot"+ m.EMBED_MAX_LENGTH_BOT);
        System.out.println("max length client"+ m.EMBED_MAX_LENGTH_CLIENT);


        m.getFields().forEach(f -> System.out.println(f.getName() + "," + f.getValue()));
        System.out.println("Total length " + m.getLength());

        System.out.println("===");
        //String s = m.toData();
        //System.out.println(s.substring(0,999) + "***" + s.substring((1000)));
    }
}

Aside from the dumb code's formatting, the embed should end with something like this

,PLAYER COMMANDS:
play,Adds a track to the queue.
showq,Shows the current playlist.
clearq,Clears the current queue.
continue,Unpauses the player.
mvhere,Moves the player to the caller's current vc.
currenttrack,Shows the current track.
rmrange,Removes tracks in a specified range.
skip,Skips a track.
rm,Removes a track from the playlist.
seek,Changes the current track to a specified time.
pause,Pauses the player.
‎,‎
Source code:,https://github.com/ad044/navi
Total length 1130

But the output from the bot is actually

image

Questions:

The limit appears to be 25 fields

    public final MessageEmbed constructEvilHelpMessage() {
        EmbedBuilder helpMessage = new EmbedBuilder();

        for (int i=0; i < 50; i++) {
            helpMessage.addField(Integer.toString(i), "test", false);
        }
        return helpMessage.build();
    }

image