This should fix the bot nick errors for linkCal page.

This commit is contained in:
NovaFox161
2018-09-17 15:10:07 -05:00
parent 29fcb0c6ac
commit 4f20981be5

View File

@@ -169,7 +169,8 @@ public class WebGuild {
data.put("Name", name);
data.put("IconUrl", iconUrl);
data.put("Settings", settings.toJson());
data.put("BotNick", botNick);
if (botNick != null && !botNick.equals(""))
data.put("BotNick", botNick);
data.put("ManageServer", manageServer);
data.put("DiscalRole", discalRole);
@@ -201,7 +202,10 @@ public class WebGuild {
name = data.getString("Name");
iconUrl = data.getString("IconUrl");
settings = new GuildSettings(Long.valueOf(id)).fromJson(data.getJSONObject("Settings"));
botNick = data.getString("BotNick");
if (data.has("BotNick"))
botNick = data.getString("BotNick");
else
botNick = "";
manageServer = data.getBoolean("ManageServer");
discalRole = data.getBoolean("DiscalRole");