Class: Discorb::Gateway::ReactionRemoveAllEvent
- Inherits:
-
GatewayEvent
- Object
- GatewayEvent
- Discorb::Gateway::ReactionRemoveAllEvent
- Defined in:
- lib/discorb/gateway_events.rb
Overview
Represents a MESSAGE_REACTION_REMOVE_ALL
event.
Instance Attribute Summary collapse
- #channel -> nil, Discorb::Channel readonly
-
#channel_id -> Discorb::Snowflake
readonly
The ID of the channel the message was sent in.
- #guild -> nil, Discorb::Guild readonly
-
#guild_id -> Discorb::Snowflake
readonly
The ID of the guild the message was sent in.
- #message -> nil, Discorb::Message readonly
-
#message_id -> Discorb::Snowflake
readonly
The ID of the message.
Instance Method Summary collapse
-
#fetch_message(force: false) -> Async::Task<Discorb::Message>
Fetch the message.
Methods inherited from GatewayEvent
Instance Attribute Details
#channel -> nil, Discorb::Channel (readonly)
Note:
This method returns an object from client cache. it will return nil
if the object is not in cache.
162 163 164 |
# File 'lib/discorb/gateway_events.rb', line 162 def channel @channel end |
#channel_id -> Discorb::Snowflake (readonly)
Returns The ID of the channel the message was sent in.
155 156 157 |
# File 'lib/discorb/gateway_events.rb', line 155 def channel_id @channel_id end |
#guild -> nil, Discorb::Guild (readonly)
Note:
This method returns an object from client cache. it will return nil
if the object is not in cache.
165 166 167 |
# File 'lib/discorb/gateway_events.rb', line 165 def guild @guild end |
#guild_id -> Discorb::Snowflake (readonly)
Returns The ID of the guild the message was sent in.
159 160 161 |
# File 'lib/discorb/gateway_events.rb', line 159 def guild_id @guild_id end |
#message -> nil, Discorb::Message (readonly)
Note:
This method returns an object from client cache. it will return nil
if the object is not in cache.
168 169 170 |
# File 'lib/discorb/gateway_events.rb', line 168 def @message end |
#message_id -> Discorb::Snowflake (readonly)
Returns The ID of the message.
157 158 159 |
# File 'lib/discorb/gateway_events.rb', line 157 def @message_id end |
Instance Method Details
#fetch_message(force: false) -> Async::Task<Discorb::Message>
Fetch the message. If message is cached, it will be returned.
195 196 197 198 199 200 201 |
# File 'lib/discorb/gateway_events.rb', line 195 def (force: false) Async do next @message if !force && @message @message = @channel.(@message_id).wait end end |