Class: Discorb::Reaction
- Inherits:
-
DiscordModel
- Object
- DiscordModel
- Discorb::Reaction
- Defined in:
- lib/discorb/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 ⇒ Discorb::Emoji, Discorb::PartialEmoji
readonly
The emoji that was reacted with.
-
#me ⇒ Boolean
(also: #me?, #reacted?)
readonly
Whether client user reacted with this emoji.
-
#message ⇒ Discorb::Message
readonly
The message that this reaction is on.
Instance Method Summary collapse
-
#fetch_users ⇒ Async::Task<Array<Discorb::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.
9 10 11 |
# File 'lib/discorb/reaction.rb', line 9 def count @count end |
#emoji ⇒ Discorb::Emoji, Discorb::PartialEmoji (readonly)
Returns The emoji that was reacted with.
11 12 13 |
# File 'lib/discorb/reaction.rb', line 11 def emoji @emoji end |
#me ⇒ Boolean (readonly) Also known as: me?, reacted?
Returns Whether client user reacted with this emoji.
15 16 17 |
# File 'lib/discorb/reaction.rb', line 15 def me @me end |
#message ⇒ Discorb::Message (readonly)
Returns The message that this reaction is on.
13 14 15 |
# File 'lib/discorb/reaction.rb', line 13 def @message end |
Instance Method Details
#fetch_users ⇒ Async::Task<Array<Discorb::User>>
Fetch the user that reacted with this emoji.
38 39 40 |
# File 'lib/discorb/reaction.rb', line 38 def fetch_users(...) .fetch_reacted_users(@emoji, ...) end |