Class: ChatSDK::Events::SlashCommand
- Defined in:
- lib/chat_sdk/events/slash_command.rb
Instance Attribute Summary collapse
-
#channel_id ⇒ Object
readonly
Returns the value of attribute channel_id.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#thread ⇒ Object
Returns the value of attribute thread.
-
#trigger_id ⇒ Object
readonly
Returns the value of attribute trigger_id.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Attributes inherited from Base
#adapter_name, #platform, #raw, #timestamp, #type
Instance Method Summary collapse
-
#initialize(command:, user_id:, channel_id:, text: "", trigger_id: nil, **kwargs) ⇒ SlashCommand
constructor
A new instance of SlashCommand.
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_id ⇒ Object (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 |
#command ⇒ Object (readonly)
Returns the value of attribute command.
6 7 8 |
# File 'lib/chat_sdk/events/slash_command.rb', line 6 def command @command end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
6 7 8 |
# File 'lib/chat_sdk/events/slash_command.rb', line 6 def text @text end |
#thread ⇒ Object
Returns the value of attribute thread.
7 8 9 |
# File 'lib/chat_sdk/events/slash_command.rb', line 7 def thread @thread end |
#trigger_id ⇒ Object (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_id ⇒ Object (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 |