Class: Discorb::Message::Interaction

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

Overview

Represents a interaction of message.

Instance Attribute Summary collapse

Method Summary

Methods inherited from DiscordModel

#==, #eql?, #hash

Instance Attribute Details

#id -> Discorb::Snowflake (readonly)

Returns The user ID.

Returns:



610
611
612
# File 'lib/discorb/message.rb', line 610

def id
  @id
end

#name -> String? (readonly)

Returns:

  • (String)

    The name of command.

  • (nil)

    If the message is not a command.



613
614
615
# File 'lib/discorb/message.rb', line 613

def name
  @name
end

#type -> Class (readonly)

Returns The type of interaction.

Returns:

  • (Class)

    The type of interaction.



615
616
617
# File 'lib/discorb/message.rb', line 615

def type
  @type
end

#user -> Discorb::User (readonly)

Returns The user.

Returns:



617
618
619
# File 'lib/discorb/message.rb', line 617

def user
  @user
end