sender

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

type Button struct {
	// contains filtered or unexported fields
}

Button is button structure in the message

func NewButton added in v0.1.0

func NewButton() *Button

NewButton create new button

func (*Button) GetPosition

func (b *Button) GetPosition() (int, int)

GetPosition is getter

func (*Button) GetText

func (b *Button) GetText() string

GetText is getter

func (*Button) GetURL

func (b *Button) GetURL() string

GetURL is getter

func (*Button) Position added in v0.1.0

func (b *Button) Position(row, column int) *Button

Position sets button position in the buttons grid

func (*Button) Text added in v0.1.0

func (b *Button) Text(text string) *Button

Text sets button text

func (*Button) URL added in v0.1.0

func (b *Button) URL(url string) *Button

URL sets button url

type Message

type Message interface {
	AsReply(asReply bool) Message
	AddButton(button *Button) *Button
	AddButtons(buttons ...*Button) []*Button
	SetText(text string) Message
	Send(ctx context.Context) error
}

Message is interface to construct messages

type Sender

type Sender interface {
	NewMessage(context.Context) Message
}

Sender is interface to create and send messages

Jump to

Keyboard shortcuts

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