Merge pull request #639 from BigBotNetwork/greg-dev

Quick hotfix
This commit is contained in:
Skidder 2021-03-26 16:24:40 +01:00 committed by GitHub
commit 162efd08f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,10 @@ public class Mongo {
String response = db.getCollection(collection).find(whereQuery).cursor().next().toJson();
return new JSONObject(response);
} catch (NoSuchElementException e) {
if (collection.equals("user"))
insertUser(id);
else if (collection.equals("server"))
insertGuild(id);
String response2 = db.getCollection(collection).find(whereQuery).cursor().next().toJson();
return new JSONObject(response2);
}