Class: Context
- Inherits:
-
Object
- Object
- Context
- Defined in:
- src/models/context.rb
Instance Attribute Summary collapse
-
#channel ⇒ Channel?
The current channel replies are sent to.
-
#initial_message ⇒ Message?
The message that started the interaction.
-
#last_message ⇒ Message?
The latest user message in the interaction.
-
#thread ⇒ MessageThread?
The current thread replies are sent to.
-
#user ⇒ User?
The user initiating the interaction.
Instance Method Summary collapse
-
#system? ⇒ Boolean
Check if this is a system event (triggered by SkillActions.on_start or SkillActions.on_stop).
Instance Attribute Details
#channel ⇒ Channel?
Returns the current channel replies are sent to
3 4 5 |
# File 'src/models/context.rb', line 3 def channel @channel end |
#initial_message ⇒ Message?
Returns the message that started the interaction
12 13 14 |
# File 'src/models/context.rb', line 12 def @initial_message end |
#last_message ⇒ Message?
Returns the latest user message in the interaction
15 16 17 |
# File 'src/models/context.rb', line 15 def @last_message end |
#thread ⇒ MessageThread?
Returns the current thread replies are sent to
9 10 11 |
# File 'src/models/context.rb', line 9 def thread @thread end |
#user ⇒ User?
Returns the user initiating the interaction
6 7 8 |
# File 'src/models/context.rb', line 6 def user @user end |
Instance Method Details
#system? ⇒ Boolean
Check if this is a system event (triggered by SkillActions.on_start or SkillActions.on_stop)
58 59 60 |
# File 'src/models/context.rb', line 58 def system? !@user end |