Module: DSU3::API::Message
- Defined in:
- lib/dsu3/api/message.rb
Overview
Message API calls
Class Method Summary collapse
-
.react(token, channel, message, emoji) ⇒ Object
Reacts to a message.
Class Method Details
.react(token, channel, message, emoji) ⇒ Object
Note:
To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id
Reacts to a message
15 16 17 18 19 20 21 22 23 |
# File 'lib/dsu3/api/message.rb', line 15 def react(token, channel, , emoji) emoji = URI.encode_www_form_component(emoji) DSU3::API.request( token, :put, "channels/#{channel}/messages/#{}/reactions/#{emoji}/@me", { params: { location: 'Message' } } ) end |