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:



636
637
638
# File 'lib/discorb/message.rb', line 636

def id
  @id
end

#name -> String? (readonly)

Returns:

  • (String)

    The name of command.

  • (nil)

    If the message is not a command.



639
640
641
# File 'lib/discorb/message.rb', line 639

def name
  @name
end

#type -> Class (readonly)

Returns The type of interaction.

Returns:

  • (Class)

    The type of interaction.



641
642
643
# File 'lib/discorb/message.rb', line 641

def type
  @type
end

#user -> Discorb::User (readonly)

Returns The user.

Returns:



643
644
645
# File 'lib/discorb/message.rb', line 643

def user
  @user
end