1
0
mirror of https://github.com/fumiama/NanoBot.git synced 2026-06-07 19:50:24 +08:00
This commit is contained in:
源文雨
2023-10-19 00:55:14 +09:00
parent fdc7d729b8
commit da5cad685a
2 changed files with 10 additions and 7 deletions

View File

@@ -55,7 +55,7 @@ type EventReady struct {
}
// GetEventReady OpCodeDispatch READY
func (wp *WebsocketPayload) GetEventReady() (er EventReady, err error) {
func (wp *WebsocketPayload) GetEventReady() (er EventReady, seq uint32, err error) {
if wp.Op != OpCodeDispatch {
err = errors.New(getThisFuncName() + " unexpected OpCode " + strconv.Itoa(int(wp.Op)) + ", T: " + wp.T + ", D: " + BytesToString(wp.D))
return
@@ -64,6 +64,7 @@ func (wp *WebsocketPayload) GetEventReady() (er EventReady, err error) {
err = errors.New(getThisFuncName() + " unexpected event type " + wp.T + ", T: " + wp.T + ", D: " + BytesToString(wp.D))
return
}
seq = wp.S
err = json.Unmarshal(wp.D, &er)
return
}