Class: ChatSDK::Events::SlashCommand

Inherits:
Base
  • Object
show all
Defined in:
lib/chat_sdk/events/slash_command.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#adapter_name, #platform, #raw, #timestamp, #type

Instance Method Summary collapse

Constructor Details

#initialize(command:, user_id:, channel_id:, text: "", trigger_id: nil, **kwargs) ⇒ SlashCommand

Returns a new instance of SlashCommand.



9
10
11
12
13
14
15
16
# File 'lib/chat_sdk/events/slash_command.rb', line 9

def initialize(command:, user_id:, channel_id:, text: "", trigger_id: nil, **kwargs)
  super(type: :slash_command, **kwargs)
  @command = command
  @text = text
  @user_id = user_id
  @channel_id = channel_id
  @trigger_id = trigger_id
end

Instance Attribute Details

#channel_idObject (readonly)

Returns the value of attribute channel_id.



6
7
8
# File 'lib/chat_sdk/events/slash_command.rb', line 6

def channel_id
  @channel_id
end

#commandObject (readonly)

Returns the value of attribute command.



6
7
8
# File 'lib/chat_sdk/events/slash_command.rb', line 6

def command
  @command
end

#textObject (readonly)

Returns the value of attribute text.



6
7
8
# File 'lib/chat_sdk/events/slash_command.rb', line 6

def text
  @text
end

#threadObject

Returns the value of attribute thread.



7
8
9
# File 'lib/chat_sdk/events/slash_command.rb', line 7

def thread
  @thread
end

#trigger_idObject (readonly)

Returns the value of attribute trigger_id.



6
7
8
# File 'lib/chat_sdk/events/slash_command.rb', line 6

def trigger_id
  @trigger_id
end

#user_idObject (readonly)

Returns the value of attribute user_id.



6
7
8
# File 'lib/chat_sdk/events/slash_command.rb', line 6

def user_id
  @user_id
end