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:



111
112
113
# File 'lib/discorb/message_meta.rb', line 111

def id
  @id
end

#name -> String? (readonly)

Returns:

  • (String)

    The name of command.

  • (nil)

    If the message is not a command.



114
115
116
# File 'lib/discorb/message_meta.rb', line 114

def name
  @name
end

#type -> Class (readonly)

Returns The type of interaction.

Returns:

  • (Class)

    The type of interaction.



116
117
118
# File 'lib/discorb/message_meta.rb', line 116

def type
  @type
end

#user -> Discorb::User (readonly)

Returns The user.

Returns:



118
119
120
# File 'lib/discorb/message_meta.rb', line 118

def user
  @user
end