service

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBotIDToSet added in v0.1.2

func AddBotIDToSet(botID int64) error

func CreateKeyworldHistory

func CreateKeyworldHistory(req *request.KeyworldHistoryInfo) error

func CreateKeyworldHistoryEx

func CreateKeyworldHistoryEx(
	chatID, senderID int64, senderUsername string,
	messageID int64, messageContentText string, messageLink string,
	keyworld string,
	messageDateStr string,
	messageDate int64,
) error

func GetBlockLongTextMaxCount added in v0.1.3

func GetBlockLongTextMaxCount() int

func GetChatTitle added in v0.1.3

func GetChatTitle(chatID int64) string

func GetUserFirstLastName added in v0.1.3

func GetUserFirstLastName(userID int64) string

func GetUsername added in v0.1.2

func GetUsername(userID int64) string

func GetUsernames added in v0.1.2

func GetUsernames(userID int64) []string

func IsBotID added in v0.1.2

func IsBotID(userID int64) bool

func IsEnableBlockLongText added in v0.1.3

func IsEnableBlockLongText() bool

func ProcessMessageKeywords added in v0.1.3

func ProcessMessageKeywords(
	chatID, senderID int64, senderUsername string,
	messageID int64, messageDateStr, messageContentText, originalText string,

	messageIsTopicMessage bool,
	messageDate int64,
)

processMessageKeywords 处理消息关键词 chatID 回话ID senderID 发送者ID messageID 消息ID messageDate 消息日期 messageContentText 消息内容(处理过的) originalText 原始消息内容 messageLink 消息链接 messageLinkIsPublic 消息链接是否为公开链接

func SendMessage added in v0.1.3

func SendMessage(
	formMessageID int64,
	chatID, senderID int64, toChatID int64, botToken,
	messageIDStr, messageDate, messageContentText string, messageLink string, messageLinkIsPublic bool,
	keyworld string,
) (string, error)

processMessageKeywords 处理消息关键词 formMessageID 消息ID botToken 机器人Bot toChatID 发送到ID messageIDStr fmt.Sprintf("%d_%d", chatID, messageID) messageContentText 消息内容(处理过的)

func SetUserFirstLastName added in v0.1.3

func SetUserFirstLastName(userID int64, firstLastName string) error

func SetUsername added in v0.1.2

func SetUsername(userID int64, usernames string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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