rdrescher909
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
20 additions and
0 deletions
-
discord/guild.py
|
|
@ -737,6 +737,26 @@ class Guild(Hashable): |
|
|
|
""" |
|
|
|
return self._threads.get(thread_id) |
|
|
|
|
|
|
|
def get_emoji(self, emoji_id: int, /) -> Optional[Emoji]: |
|
|
|
"""Returns an emoji with the given ID. |
|
|
|
|
|
|
|
.. versionadded:: 2.3 |
|
|
|
|
|
|
|
Parameters |
|
|
|
---------- |
|
|
|
emoji_id: int |
|
|
|
The ID to search for. |
|
|
|
|
|
|
|
Returns |
|
|
|
-------- |
|
|
|
Optional[:class:`Emoji`] |
|
|
|
The returned Emoji or ``None`` if not found. |
|
|
|
""" |
|
|
|
emoji = self._state.get_emoji(emoji_id) |
|
|
|
if emoji and emoji.guild == self: |
|
|
|
return emoji |
|
|
|
return None |
|
|
|
|
|
|
|
@property |
|
|
|
def system_channel(self) -> Optional[TextChannel]: |
|
|
|
"""Optional[:class:`TextChannel`]: Returns the guild's channel used for system messages. |
|
|
|