Documentation
¶
Index ¶
Constants ¶
View Source
const SearchID = "search" // ID
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Commands map[string][]string `json:"commands"` // 命令关键字 Reply Reply `json:"reply"` // 回复配置 }
配置
type Reply ¶
type Reply struct { SearchFailed string `json:"searchFailed"` // 搜索失败的回复 SendResultFailed string `json:"sendResultFailed"` // 发送搜索结果失败的回复 }
回复配置
type Search ¶
type Search interface { // 搜索text Search(text string) ([]search_utils.SearchResult, error) }
搜索接口
type SearchBot ¶
type SearchBot struct {
// contains filtered or unexported fields
}
搜索机器人
func (*SearchBot) HandleGroupMessage ¶
func (b *SearchBot) HandleGroupMessage(qqClient *client.QQClient, msg *message.GroupMessage, cmd map[interface{}]struct{}, keyword string)
处理群聊消息,实现Command接口
func (*SearchBot) HandlePrivateMessage ¶
func (b *SearchBot) HandlePrivateMessage(qqClient *client.QQClient, msg *message.PrivateMessage, cmd map[interface{}]struct{}, keyword string)
处理私聊消息,实现Command接口
Click to show internal directories.
Click to hide internal directories.