diff options
| author | Vexs <[email protected]> | 2019-04-17 18:29:54 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-04-17 22:42:00 -0400 |
| commit | f38b199d6ab62bae73c524ae26cfb68a9dac3ac3 (patch) | |
| tree | dc4056a3107d3c2d35e0f84e9e8d70b14149cd24 /discord | |
| parent | add read-only cached_messages property to Client (diff) | |
| download | discord.py-f38b199d6ab62bae73c524ae26cfb68a9dac3ac3.tar.xz discord.py-f38b199d6ab62bae73c524ae26cfb68a9dac3ac3.zip | |
Add support for <:name:id> format for adding reactions
Adjust FAQ to match.
Diffstat (limited to 'discord')
| -rw-r--r-- | discord/message.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/discord/message.py b/discord/message.py index f068d7d0..a156a0cd 100644 --- a/discord/message.py +++ b/discord/message.py @@ -764,7 +764,9 @@ class Message: if isinstance(emoji, PartialEmoji): return emoji._as_reaction() if isinstance(emoji, str): - return emoji # this is okay + # Reactions can be in :name:id format, but not <:name:id>. + # No existing emojis have <> in them, so this should be okay. + return emoji.strip('<>') raise InvalidArgument('emoji argument must be str, Emoji, or Reaction not {.__class__.__name__}.'.format(emoji)) |