@@ -693,7 +693,8 @@ public RestAction<ApplicationEmoji> createApplicationEmoji(@Nonnull String name,
693
693
return new RestActionImpl <>(this , route , body , (response , request ) ->
694
694
{
695
695
final DataObject obj = response .getObject ();
696
- return entityBuilder .createApplicationEmoji (this , obj );
696
+ final User selfUser = getSelfUser ();
697
+ return entityBuilder .createApplicationEmoji (this , obj , selfUser );
697
698
});
698
699
}
699
700
@@ -710,7 +711,12 @@ public RestAction<List<ApplicationEmoji>> retrieveApplicationEmojis()
710
711
{
711
712
try
712
713
{
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 ));
714
720
}
715
721
catch (ParsingException e )
716
722
{
@@ -728,9 +734,15 @@ public RestAction<ApplicationEmoji> retrieveApplicationEmojiById(@Nonnull String
728
734
{
729
735
Checks .isSnowflake (emojiId );
730
736
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
+ });
734
746
}
735
747
736
748
@ Nonnull
0 commit comments