Class: RubyCord::Client::Gateway::Event::ReactionRemoveEmojiEvent
- Inherits:
-
RubyCord::Client::Gateway::Event
- Object
- RubyCord::Client::Gateway::Event
- RubyCord::Client::Gateway::Event::ReactionRemoveEmojiEvent
- Defined in:
- lib/rubycord/client/gateway/event.rb
Overview
Represents a MESSAGE_REACTION_REMOVE_EMOJI
event.
Instance Attribute Summary collapse
- #channel ⇒ nil, RubyCord::Channel readonly
-
#channel_id ⇒ RubyCord::Snowflake
readonly
The ID of the channel the message was sent in.
-
#emoji ⇒ RubyCord::UnicodeEmoji, RubyCord::PartialEmoji
readonly
The emoji that was reacted with.
- #guild ⇒ nil, RubyCord::Guild readonly
-
#guild_id ⇒ RubyCord::Snowflake
readonly
The ID of the guild the message was sent in.
- #message ⇒ nil, RubyCord::Message readonly
-
#message_id ⇒ RubyCord::Snowflake
readonly
The ID of the message.
Instance Method Summary collapse
-
#fetch_message(force: false) ⇒ Async::Task<RubyCord::Message>
Fetch the message.
Methods inherited from RubyCord::Client::Gateway::Event
Instance Attribute Details
#channel ⇒ nil, RubyCord::Channel (readonly)
Note:
This method returns an object from client cache. it will return nil
if the object is not in cache.
224 225 226 |
# File 'lib/rubycord/client/gateway/event.rb', line 224 def channel @channel end |
#channel_id ⇒ RubyCord::Snowflake (readonly)
Returns The ID of the channel the message was sent in.
217 218 219 |
# File 'lib/rubycord/client/gateway/event.rb', line 217 def channel_id @channel_id end |
#emoji ⇒ RubyCord::UnicodeEmoji, RubyCord::PartialEmoji (readonly)
Returns The emoji that was reacted with.
232 233 234 |
# File 'lib/rubycord/client/gateway/event.rb', line 232 def emoji @emoji end |
#guild ⇒ nil, RubyCord::Guild (readonly)
Note:
This method returns an object from client cache. it will return nil
if the object is not in cache.
227 228 229 |
# File 'lib/rubycord/client/gateway/event.rb', line 227 def guild @guild end |
#guild_id ⇒ RubyCord::Snowflake (readonly)
Returns The ID of the guild the message was sent in.
221 222 223 |
# File 'lib/rubycord/client/gateway/event.rb', line 221 def guild_id @guild_id end |
#message ⇒ nil, RubyCord::Message (readonly)
Note:
This method returns an object from client cache. it will return nil
if the object is not in cache.
230 231 232 |
# File 'lib/rubycord/client/gateway/event.rb', line 230 def @message end |
#message_id ⇒ RubyCord::Snowflake (readonly)
Returns The ID of the message.
219 220 221 |
# File 'lib/rubycord/client/gateway/event.rb', line 219 def @message_id end |
Instance Method Details
#fetch_message(force: false) ⇒ Async::Task<RubyCord::Message>
Fetch the message. If message is cached, it will be returned.
267 268 269 270 271 272 273 |
# File 'lib/rubycord/client/gateway/event.rb', line 267 def (force: false) Async do next @message if !force && @message @message = @channel.(@message_id).wait end end |