riptl / discord-influx

Discord ➡️ InfluxDB metrics exporter
MIT License
21 stars 2 forks source link

Streaming too fast causes api to deny requests #5

Closed MSmithDev closed 3 years ago

MSmithDev commented 4 years ago

Im having an issue trying to add one of my servers. It started sending a bunch a data then the api started refusing any more requests. How could i slow this down to get all the data without being penalized by discord?

Flushed 128 aggregations Flushed 128 aggregations Flushed 128 aggregations Flushed 128 aggregations Flushed 128 aggregations Flushed 128 aggregations Flushed 128 aggregations Flushed 128 aggregations Flushed 128 aggregations Flushed 27 aggregations Message stream aborted: HTTP status client error (403 Forbidden) for url (https://discordapp.com/api/v6/channels/##########messages?limit=100&after=0)

riptl commented 4 years ago

I'll look into this. I think rate-limits would be 429 status codes. 403 Forbidden usually means that the passed token doesn't have permission to access a resource (private text channel?). What arguments did you spawn the app with?

MSmithDev commented 4 years ago

You are absolutely correct, that was my fault. It was a couple channels it didn't have perms in. Sorry.

riptl commented 4 years ago

@MSmithDev Absolutely no worries, I consider it a bug that no better error message gets printed, so I'm reopening this.

riptl commented 3 years ago

Done in latest version