Skip to content

Commit c6109a5

Browse files
authored
Revert "feat: Add mention property to BaseEmoji class" (#2973)
Revert "feat: Add mention property to BaseEmoji class (#2972)" This reverts commit 55efab4.
1 parent 55efab4 commit c6109a5

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

CHANGELOG.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ These changes are available on the `master` branch, but have not yet been releas
4444
- Added support for Guild Incidents via `Guild.incidents_data` and
4545
`Guild.modify_incident_actions()`.
4646
([#2955](https://github.com/Pycord-Development/pycord/pull/2955))
47-
- Added `mention` property to `BaseEmoji`.
48-
([#2972](https://github.com/Pycord-Development/pycord/pull/2972))
4947

5048
### Changed
5149

@@ -94,8 +92,6 @@ These changes are available on the `master` branch, but have not yet been releas
9492
- Fixed attributes like :attr:`Member.display_banner` being `None` when the member has
9593
no guild specific banner, but does have a global one.
9694
([#2968](https://github.com/Pycord-Development/pycord/pull/2949))
97-
- Fixed `__repr__` formatting for `AppEmoji`.
98-
([#2972](https://github.com/Pycord-Development/pycord/pull/2972))
9995

10096
### Deprecated
10197

discord/emoji.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949

5050

5151
class BaseEmoji(_EmojiTag, AssetMixin):
52+
5253
__slots__: tuple[str, ...] = (
5354
"require_colons",
5455
"animated",
@@ -109,13 +110,6 @@ def url(self) -> str:
109110
fmt = "gif" if self.animated else "png"
110111
return f"{Asset.BASE}/emojis/{self.id}.{fmt}"
111112

112-
@property
113-
def mention(self) -> str:
114-
"""Return a string that allows you to mention the emoji in a message."""
115-
if self.animated:
116-
return f"<a:{self.name}:{self.id}>"
117-
return f"<:{self.name}:{self.id}>"
118-
119113

120114
class GuildEmoji(BaseEmoji):
121115
"""Represents a custom emoji in a guild.
@@ -351,7 +345,7 @@ def __init__(
351345
super().__init__(state=state, data=data)
352346

353347
def __repr__(self) -> str:
354-
return f"<AppEmoji id={self.id} name={self.name!r} animated={self.animated}>"
348+
return "<AppEmoji" f" id={self.id} name={self.name!r} animated={self.animated}>"
355349

356350
@property
357351
def guild(self) -> Guild:

0 commit comments

Comments
 (0)