@@ -693,7 +693,8 @@ public RestAction<ApplicationEmoji> createApplicationEmoji(@Nonnull String name,
693693 return new RestActionImpl <>(this , route , body , (response , request ) ->
694694 {
695695 final DataObject obj = response .getObject ();
696- return entityBuilder .createApplicationEmoji (this , obj );
696+ final User selfUser = getSelfUser ();
697+ return entityBuilder .createApplicationEmoji (this , obj , selfUser );
697698 });
698699 }
699700
@@ -710,7 +711,12 @@ public RestAction<List<ApplicationEmoji>> retrieveApplicationEmojis()
710711 {
711712 try
712713 {
713- list .add (entityBuilder .createApplicationEmoji (this , emojis .getObject (i )));
714+ final DataObject emoji = emojis .getObject (i );
715+ final User owner = emoji .optObject ("user" )
716+ .map (entityBuilder ::createUser )
717+ .orElse (null );
718+
719+ list .add (entityBuilder .createApplicationEmoji (this , emoji , owner ));
714720 }
715721 catch (ParsingException e )
716722 {
@@ -728,9 +734,15 @@ public RestAction<ApplicationEmoji> retrieveApplicationEmojiById(@Nonnull String
728734 {
729735 Checks .isSnowflake (emojiId );
730736 Route .CompiledRoute route = Route .Applications .GET_APPLICATION_EMOJI .compile (getSelfUser ().getApplicationId (), emojiId );
731- return new RestActionImpl <>(this , route ,
732- (response , request ) -> entityBuilder .createApplicationEmoji (this , response .getObject ())
733- );
737+ return new RestActionImpl <>(this , route , (response , request ) ->
738+ {
739+ final DataObject emoji = response .getObject ();
740+ final User owner = emoji .optObject ("user" )
741+ .map (entityBuilder ::createUser )
742+ .orElse (null );
743+
744+ return entityBuilder .createApplicationEmoji (this , emoji , owner );
745+ });
734746 }
735747
736748 @ Nonnull
0 commit comments