From f38b199d6ab62bae73c524ae26cfb68a9dac3ac3 Mon Sep 17 00:00:00 2001 From: Vexs Date: Wed, 17 Apr 2019 18:29:54 -0500 Subject: Add support for <:name:id> format for adding reactions Adjust FAQ to match. --- discord/message.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'discord') 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)) -- cgit v1.2.3