From cb370a0ca0dd29eb6717b81fae80a7e9c72f9411 Mon Sep 17 00:00:00 2001 From: leovoel Date: Mon, 14 Nov 2016 22:57:21 -0200 Subject: [PATCH] Add FAQ entry about reactions --- docs/faq.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/faq.rst b/docs/faq.rst index aff1a61fa..b3e5988b0 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -130,6 +130,23 @@ The second is by passing the file name directly: :: await client.send_file(channel, 'my_image.png') +How can I add a reaction to a message? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You use the :meth:`Client.add_reaction` method. + +If you want to use unicode emoji, you must pass a valid unicode code point in a string. In your code, you can write this in a few different ways: + +- ``'👍'`` +- ``'\U0001F44D'`` +- ``'\N{THUMBS UP SIGN}'`` + +In case you want to use emoji that come from a message, you already get their code points in the content without needing to do anything special. +You **cannot** send ``':thumbsup:'`` style shorthands. + +For custom emoji, you should pass an instance of :class:`discord.Emoji`. You can also pass a ``'name:id'`` string, but if you can use said emoji, +you should be able to use :meth:`Client.get_all_emojis`/:attr:`Server.emojis` to find the one you're looking for. + How do I pass a coroutine to the player's "after" function? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~