Skip to content

Commit

Permalink
EmoteManagerImpl#finalizeData resets the role list before serializing (
Browse files Browse the repository at this point in the history
  • Loading branch information
averen authored and MinnDevelopment committed Nov 24, 2019
1 parent 4ba0c61 commit 0a4532b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import net.dv8tion.jda.api.entities.Role;
import net.dv8tion.jda.api.exceptions.InsufficientPermissionException;
import net.dv8tion.jda.api.managers.EmoteManager;
import net.dv8tion.jda.api.utils.data.DataArray;
import net.dv8tion.jda.api.utils.data.DataObject;
import net.dv8tion.jda.internal.entities.EmoteImpl;
import net.dv8tion.jda.internal.requests.Route;
Expand Down Expand Up @@ -154,9 +155,8 @@ protected RequestBody finalizeData()
withLock(this.roles, (list) ->
{
if (shouldUpdate(ROLES))
object.put("roles", list);
object.put("roles", DataArray.fromCollection(list));
});

reset();
return getRequestBody(object);
}
Expand Down

0 comments on commit 0a4532b

Please sign in to comment.