GreaterGamersLounge / bot_man

MIT License
0 stars 1 forks source link

Figure out why we're suddenly seeing very few events #133

Closed dracco1993 closed 3 years ago

dracco1993 commented 3 years ago

Since this bot was publicly launched, it's been getting anywhere from 10k-30k events per day, very consistently.

However, starting on 2020-10-27, it's been getting sub 2k/day.

Everything appears to still be working, so that's good, it's just very odd, and we should make sure that we're still getting the data we need from the API.

Here's the processed events/day graph from sidekiq:

kringeth000 commented 3 years ago

Maybe I'm crazy, but I feel like I remember reading something when we were setting up stuff that they would be limiting what information is accessible through the gateway after a certain date....I need to see if I can find that again 🤔

dracco1993 commented 3 years ago

@kringeth000 Yeah, I seem to recall talking about that. I looked through a bit of the documentation, and couldn't find it, but maybe you'll have better luck.

dracco1993 commented 3 years ago

After a lot of data finagling, I finally got this graph, which is actually super helpful:

dracco1993 commented 3 years ago

Same thing, but removed the Events::PresenceUpdateEvent and GrandTotal lines for a more detailed look:

dracco1993 commented 3 years ago

Discord actually enforcing this is almost certainly what happened, although at a later date than they originally specified: https://discord.com/developers/docs/topics/gateway#privileged-intents

dracco1993 commented 3 years ago

So, this is tied to the Gateway the bot is using to interact with Discord; it looks like the max available is v8, but the bot is currently using v6: 👀

https://github.com/discordrb/discordrb/blob/master/lib/discordrb/gateway.rb#L137

dracco1993 commented 3 years ago

Looks like I'm updating the version the bot uses... hopefully that's not too painful... 😅

kringeth000 commented 3 years ago

@dracco1993 Yeah that sounds about right lol. Maybe v8 brings some new features to the table? 👀

dracco1993 commented 3 years ago

I did the thing... 👀