This repository has been archived by the owner on May 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
pixeldeee
committed
Aug 4, 2023
1 parent
caccaf6
commit 8f6c386
Showing
6 changed files
with
176 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from typing import Any | ||
from .role import Role | ||
from .user import User | ||
from .utils import get_snowflake | ||
|
||
class Emoji: | ||
def __init__(self, data: dict[str, Any], token: str) -> None: | ||
self.id: int = get_snowflake('id') | ||
self.name: str | None = data.get('name') | ||
self.roles: list[Role] | None = [Role(i) for i in x] if (x := data.get('roles')) else None | ||
self.user: User = User(data.get('user'), token) | ||
self.require_colons: bool | None = data.get('require_colons') | ||
self.managed: bool | None = data.get('managed') | ||
self.animated: bool | None = data.get('animated') | ||
self.available: bool | None = data.get('available') | ||
|
||
|
||
class Sticker: | ||
def __init__(self, data: dict[str, Any], token: str) -> None: | ||
self.id: int = get_snowflake('id') | ||
self.pack_id = get_snowflake('pack_id') | ||
self.name: str = data.get('name') | ||
self.description: str | None = data.get('description') | ||
self.tags: str = data.get('tags') | ||
self.asset: str = data.get('asset') # deprecated | ||
self.type: int = data.get('type') | ||
self.format_type: int = data.get('format_type') | ||
self.available: bool | None = data.get('available') | ||
self.guild_id: int | None = get_snowflake('guild_id') | ||
self.user: User | None = User(x, token) if (x := data.get('user')) else None | ||
self.sort_value: int | None = data.get('sort_value') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters