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
Questions:
- what is the actual message length limit? What is
MAX_LENGTH_BOT
on the running instance of the bot? Why does it not send the full message? - how to change the type signature of
constructHelpMessage
to allow multiple embeds? It needs to fitchannel.sendMessageEmbeds(constructHelpMessage()))
, so it should accept a Collection https://ci.dv8tion.net/user/seejay.11/my-views/view/all/job/jda/javadoc/net/dv8tion/jda/api/entities/MessageChannel.html#sendMessageEmbeds(java.util.Collection). IsList<MessageEmbed>
ok?
This is a discord embed issue, not a NAVI issue
https://discordjs.guide/popular-topics/embeds.html#using-an-embed-object