Class: RubyCord::Reaction
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- RubyCord::Reaction
- Defined in:
- lib/rubycord/reaction.rb
Overview
Represents a reaction to a message.
Instance Attribute Summary collapse
-
#count ⇒ Integer
readonly
The number of users that have reacted with this emoji.
-
#emoji ⇒ RubyCord::Emoji, RubyCord::PartialEmoji
readonly
The emoji that was reacted with.
-
#me ⇒ Boolean
(also: #me?, #reacted?)
readonly
Whether client user reacted with this emoji.
-
#message ⇒ RubyCord::Message
readonly
The message that this reaction is on.
Instance Method Summary collapse
-
#fetch_users ⇒ Async::Task<Array<RubyCord::User>>
Fetch the user that reacted with this emoji.
Methods inherited from DiscordModel
Instance Attribute Details
#count ⇒ Integer (readonly)
Returns The number of users that have reacted with this emoji.
10 11 12 |
# File 'lib/rubycord/reaction.rb', line 10 def count @count end |
#emoji ⇒ RubyCord::Emoji, RubyCord::PartialEmoji (readonly)
Returns The emoji that was reacted with.
12 13 14 |
# File 'lib/rubycord/reaction.rb', line 12 def emoji @emoji end |
#me ⇒ Boolean (readonly) Also known as: me?, reacted?
Returns Whether client user reacted with this emoji.
16 17 18 |
# File 'lib/rubycord/reaction.rb', line 16 def me @me end |
#message ⇒ RubyCord::Message (readonly)
Returns The message that this reaction is on.
14 15 16 |
# File 'lib/rubycord/reaction.rb', line 14 def @message end |
Instance Method Details
#fetch_users ⇒ Async::Task<Array<RubyCord::User>>
Fetch the user that reacted with this emoji.
39 40 41 |
# File 'lib/rubycord/reaction.rb', line 39 def fetch_users(...) .fetch_reacted_users(@emoji, ...) end |