Module: DSU3::API::Channel
- Defined in:
- lib/dsu3/api/channel.rb
Overview
Channel API calls
Class Method Summary collapse
-
.react(token, channel, message, emoji) ⇒ Object
Reacts to a message.
-
.send(token, channel, message) ⇒ Object
Sends a message to a channel.
-
.type(token, channel) ⇒ Object
Types text into a channel.
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
35 36 37 38 39 40 41 42 43 |
# File 'lib/dsu3/api/channel.rb', line 35 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 |