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

Method Summary

Methods inherited from DiscordModel

#==, #eql?

Instance Attribute Details

#id -> Discorb::Snowflake (readonly)

Returns The user ID.

Returns:



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

def id
  @id
end

#name -> String? (readonly)

Returns:

  • (String)

    The name of command.

  • (nil)

    If the message is not a command.



162
163
164
# File 'lib/discorb/message_meta.rb', line 162

def name
  @name
end

#type -> Class (readonly)

Returns The type of interaction.

Returns:

  • (Class)

    The type of interaction.



164
165
166
# File 'lib/discorb/message_meta.rb', line 164

def type
  @type
end

#user -> Discorb::User (readonly)

Returns The user.

Returns:



166
167
168
# File 'lib/discorb/message_meta.rb', line 166

def user
  @user
end