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:



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

def id
  @id
end

#name -> String? (readonly)

Returns:

  • (String)

    The name of command.

  • (nil)

    If the message is not a command.



645
646
647
# File 'lib/discorb/message.rb', line 645

def name
  @name
end

#type -> Class (readonly)

Returns The type of interaction.

Returns:

  • (Class)

    The type of interaction.



647
648
649
# File 'lib/discorb/message.rb', line 647

def type
  @type
end

#user -> Discorb::User (readonly)

Returns The user.

Returns:



649
650
651
# File 'lib/discorb/message.rb', line 649

def user
  @user
end