public

package
v0.0.0-...-d978967 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const DingTalkClientIdKeyName = "DingTalkClientId"

Variables

View Source
var Prompt *[]config.Prompt

Functions

func CheckRequest

func CheckRequest(ts, sg string) bool

func CheckRequestWithCredentials

func CheckRequestWithCredentials(ts, sg string) (clientId string, pass bool)

func FirstCheck

func FirstCheck(rmsg *dingbot.ReceiveMsg) bool

func GetReadTime

func GetReadTime(t time.Time) string

func InitSvc

func InitSvc()

func JudgeAdminUsers

func JudgeAdminUsers(s string) bool

JudgeAdminUsers 判断用户是否为系统管理员

func JudgeGroup

func JudgeGroup(s string) bool

JudgeGroup 判断群ID是否在白名单

func JudgeOutgoingGroup

func JudgeOutgoingGroup(s string) bool

JudgeOutgoingGroup 判断群ID是否在为outgoing白名单

func JudgeSensitiveWord

func JudgeSensitiveWord(s string) bool

JudgeSensitiveWord 判断内容是否包含敏感词

func JudgeUsers

func JudgeUsers(s string) bool

JudgeUsers 判断用户是否在白名单

func JudgeVipUsers

func JudgeVipUsers(s string) bool

JudgeVipUsers 判断用户是否为VIP用户

func OnChatReceive

func OnChatReceive(ctx context.Context, data *chatbot.BotCallbackDataModel) error

func RunBotListener

func RunBotListener(clientId, clientSecret string)

func RunEventListener

func RunEventListener(clientId, clientSecret string)

func SolveSensitiveWord

func SolveSensitiveWord(s string) string

SolveSensitiveWord 将敏感词用 🚫 占位

func WriteToFile

func WriteToFile(path string, data []byte) error

将内容写入到文件,如果文件名带路径,则会判断路径是否存在,不存在则创建

Types

This section is empty.

Jump to

Keyboard shortcuts

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