telegram

package
v0.0.0-...-955412f Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TelegramBot

type TelegramBot struct {
	Api     *tgbotapi.BotAPI
	Queue   *queue.Queue
	Storage TelegramStorage
}

func NewTelegramBot

func NewTelegramBot(token string, storage TelegramStorage, queue *queue.Queue) (*TelegramBot, error)

func (*TelegramBot) Start

func (bot *TelegramBot) Start()

type TelegramStorage

type TelegramStorage interface {
	InsertUser(username string, chatId int) error
	GetAllUsers(chatId int) (*[]entity.ChatUser, bool, error)
	DeleteUser(username string, chatId int) error
	GetUser(username string, chatId int) (*entity.ChatUser, bool, error)
}

Jump to

Keyboard shortcuts

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