Class: Discordrb::Events::MentionEvent

Inherits:
MessageEvent show all
Defined in:
lib/discordrb/events/message.rb

Overview

Event raised when the current bot is mentioned in a message.

Instance Attribute Summary collapse

Attributes inherited from MessageEvent

#author, #channel, #content, #file, #file_spoiler, #filename, #message, #saved_message, #server, #timestamp

Attributes included from Respondable

#channel

Attributes inherited from Event

#bot

Method Summary

Methods inherited from MessageEvent

#attach_file, #detach_file, #from_bot?, #send_file, #voice

Methods included from Respondable

#<<, #drain, #drain_into, #send_embed, #send_message, #send_message!, #send_temporary_message

Instance Attribute Details

#role_mentiontrue, false (readonly) Also known as: role_mention?

Returns whether this mention event was raised due to a mention of the bot's auto-generated server role.

Returns:

  • (true, false)

    whether this mention event was raised due to a mention of the bot's auto-generated server role.



294
295
296
# File 'lib/discordrb/events/message.rb', line 294

def role_mention
  @role_mention
end