message

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: Apache-2.0 Imports: 3 Imported by: 5

Documentation

Overview

Package message 内提供了用于支撑处理消息对象的工具和方法。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ETLInput

func ETLInput(input string) string

ETLInput 清理输出

  • 去掉@结构
  • trim

func Emoji

func Emoji(id int) string

Emoji emoji 内嵌格式,参考 https://bot.q.qq.com/wiki/develop/api/openapi/emoji/model.html 只支持 type = 1 的系统表情

func MentionAllUser

func MentionAllUser() string

MentionAllUser 返回 at all 的内嵌格式

func MentionChannel

func MentionChannel(channelID string) string

MentionChannel 提到子频道的格式

func MentionUser

func MentionUser(userID string) string

MentionUser 返回 at 用户的内嵌格式 https://bot.q.qq.com/wiki/develop/api/openapi/message/message_format.html

Types

type CMD

type CMD struct {
	Cmd     string
	Content string
}

CMD 一个简单的指令结构

func ParseCommand

func ParseCommand(input string) *CMD

ParseCommand 解析命令,支持 `{cmd} {content}` 的命令格式

Jump to

Keyboard shortcuts

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