Skip to content

Commit

Permalink
Fixed JSONException on GUILD_MEMBER_CHUNK handling
Browse files Browse the repository at this point in the history
  • Loading branch information
MinnDevelopment committed Sep 26, 2017
1 parent b5e4156 commit 960e0d4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
Expand Up @@ -319,9 +319,7 @@ public void createGuildSecondPass(long guildId, List<JSONArray> memberChunks)
throw new IllegalArgumentException("No callback provided for the second pass on the Guild!");

for (JSONArray chunk : memberChunks)
{
createGuildMemberPass(guildObj, chunk);
}

Member owner = guildObj.getMemberById(guildJson.getLong("owner_id"));
if (owner != null)
Expand Down
Expand Up @@ -50,9 +50,7 @@ protected Long handleInternally(JSONObject content)

int currentTotal = 0;
for (JSONArray arr : memberChunks)
{
currentTotal += arr.length();
}

if (currentTotal >= expectMemberCount)
{
Expand Down
Expand Up @@ -41,6 +41,7 @@ protected Long handleInternally(JSONObject content)
content.getJSONArray("ids").forEach(id ->
{
handler.handle(responseNumber, new JSONObject()
.put("t", "MESSAGE_DELETE")
.put("d", new JSONObject()
.put("channel_id", Long.toUnsignedString(channelId))
.put("id", id)));
Expand Down

0 comments on commit 960e0d4

Please sign in to comment.