botlib

package module
v0.0.0-...-f4f0292 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCUrrentTime

func GetCUrrentTime() int64

Types

type CasResponse

type CasResponse struct {
	Ok bool
}

type InlineButton

type InlineButton struct {
	Name     string
	Callback string
}

type SNBot

type SNBot struct {
	Bot     *tgbotapi.BotAPI
	Upd     chan tgbotapi.Update
	BotInfo tgbotapi.User
	Service ServiceTemp
	Conf    interface{}
}

func New

func New(token string, config interface{}) (*SNBot, tgbotapi.UpdatesChannel, error)

func (*SNBot) ChatBanMember

func (s *SNBot) ChatBanMember(chatID int64, userID int64) (tgbotapi.Message, error)

func (*SNBot) ChatGetAmdins

func (s *SNBot) ChatGetAmdins(chatID int64) ([]tgbotapi.ChatMember, error)

func (*SNBot) ChatGetMemberInfo

func (s *SNBot) ChatGetMemberInfo(chatID int64, userID int64) (tgbotapi.ChatMember, error)

func (*SNBot) ChatIsUserAdmin

func (s *SNBot) ChatIsUserAdmin(chatID int64, userID int64) (bool, error)

func (*SNBot) ChatKickMember

func (s *SNBot) ChatKickMember(chatID int64, userID int64) (tgbotapi.Message, error)

func (*SNBot) ChatMuteUser

func (s *SNBot) ChatMuteUser(chatID int64, userID int64, timeMuteOffset int64) (*tgbotapi.APIResponse, error)

func (*SNBot) ChatUnbanMember

func (s *SNBot) ChatUnbanMember(chatID int64, userID int64) (*tgbotapi.APIResponse, error)

UNRESTRICT

func (*SNBot) ChatUnmuteMember

func (s *SNBot) ChatUnmuteMember(chatID int64, userID int64) (tgbotapi.Message, error)

func (*SNBot) CreateInlineKeyboard

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

func (*SNBot) DeleteMessage

func (s *SNBot) DeleteMessage(chatID int64, messageID int) (*tgbotapi.APIResponse, 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) ReplySend

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

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

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) SendLocalPhoto

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

func (*SNBot) SendLocalPhotoWithText

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

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 ServiceTemp

type ServiceTemp struct {
	MuteRecursionCount map[int64]int
}

Jump to

Keyboard shortcuts

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