telegram

package
v0.0.0-...-9a318e1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InlineKeyboardButtonMarkup

func InlineKeyboardButtonMarkup(userId int64) tgbotapi.InlineKeyboardMarkup

Types

type Bot

type Bot struct {
	Services *service.Services
	// contains filtered or unexported fields
}

func NewBot

func NewBot(
	bot *tgbotapi.BotAPI,
	con *config.IniConf,
	version string,
	messages config.Messages,
	chatRepository storage.ChatRepository,
	services *service.Services,
) *Bot

func (*Bot) AddScore

func (b *Bot) AddScore(user models.User, score int64) (models.User, error)

func (*Bot) CronInit

func (b *Bot) CronInit(scheduler *cron.Cron)

func (*Bot) CronStart

func (b *Bot) CronStart()

func (*Bot) GenerateImageUserCard

func (b *Bot) GenerateImageUserCard(user models.User) ([]byte, error)

func (*Bot) GetUserProfile

func (b *Bot) GetUserProfile(message *tgbotapi.Message) error

func (*Bot) ReduceScore

func (b *Bot) ReduceScore(user models.User, score int64) (models.User, error)

func (*Bot) SendCallbackAnswer

func (b *Bot) SendCallbackAnswer(query *tgbotapi.CallbackQuery, text string)

func (*Bot) SendTestMessage

func (b *Bot) SendTestMessage(message *tgbotapi.Message) error

func (*Bot) SendWelcomeMessage

func (b *Bot) SendWelcomeMessage(chatId int64)

func (*Bot) Start

func (b *Bot) Start() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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