Class: Discordrb::Events::MessageEvent

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

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ MessageEvent

Returns a new instance of MessageEvent.



7
8
9
# File 'lib/discordrb/events/message.rb', line 7

def initialize(message)
  @message = message
end

Instance Method Details

#authorObject Also known as: user



11
# File 'lib/discordrb/events/message.rb', line 11

def author; @message.author; end

#channelObject



13
# File 'lib/discordrb/events/message.rb', line 13

def channel; @message.channel; end

#contentObject Also known as: text



14
# File 'lib/discordrb/events/message.rb', line 14

def content; @message.content; end

#send_message(content) ⇒ Object Also known as: send, message, respond



18
# File 'lib/discordrb/events/message.rb', line 18

def send_message(content); @message.send_message(content); end

#timestampObject



16
# File 'lib/discordrb/events/message.rb', line 16

def timestamp; @message.timestamp; end