discordgo icon indicating copy to clipboard operation
discordgo copied to clipboard

Discordgo error [DG0] wsapi.go:551:onEvent() error unmarshalling READY event, json: cannot unmarshal number into Go struct field ReadState.read_state.last_message_id of type string

Open arsalahmed786 opened this issue 4 years ago • 10 comments

How to fix this error?

[DG0] wsapi.go:551:onEvent() error unmarshalling READY event, json: cannot unmarshal number into Go struct field ReadState.read_state.last_message_id of type string

arsalahmed786 avatar May 08 '20 07:05 arsalahmed786

Are you using a Bot account or a User account when you get this error?

bwmarrin avatar May 11 '20 15:05 bwmarrin

Are you using a Bot account or a User account when you get this error?

My own personal account so it's user account.

arsalahmed786 avatar May 17 '20 19:05 arsalahmed786

Still no support, Please help.

arsalahmed786 avatar May 28 '20 18:05 arsalahmed786

This is caused by using a user account instead of a Bot. It's a harmless warning message though and can be completely ignored.

Are you having any other issues that's causing a problem beyond this being printed out in your log files? If someone that uses users bots can test this enough to say this value is always an integer now, then propose a PR to change the field I'm sure it could be approved and clear up this warning notice in your logs.

@coats1337 I'm not sure if you're talking about a separate issue - if so, can you make a new github issue for it?

bwmarrin avatar Jun 24 '20 13:06 bwmarrin

This is caused by using a user account instead of a Bot. It's a harmless warning message though and can be completely ignored.

Are you having any other issues that's causing a problem beyond this being printed out in your log files? If someone that uses users bots can test this enough to say this value is always an integer now, then propose a PR to change the field I'm sure it could be approved and clear up this warning notice in your logs.

@coats1337 I'm not sure if you're talking about a separate issue - if so, can you make a new github issue for it?

Is there any way that i can make it stop printing it? block it somehow.

arsalahmed786 avatar Aug 04 '20 09:08 arsalahmed786

Removimg ReadState.ReadStateLastMessageID from the Ready Struct should work.

On Tue, Aug 4, 2020, 2:54 AM arsalahmed786 [email protected] wrote:

This is caused by using a user account instead of a Bot. It's a harmless warning message though and can be completely ignored.

Are you having any other issues that's causing a problem beyond this being printed out in your log files? If someone that uses users bots can test this enough to say this value is always an integer now, then propose a PR to change the field I'm sure it could be approved and clear up this warning notice in your logs.

@coats1337 https://github.com/coats1337 I'm not sure if you're talking about a separate issue - if so, can you make a new github issue for it?

Is there any way that i can make it stop printing it? block it somehow.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bwmarrin/discordgo/issues/773#issuecomment-668501851, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALVLAVHQNOMD3Z6SOOQB4DR67LG5ANCNFSM4M364SWQ .

iopred avatar Aug 04 '20 13:08 iopred

Removimg ReadState.ReadStateLastMessageID from the Ready Struct should work. On Tue, Aug 4, 2020, 2:54 AM arsalahmed786 @.***> wrote: This is caused by using a user account instead of a Bot. It's a harmless warning message though and can be completely ignored. Are you having any other issues that's causing a problem beyond this being printed out in your log files? If someone that uses users bots can test this enough to say this value is always an integer now, then propose a PR to change the field I'm sure it could be approved and clear up this warning notice in your logs. @coats1337 https://github.com/coats1337 I'm not sure if you're talking about a separate issue - if so, can you make a new github issue for it? Is there any way that i can make it stop printing it? block it somehow. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#773 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALVLAVHQNOMD3Z6SOOQB4DR67LG5ANCNFSM4M364SWQ .

I don't have this "ReadState.ReadStateLastMessageID" on my sources but i'm still getting this DG0 error is there anyway to hide it? flag to somehow please help me.

arsalahmed786 avatar Aug 05 '20 07:08 arsalahmed786

Does anyone know if there is a way to suppress this?

Craftzman7 avatar Nov 14 '21 05:11 Craftzman7

For anyone still getting that popup and wanting to suppress it

import (
    "log"
    "io/ioutil"
)

func init() {
    log.SetOutput(ioutil.Discard)
}

LAD1 avatar Sep 02 '22 01:09 LAD1

For anyone still getting that popup and wanting to suppress it

Thank you.

Craftzman7 avatar Sep 02 '22 02:09 Craftzman7