messages

package
v0.8.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Receive

type Receive struct {
	Question  *query.Question `json:"question"`
	ReplyOpts *ReplyOpts
	Channel   string
}

Receive question from channel with reply options

func (*Receive) Conversation added in v0.6.0

func (r *Receive) Conversation() string

Conversation returns a string of the unique conversations the bot is having. The definition of a "conversation" is different depending on the channel used. For example Slack conversations happen in Slack threads, which is different than a conversation in Twilio between a Sender and Recipient. In the Slack example this allows us to have multiple different conversations with the bot in different Slack channels and threads

type ReplyOpts

type ReplyOpts struct {
	Telegram TelegramReplyOpts
	Twilio   TwilioReplyOpts
	Slack    SlackReplyOpts
}

ReplyOpts allow you to configure how the reply is sent

type Response

type Response struct {
	Answers   []query.Answer
	ReplyOpts *ReplyOpts
}

Response with answers to channel with reply options

type SlackReplyOpts

type SlackReplyOpts struct {
	Channel string
	TS      string
}

SlackReplyOpts are options used to reply with Slack

type TelegramReplyOpts

type TelegramReplyOpts struct {
	Recipient string
}

TelegramReplyOpts are options used to reply with Telegram

type TwilioReplyOpts

type TwilioReplyOpts struct {
	Recipient string
}

TwilioReplyOpts are options used to reply with Twilio

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL