Skip to content

Commit 174fb26

Browse files
committed
fix: make sure to await response
Original code from #1746, which was closed for some reason.
1 parent fce63bc commit 174fb26

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

interactions/models/discord/application.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,8 @@ async def fetch_all_emoji(self) -> List[PartialEmoji]:
9999

100100
async def fetch_emoji(self, emoji_id: Snowflake_Type) -> PartialEmoji:
101101
"""Fetch an emoji for this application"""
102-
return await self._client.cache.place_emoji_data(
103-
None, self._client.http.get_application_emoji(self.id, emoji_id)
104-
)
102+
response = await self._client.http.get_application_emoji(self.id, emoji_id)
103+
return await self._client.cache.place_emoji_data(None, response)
105104

106105
async def create_emoji(self, name: str, imagefile: UPLOADABLE_TYPE) -> PartialEmoji:
107106
"""Create an emoji for this application"""

0 commit comments

Comments
 (0)