+ Added comments and mild formatting.

This commit is contained in:
Matthew Cech
2019-06-01 23:10:46 -07:00
parent 355660eea4
commit f363d15010
4 changed files with 19 additions and 20 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ public class DatabaseManager
if(driver.Connect() == false)
{
GlobalLog.Error("Database failed to connect. Currently, without the DB, this bot can not run.");
GlobalLog.Error("A database failed to connect. Currently, without the DB, this bot can not run.");
System.exit(1);
}
}
+2 -2
View File
@@ -6,8 +6,8 @@ import utils.LogFilter;
public class KittyTrackedString extends DatabaseTrackedObject
{
private String trackedString; // Tracked value
private final static String differentiator = "string-";
private String trackedString; // This is the string tracked in the database
private final static String differentiator = "string-"; // Lends a very slightly human-readable label to the database key
// Constructor with unique id and readable name
public KittyTrackedString(String readableName, String UniqueID)
+7 -7
View File
@@ -9,13 +9,13 @@ import utils.LogFilter;
// two unique user objects associated with them.
public class KittyUser extends DatabaseTrackedObject
{
public KittyGuild guild;
public String name;
public String uniqueID;
public String discordID;
public String avatarID;
private KittyRole role;
private long beans;
public KittyGuild guild; // The guild this user is associated with. A KittyUser can not be associated with more than one guild.
public String name; // The 'friendly name' of the user (readable name).
public String uniqueID; // The combination of the guild ID that discord uses and the user-specific ID discord uses. (A discord account has one user per server).
public String discordID; // The user-specific ID only. This is the ID associated with the discord account.
public String avatarID; // The searchable ID of the current avatar image for the user.
private KittyRole role; // The command permissions role this user has for issuing bot commands for this bot.
private long beans; // A value incremented each time a user sends a message in a server they're in.
// Explicit Constructor
public KittyUser(String name, KittyGuild guild, KittyRole role, String uniqueID, String avatarID, String discordID)
+9 -10
View File
@@ -91,18 +91,17 @@ public class Main extends ListenerAdapter
if(pluginOutput != null && pluginOutput.size() > 0)
{
for(int i = 0; i < pluginOutput.size(); ++i)
for(int i = 0; i < pluginOutput.size(); ++i)
{
if(pluginOutput.get(i).startsWith("!"))
{
if(pluginOutput.get(i).startsWith("!"))
{
commandManager.InvokeOnNewThread(guild, channel, user, new UserInput(pluginOutput.get(i).substring(1), guild), response);
}
else
{
response.Call(pluginOutput.get(i));
}
commandManager.InvokeOnNewThread(guild, channel, user, new UserInput(pluginOutput.get(i).substring(1), guild), response);
}
else
{
response.Call(pluginOutput.get(i));
}
}
}
}