=Config file bug fixes

This commit is contained in:
Alex
2019-08-09 23:23:43 -04:00
parent 81d3bd13b0
commit 2c486d7da1
12 changed files with 43 additions and 50 deletions
@@ -1,6 +1,5 @@
package commands.characters;
import commands.guildrole.*;
import core.Command;
import core.LocStrings;
import core.SubCommandFramework;
@@ -12,7 +11,7 @@ public class CommandCharacterMain extends Command
public CommandCharacterMain(KittyRole level, KittyRating rating)
{
super(level, rating);
framework.addCommand("add", new SubCommandAdd(KittyRole.General, KittyRating.Safe));
framework.addCommand("create", new SubCommandCreate(KittyRole.General, KittyRating.Safe));
framework.addCommand("editbio", new SubCommandEditBio(KittyRole.General, KittyRating.Safe));
framework.addCommand("editname", new SubCommandEditName(KittyRole.General, KittyRating.Safe));
framework.addCommand("editurl", new SubCommandEditURL(KittyRole.General, KittyRating.Safe));
@@ -23,6 +23,7 @@ public class SubCommandCreate extends SubCommand
{
return new SubCommandFormattable (LocStrings.stub("CharacterCreateNullInfo"));
}
//user name bio url
if(CharacterManager.instance.addCharacter(user, info[0], info[1], info[2]))
{
return new SubCommandFormattable (LocStrings.stub("CharacterCreateSuccess"));
@@ -32,4 +32,4 @@ public class CommandGuildRoleMain extends Command
{
framework.run(guild, channel, user, input).Call(res);
}
}
}
+4 -3
View File
@@ -1,5 +1,6 @@
package commands.guildrole;
import core.LocStrings;
import core.SubCommand;
import core.SubCommandFormattable;
import dataStructures.KittyChannel;
@@ -26,16 +27,16 @@ public class SubCommandAdd extends SubCommand
{
if(guild.control.addRole(user.discordID, role))
{
formatted += "Addded " + role + "!";
formatted += String.format(LocStrings.stub("GuildRoleAddSuccess"), role, user.name);
}
else
{
formatted += "Failed to add " + role + "!";
formatted += String.format(LocStrings.stub("GuildRoleAddFailure"), role, user.name);
}
}
else
{
formatted += "You're not allowed to add " + role + "!";
formatted += String.format(LocStrings.stub("GuildRoleAddNotAllowed"), role);
}
}
return new SubCommandFormattable(formatted);
+1 -1
View File
@@ -19,7 +19,7 @@ public class SubCommandList extends SubCommand
public SubCommandFormattable OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input)
{
String roles = "";
if(guild.roleList.isEmpty())
if(guild.roleList.size() < 2)
{
return new SubCommandFormattable(String.format(LocStrings.stub("GuildRoleListEmpty")));
}
+1 -1
View File
@@ -23,7 +23,7 @@ public class CommandModMain extends Command
}
@Override
public String getHelpText() { return LocStrings.stub("GuildRoleInfo"); }
public String getHelpText() { return LocStrings.stub("ModInfo"); }
@Override
public void onRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
@@ -1,6 +1,7 @@
package commands.raffle;
import core.Command;
import core.LocStrings;
import core.SubCommandFramework;
import dataStructures.*;
@@ -16,6 +17,9 @@ public class CommandRaffleMain extends Command
framework.addCommand("join", new SubCommandJoin(KittyRole.General, KittyRating.Safe));
}
@Override
public String getHelpText() { return LocStrings.stub("RaffleInfo"); }
@Override
public void onRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
{
+1 -1
View File
@@ -34,7 +34,7 @@ public class SubCommandStart extends SubCommand
}
else
{
return new SubCommandFormattable (LocStrings.stub("RaffleStartFailure"));
return new SubCommandFormattable (String.format(LocStrings.stub("RaffleStartFailure"), beanCost));
}
}
}