Class: Discordrb::Events::MessageEvent
- Inherits:
-
Object
- Object
- Discordrb::Events::MessageEvent
- Defined in:
- lib/discordrb/events/message.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
- #author ⇒ Object (also: #user)
- #channel ⇒ Object
- #content ⇒ Object (also: #text)
-
#initialize(message, bot) ⇒ MessageEvent
constructor
A new instance of MessageEvent.
- #send_message(content) ⇒ Object (also: #send, #respond)
- #timestamp ⇒ Object
Constructor Details
#initialize(message, bot) ⇒ MessageEvent
Returns a new instance of MessageEvent.
7 8 9 10 |
# File 'lib/discordrb/events/message.rb', line 7 def initialize(, bot) @bot = bot @message = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/discordrb/events/message.rb', line 5 def @message end |
Instance Method Details
#author ⇒ Object Also known as: user
12 |
# File 'lib/discordrb/events/message.rb', line 12 def ; @message.; end |
#channel ⇒ Object
14 |
# File 'lib/discordrb/events/message.rb', line 14 def channel; @message.channel; end |
#content ⇒ Object Also known as: text
15 |
# File 'lib/discordrb/events/message.rb', line 15 def content; @message.content; end |
#send_message(content) ⇒ Object Also known as: send, respond
19 |
# File 'lib/discordrb/events/message.rb', line 19 def (content); @message.channel.(content); end |
#timestamp ⇒ Object
17 |
# File 'lib/discordrb/events/message.rb', line 17 def ; @message.; end |