utils

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWarn

func AddWarn(C *typesbot.SNBot, update tgbotapi.Update) int

Возвращает количество варнов

func BanUserFromCas

func BanUserFromCas(C *typesbot.SNBot, update tgbotapi.Update, user tgbotapi.User, cmd, arg string)

inline клавиатура для исключения пользователя

func CasTest

func CasTest(C *typesbot.SNBot, update tgbotapi.Update, cmd, arg string)

Команда проверки на CAS бан /cas и /cas ID

func CheckCasBan

func CheckCasBan(id string) (bool, error)

func CheckTime

func CheckTime(C *typesbot.SNBot, update tgbotapi.Update, year int, month int, day int, hour int, minute int, second int)

func ClearNameWithLinkFromUser

func ClearNameWithLinkFromUser(user tgbotapi.User) (name string)

Принимает тип User и возвращает string с ссылкой

func GetLocTime

func GetLocTime(year, month, day, hour, minute, second int) int64
func GetUserNameWithLink(name string, id int) string

func IntInSlice

func IntInSlice(a int, list []int) bool

func MarkParse

func MarkParse(st string) string

func MarkTest

func MarkTest(C *typesbot.SNBot, update tgbotapi.Update, cmd, arg string)

func ParseMSGDate

func ParseMSGDate(s string) (int, int, int, int, int, int)

func ParseMessage

func ParseMessage(s string) string

func Report

func Report(C *typesbot.SNBot, update tgbotapi.Update, cmd, arg string)

func ResetWarn

func ResetWarn(C *typesbot.SNBot, update tgbotapi.Update)

func ReturnChatID

func ReturnChatID(C *typesbot.SNBot, update tgbotapi.Update, command, arg string)

func ScreenName

func ScreenName(s string) string

func SendReplyCallbackUpdate

func SendReplyCallbackUpdate(C *typesbot.SNBot, update tgbotapi.Update, response string)

func UserIsAdmin

func UserIsAdmin(id int, members []tgbotapi.ChatMember) bool

func WelcomeReplace

func WelcomeReplace(s, user string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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