chats

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callback

type Callback struct {
	Id      string
	Chat    Chat
	Payload keyboards.Payload
}

func (Callback) SendAnswer

func (callback Callback) SendAnswer(answer CallbackAnswer)

type CallbackAnswer

type CallbackAnswer struct {
	Text string
}

type Chat

type Chat interface {
	SendMessage(message Message)
	UploadImage(file files.File) attachments.Image
	GetId() uint
}

type Client

type Client struct {
	ButtonActions  []string
	Keyboard       bool
	InlineKeyboard bool
	Carousel       bool
}

type ConversationChat

type ConversationChat uint

func (ConversationChat) GetId

func (chat ConversationChat) GetId() uint

func (ConversationChat) SendMessage

func (chat ConversationChat) SendMessage(message Message)

func (ConversationChat) UploadImage added in v1.1.0

func (chat ConversationChat) UploadImage(file files.File) attachments.Image

type Message

type Message struct {
	Text        string
	Template    templates.Template
	Keyboard    keyboards.Keyboard
	Attachments []attachments.Attachment
}

type OutgoingMessage

type OutgoingMessage struct {
	Text        string
	User        users.User
	Payload     keyboards.Payload
	Attachments []attachments.Attachment
	Client      Client
}

type UserChat

type UserChat uint

func (UserChat) GetId

func (chat UserChat) GetId() uint

func (UserChat) SendMessage

func (chat UserChat) SendMessage(message Message)

func (UserChat) UploadImage added in v1.1.0

func (chat UserChat) UploadImage(file files.File) attachments.Image

Jump to

Keyboard shortcuts

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