Class: Discorb::Message::Interaction

Inherits:
DiscordModel show all
Defined in:
lib/discorb/message_meta.rb

Overview

Represents a interaction of message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DiscordModel

#==, #eql?

Instance Attribute Details

#idDiscorb::Snowflake (readonly)

Returns The interaction ID.

Returns:



130
131
132
# File 'lib/discorb/message_meta.rb', line 130

def id
  @id
end

#nameString? (readonly)

Returns:

  • (String)

    The name of command.

  • (nil)

    If the message is not a command.



133
134
135
# File 'lib/discorb/message_meta.rb', line 133

def name
  @name
end

#typeClass (readonly)

Returns The type of interaction.

Returns:

  • (Class)

    The type of interaction.



135
136
137
# File 'lib/discorb/message_meta.rb', line 135

def type
  @type
end

#userDiscorb::User (readonly)

Returns The user.

Returns:



137
138
139
# File 'lib/discorb/message_meta.rb', line 137

def user
  @user
end

Instance Method Details

#inspectObject



158
159
160
# File 'lib/discorb/message_meta.rb', line 158

def inspect
  "<#{self.class.name} #{@id}: #{@name} type=#{@type} #{@user}>"
end