1
0
mirror of https://github.com/fumiama/NanoBot.git synced 2026-06-09 12:40:24 +08:00

add part of handler

This commit is contained in:
源文雨
2023-10-13 00:36:03 +09:00
parent 3e595b0dee
commit 40f743cf46
6 changed files with 79 additions and 5 deletions

17
bot.go
View File

@@ -4,10 +4,19 @@ import "time"
// Bot 一个机器人实例的配置
type Bot struct {
AppID string // AppID is BotAppID开发者ID
Token string // Token is 机器人令牌
Secret string // Secret is 机器人密钥
Timeout time.Duration // Timeout is API 调用超时
AppID string // AppID is BotAppID开发者ID
Token string // Token is 机器人令牌
Secret string // Secret is 机器人密钥
SuperUsers []string // SuperUsers 超级用户
Timeout time.Duration // Timeout is API 调用超时
Handler *Handler // Handler 注册对各种事件的处理
handlers map[string]GeneralHandleType // handlers 方便调用的 handler
}
// Init 初始化, 只需执行一次
func (b *Bot) Init() {
}
// Authorization 返回 Authorization Header value