easy

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EasyApi

type EasyApi struct {
	*EasyCallback
	*EasyDownloadFile
	*EasyApiKeyboard

	NoReplace    bool
	MarkdownMode string
	// contains filtered or unexported fields
}

func NewEasyApi

func NewEasyApi(api *tgbotapi.BotAPI, lastMessageStorage lastMessageStorage) *EasyApi

func (*EasyApi) Api added in v0.0.2

func (a *EasyApi) Api() *tgbotapi.BotAPI

func (*EasyApi) NewMessage added in v0.0.2

func (a *EasyApi) NewMessage(update tgbotapi.Update, text string) (*tgbotapi.MessageConfig, error)

func (*EasyApi) NewMessageMk2 added in v0.0.2

func (a *EasyApi) NewMessageMk2(update tgbotapi.Update, text string) (*tgbotapi.MessageConfig, error)

func (*EasyApi) Send added in v0.0.2

func (a *EasyApi) Send(chattable tgbotapi.Chattable) (tgbotapi.Message, error)

func (*EasyApi) SendChattable added in v0.0.2

func (a *EasyApi) SendChattable(update tgbotapi.Update, chattable tgbotapi.Chattable) (tgbotapi.Message, error)

func (*EasyApi) SendChattableCommand added in v0.0.2

func (a *EasyApi) SendChattableCommand(
	update tgbotapi.Update,
	chattable tgbotapi.Chattable,
	command string,
) (tgbotapi.Message, error)

func (*EasyApi) SendEasyMessage added in v0.0.2

func (a *EasyApi) SendEasyMessage(easyMessage *Message) (*tgbotapi.Message, error)

func (*EasyApi) SendMessage

func (a *EasyApi) SendMessage(update tgbotapi.Update, text string) (tgbotapi.Message, error)

func (*EasyApi) SendMessageCommand

func (a *EasyApi) SendMessageCommand(update tgbotapi.Update, text string, command string) (tgbotapi.Message, error)

type EasyApiKeyboard added in v0.0.2

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

func (*EasyApiKeyboard) SendKeyboard added in v0.0.2

func (a *EasyApiKeyboard) SendKeyboard(update tgbotapi.Update, keyboard EasyKeyboard, text string, tryInline bool)

type EasyCallback added in v0.0.2

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

func (*EasyCallback) AnswerCallback added in v0.0.2

func (a *EasyCallback) AnswerCallback(update tgbotapi.Update, text string)

func (*EasyCallback) AnswerEmptyCallback added in v0.0.2

func (a *EasyCallback) AnswerEmptyCallback(update tgbotapi.Update)

type EasyDownloadFile added in v0.0.2

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

func (*EasyDownloadFile) DownloadFileString added in v0.0.2

func (d *EasyDownloadFile) DownloadFileString(fileId string) (string, error)

func (*EasyDownloadFile) DownloadFileStringOld added in v0.0.2

func (d *EasyDownloadFile) DownloadFileStringOld(fileId string) (string, error)

DownloadFileStringOld deprecated

type EasyKeyboard

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

func (*EasyKeyboard) Add

func (k *EasyKeyboard) Add(text string, data string)

func (*EasyKeyboard) AddSplit

func (k *EasyKeyboard) AddSplit()

func (EasyKeyboard) InlineKeyboardMarkup

func (k EasyKeyboard) InlineKeyboardMarkup() tgbotapi.InlineKeyboardMarkup

func (*EasyKeyboard) SetWidth

func (k *EasyKeyboard) SetWidth(width int) *EasyKeyboard

type Key

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

type KeySplit

type KeySplit struct{}

type Message added in v0.0.2

type Message struct {
	ParseMode string
	// contains filtered or unexported fields
}

func NewMessage added in v0.0.2

func NewMessage(update *tgbotapi.Update, text string) *Message

func (*Message) WithCommand added in v0.0.2

func (m *Message) WithCommand(command string) *Message

func (*Message) WithDeepSetup added in v0.0.2

func (m *Message) WithDeepSetup(f func(message tgbotapi.Message) error) *Message

func (*Message) WithOldReplace added in v0.0.2

func (m *Message) WithOldReplace() *Message

func (*Message) WithParseMk2 added in v0.0.2

func (m *Message) WithParseMk2() *Message

Jump to

Keyboard shortcuts

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