Vish M
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
discord/sticker.py
-
discord/types/sticker.py
|
@ -414,7 +414,7 @@ class GuildSticker(Sticker): |
|
|
|
|
|
|
|
|
def _from_data(self, data: GuildStickerPayload) -> None: |
|
|
def _from_data(self, data: GuildStickerPayload) -> None: |
|
|
super()._from_data(data) |
|
|
super()._from_data(data) |
|
|
self.available: bool = data['available'] |
|
|
self.available: bool = data.get('available', True) |
|
|
self.guild_id: int = int(data['guild_id']) |
|
|
self.guild_id: int = int(data['guild_id']) |
|
|
user = data.get('user') |
|
|
user = data.get('user') |
|
|
self.user: Optional[User] = self._state.store_user(user) if user else None |
|
|
self.user: Optional[User] = self._state.store_user(user) if user else None |
|
|
|
@ -55,7 +55,7 @@ class StandardSticker(BaseSticker): |
|
|
|
|
|
|
|
|
class GuildSticker(BaseSticker): |
|
|
class GuildSticker(BaseSticker): |
|
|
type: Literal[2] |
|
|
type: Literal[2] |
|
|
available: bool |
|
|
available: NotRequired[bool] |
|
|
guild_id: Snowflake |
|
|
guild_id: Snowflake |
|
|
user: NotRequired[User] |
|
|
user: NotRequired[User] |
|
|
|
|
|
|
|
|