File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -342,10 +342,25 @@ def emojis(self) -> list[GuildEmoji | AppEmoji]:
342
342
343
343
.. note::
344
344
345
- This only includes the application's emojis if :attr:`~Client. cache_app_emojis` is ``True``.
345
+ This only includes the application's emojis if ` cache_app_emojis` is ``True``.
346
346
"""
347
347
return self ._connection .emojis
348
348
349
+ @property
350
+ def guild_emojis (self ) -> list [GuildEmoji ]:
351
+ """The :class:`~discord.GuildEmoji` that the connected client has."""
352
+ return [e for e in self .emojis if isinstance (e , GuildEmoji )]
353
+
354
+ @property
355
+ def app_emojis (self ) -> list [AppEmoji ]:
356
+ """The :class:`~discord.AppEmoji` that the connected client has.
357
+
358
+ .. note::
359
+
360
+ This is only available if `cache_app_emojis` is ``True``.
361
+ """
362
+ return [e for e in self .emojis if isinstance (e , AppEmoji )]
363
+
349
364
@property
350
365
def stickers (self ) -> list [GuildSticker ]:
351
366
"""The stickers that the connected client has.
Original file line number Diff line number Diff line change @@ -602,6 +602,11 @@ async def query_members(
602
602
raise
603
603
604
604
async def _delay_ready (self ) -> None :
605
+
606
+ if self .cache_app_emojis and self .application_id :
607
+ data = await self .http .get_all_application_emojis (self .application_id )
608
+ for e in data .get ("items" , []):
609
+ self .maybe_store_app_emoji (self .application_id , e )
605
610
try :
606
611
states = []
607
612
while True :
@@ -643,11 +648,6 @@ async def _delay_ready(self) -> None:
643
648
except AttributeError :
644
649
pass # already been deleted somehow
645
650
646
- if self .cache_app_emojis and self .application_id :
647
- data = await self .http .get_all_application_emojis (self .application_id )
648
- for e in data .get ("items" , []):
649
- self .maybe_store_app_emoji (self .application_id , e )
650
-
651
651
except asyncio .CancelledError :
652
652
pass
653
653
else :
You can’t perform that action at this time.
0 commit comments