botlib

package module
v0.0.0-...-798af50 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: MIT Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 Command

type Command struct {
	Cmd string
	Arg 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
	BotInfo tgbotapi.User
	Conf    Config
	Service ServiceTemp
}

func New

func New(token string) (*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) IsCommand

func (s *SNBot) IsCommand(msg *tgbotapi.Message) (bool, Command)

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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