Versions in this module Expand all Collapse all v0 v0.0.3 Dec 24, 2024 Changes in this version type App + IsSandBox bool + WSSAddr string v0.0.2 Dec 22, 2024 v0.0.1 Dec 22, 2024 Changes in this version + var ATMessageEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSATMessageData) error + var AudioEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSAudioData) error + var Bots = make(map[string]*Bot) + var C2CMessageEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSC2CMessageData) error + var C2CMsgReceiveHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSFriendMsgReveiceData) error + var C2CMsgRejectHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSFriendMsgRejectData) error + var ChannelEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSChannelData) error + var CheckEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, message []byte) bool + var DirectMessageDeleteEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSDirectMessageDeleteData) error + var DirectMessageEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSDirectMessageData) error + var ErrorNotifyHandler func(err error) + var FirstStart bool = true + var ForumAuditEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSForumAuditData) error + var FriendAddEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSFriendAddData) error + var FriendDelEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSFriendDelData) error + var GlobalId int64 = 0 + var GroupAddRobotEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSGroupAddRobotData) error + var GroupAtMessageEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSGroupATMessageData) error + var GroupDelRobotEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSGroupDelRobotData) error + var GroupMessageEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSGroupMessageData) error + var GroupMsgReceiveEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSGroupMsgReceiveData) error + var GroupMsgRejectEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSGroupMsgRejectData) error + var GuildEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSGuildData) error + var GuildMemberEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSGuildMemberData) error + var InteractionEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSInteractionData) error + var MessageAuditEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSMessageAuditData) error + var MessageDeleteEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSMessageDeleteData) error + var MessageEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSMessageData) error + var MessageReactionEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSMessageReactionData) error + var PlainEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, message []byte) error + var PostEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSPostData) error + var PublicMessageDeleteEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSPublicMessageDeleteData) error + var ReadyHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSReadyData) + var ReplyEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSReplyData) error + var SelectPort = map[string]string + var SettingPath = "setting" + var ThreadEventHandler func(bot *BotHeaderInfo, event *dto.WSPayload, data *dto.WSThreadData) error + func Bind(c *gin.Context, req any) error + func CORSMiddleware() gin.HandlerFunc + func FatalError(err error) + func GenerateId() int64 + func GenerateIdStr() string + func HandleValidation(c *gin.Context) + func InitGin() + func InitLog() + func PathExists(path string) bool + func Return(c *gin.Context, resp proto.Message) + func RunGin(engine *gin.Engine, port string) (string, error) + func SafeGo(fn func()) + type App struct + AppId uint64 + AppSecret string + QQ uint64 + Token string + type Bot struct + AppId string + AppSecret string + Openapi openapi.OpenAPI + Payload *dto.WSPayload + QQ uint64 + Token string + WaitingFrames map[string]*promise.Promise + func NewBot(h *BotHeaderInfo, p *dto.WSPayload, m []byte, appId string) *Bot + func (bot *Bot) AddOpenapi(iOpenapi openapi.OpenAPI) *Bot + func (bot *Bot) ParseWHData(h *BotHeaderInfo, p *dto.WSPayload, message []byte) + type BotHeaderInfo struct + ContentLength []string + ContentType []string + UserAgent []string + XBotAppid []string + XSignatureEd25519 []string + XSignatureMethod []string + XSignatureTimestamp []string + XTpsTraceId []string + type Frame struct + BotId uint64 + Echo string + Ok bool + Openapi openapi.OpenAPI + type Setting struct + Apps map[string]*App + CertFile string + CertKey string + Port int + var AllSetting *Setting = &Setting{} + func AllSettings() *Setting + func ReadSetting() Setting + type ValidationRequest struct + EventTs string + PlainToken string + type ValidationResponse struct + PlainToken string + Signature string