typesbot

package
v0.0.0-...-eb4ed60 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CasResponse

type CasResponse struct {
	Ok bool
}

type Conf

type Conf struct {
	URL       int64
	ModerChat int64
	Operators []int
	TimeMute  string
	Warns     int
	TokenPath string
	BdPath    string
	BdType    string
}

type Config

type Config struct {
	Token      string
	UpdateTime int
}

type InlineButton

type InlineButton struct {
	Name     string
	Callback string
}

type SNBot

type SNBot struct {
	Cfg *Config
	Bot *tgbotapi.BotAPI
	//Upd  tgbotapi.UpdatesChannel
	Upd  chan tgbotapi.Update
	Db   bd.DB
	Conf Conf
}

func (*SNBot) CreateInlineKeyboard

func (s *SNBot) CreateInlineKeyboard(keyboard [][]InlineButton) tgbotapi.InlineKeyboardMarkup

func (*SNBot) DeleteMessage

func (s *SNBot) DeleteMessage(chatID int64, messageID int) (tgbotapi.Message, error)

func (*SNBot) EditMessage

func (s *SNBot) EditMessage(chatID int64, msgID int, msg string) (tgbotapi.Message, error)

func (*SNBot) EditMessageKeyboard

func (s *SNBot) EditMessageKeyboard(chatID int64, msgID int, msg string, board tgbotapi.InlineKeyboardMarkup) (tgbotapi.Message, error)

func (*SNBot) Forward

func (s *SNBot) Forward(chatID int64, fromChatID int64, replyID int) (tgbotapi.Message, error)

func (*SNBot) Send

func (s *SNBot) Send(chatID int64, msg string) (tgbotapi.Message, error)

Send Send(chatID int64, msg string) send Message to chat by id ____

func (*SNBot) SendPhoto

func (s *SNBot) SendPhoto(chatID int64, pic string) (tgbotapi.Message, error)

SendPhoto Send(chatID int64, msg string) send Message to chat by id

func (*SNBot) SendReply

func (s *SNBot) SendReply(chatID int64, replyID int, msg string) (tgbotapi.Message, error)

Send Send(chatID int64, msg string) send Message to chat by id ____

func (*SNBot) SendReplyKeyboard

func (s *SNBot) SendReplyKeyboard(chatID int64, replyID int, msg string, board tgbotapi.InlineKeyboardMarkup) (tgbotapi.Message, error)

Send Send(chatID int64, msg string) send Message to chat by id ____

type Token

type Token struct {
	Token string
}

Jump to

Keyboard shortcuts

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