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:



653
654
655
# File 'lib/discorb/message.rb', line 653

def id
  @id
end

#name -> String? (readonly)

Returns:

  • (String)

    The name of command.

  • (nil)

    If the message is not a command.



656
657
658
# File 'lib/discorb/message.rb', line 656

def name
  @name
end

#type -> Class (readonly)

Returns The type of interaction.

Returns:

  • (Class)

    The type of interaction.



658
659
660
# File 'lib/discorb/message.rb', line 658

def type
  @type
end

#user -> Discorb::User (readonly)

Returns The user.

Returns:



660
661
662
# File 'lib/discorb/message.rb', line 660

def user
  @user
end