More detailed help

This commit is contained in:
Tikuf 2020-04-25 22:51:13 -06:00
parent 865293f144
commit 1d8aa68984

View file

@ -17,13 +17,14 @@ namespace BSB.Commands.Self
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.Append("Second Bot - Basic Command List\n\n");
sb.Append(bot.GetCommandsInterface.GetCommandHelp("im")); sb.Append(bot.GetCommandsInterface.GetCommandHelp("im"));
sb.Append("\n\n"); sb.Append("\n\n");
sb.Append(bot.GetCommandsInterface.GetCommandHelp("say")); sb.Append(bot.GetCommandsInterface.GetCommandHelp("say"));
sb.Append("\n\n"); sb.Append("\n\n");
sb.Append(bot.GetCommandsInterface.GetCommandHelp("botsit")); sb.Append(bot.GetCommandsInterface.GetCommandHelp("botsit"));
sb.Append("\n\n"); sb.Append("\n\n");
sb.Append("\nType: 'morehelp' for a full list of commands"); sb.Append("\nType: 'morehelp' for a full list of commands\n");
sb.Replace("<br/>", "\n"); sb.Replace("<br/>", "\n");
bot.sendIM(bot.getMaster_uuid, sb.ToString()); bot.sendIM(bot.getMaster_uuid, sb.ToString());
@ -43,27 +44,19 @@ namespace BSB.Commands.Self
{ {
if (bot.getMaster_uuid != UUID.Zero) if (bot.getMaster_uuid != UUID.Zero)
{ {
string reply = "";
int counter = 0;
string addon = ""; StringBuilder reply = new StringBuilder();
reply.Append("Second Bot - Full Command List\n\n");
foreach (string a in bot.GetCommandsInterface.GetCommandsList()) foreach (string a in bot.GetCommandsInterface.GetCommandsList())
{ {
reply += addon; reply.Append(a);
reply += a; reply.Append("\n");
counter++; reply.Append(bot.GetCommandsInterface.GetCommandHelp(a));
if (counter == 5) reply.Append("\n\n");
{
reply += "\n";
addon = "";
counter = 0;
}
else
{
addon = " , ";
}
} }
bot.sendIM(bot.getMaster_uuid, reply); bot.sendIM(bot.getMaster_uuid, reply.ToString());
return true; return true;
} }