WardrikSlack. Messages
(wardrik_slack v0.1.0-rc.1)
Copy Markdown
Passes messages posted in Slack channels to WardrikChannel.received/2, and reacts to them.
- A message the agent takes gets :eyes:, then :white_check_mark: once it's answered.
- A message the agent couldn't take gets a reply in its thread saying why.
Ignores edits, deletions, messages from bots (the app included), direct messages, and messages from people in another workspace.
Summary
Functions
Swaps :eyes: for :white_check_mark: on the answered messages ids.
Passes a message event to the room's agent. bot is the app's own member ID.
Returns the member user, with the name Slack shows for them.
Removes :eyes: from the messages ids, when a run stops before answering.
Functions
@spec answered(WardrikChannel.Workspace.t(), String.t(), [String.t()]) :: :ok
Swaps :eyes: for :white_check_mark: on the answered messages ids.
@spec event(WardrikChannel.Workspace.t(), map(), String.t()) :: {:asked, String.t()} | :ignored | {:error, String.t()}
Passes a message event to the room's agent. bot is the app's own member ID.
Returns {:asked, conversation}, :ignored, or {:error, message} after replying with it.
@spec sender(WardrikChannel.Workspace.t(), String.t()) :: WardrikChannel.Member.t()
Returns the member user, with the name Slack shows for them.
@spec stopped(WardrikChannel.Workspace.t(), String.t(), [String.t()]) :: :ok
Removes :eyes: from the messages ids, when a run stops before answering.