diff --git a/core/src/main/java/me/mastercapexd/auth/config/discord/DiscordKeyboards.java b/core/src/main/java/me/mastercapexd/auth/config/discord/DiscordKeyboards.java index c26c8b9a..9ffa0f4b 100644 --- a/core/src/main/java/me/mastercapexd/auth/config/discord/DiscordKeyboards.java +++ b/core/src/main/java/me/mastercapexd/auth/config/discord/DiscordKeyboards.java @@ -31,11 +31,16 @@ public Map getRawJsonKeyboards() { @Override public Keyboard createKeyboardModel(String rawJson) { - DataObject dataObject = DataObject.fromJson(rawJson); - DataArray rowsDataArray = dataObject.getArray("rows"); - List actionRows = new ArrayList<>(); - for (int i = 0; i < rowsDataArray.length(); i++) - actionRows.add(ActionRow.fromData(rowsDataArray.getObject(i))); - return new DiscordKeyboard(actionRows); + try { + DataObject dataObject = DataObject.fromJson(rawJson); + DataArray rowsDataArray = dataObject.getArray("rows"); + List actionRows = new ArrayList<>(); + for (int i = 0; i < rowsDataArray.length(); i++) + actionRows.add(ActionRow.fromData(rowsDataArray.getObject(i))); + return new DiscordKeyboard(actionRows); + } catch(Throwable t) { + t.printStackTrace(); + return new DiscordKeyboard(); + } } }