u/Verial0

Rate limited but following rate limits?

Hi, I am trying to program a bot in Python, and currently I want to get all the user message history of a user, so, I am running a command in a while True cycle with a 0.1 seconds wait per cycle.

I know about rate limits, and check the "retry_after" of the 429 code, I wait those second and then I continue.

Also, I follow the bucket rules, so I check the X-RateLimit-Remaining, and if it's = 0 I wait the X-RateLimit-Reset-After.

When I wait for the time given by the headers received, I also add 0.2 just in case my computer's clock is misaligned to Discord's API.

Yet, after a few buckets (2/3 buckets), I start having a 200 status code, and 429. Another 200 status code, and 429. Etc. Why?

After the 429 code I do wait for the Reset-After, as such, I get the 200 code, but why does it give me 200 once, 429 after, and so on? What am I missing?

Edit: Solved, with the gentle help of SolsticeShard, I solved the issue. Or rather, I understood the reason behind the issue. I am on a shared IP, and the 429s I was receiving where because of them. Thank you very much!

reddit.com
u/Verial0 — 2 days ago

Message history of specific user

Hi, I'm making a server discord bot in python via discord.py library.

I'm wondering, if I want to fetch a specific user's message history, is it possibile?

I see channel's history, but not a user's one. Fetching a specific user's message history from a specific channel is also fine.

The point is that I would like to totally ignore some other users' messages and not waste calls to Discord's API for users I'm gonna ignore anyway.

Any help is appreciated :)

reddit.com
u/Verial0 — 4 days ago
▲ 1 r/torino

Piazza Sabotino/Via Dante dei Nanni

Ciao ragazzi, sono una ragazza e mi trasferirò non troppo lontano da Pizza Sabotino/Via Dante dei Nanni. Consigli per la sopravvivenza? È particolarmente pericoloso? Orari particolari da evitare?

Mi sa che da quel che ho letto è principalmente Via Dante dei Nanni dalla parte della chiesa San Bernardino a Piazza Sabotino che è un po' meh, ma, tranne la Piazza Sabotino, quella parte della via posso evitarla.

Poi per il resto via Dante dei Nanni era interessante solo per la farmacia, il ristorante DimSum Luca da provare e al limite la fumetteria, ma appunto non sono cose per cui necessito di frequentare tale via troppo spesso o di sera.

Ogni consiglio è ben accetto.

reddit.com
u/Verial0 — 7 days ago

Per gli studenti di Camplus

Ciao ragazzi, sono uno studente che a settembre andrà ad un Camplus.

Come vi siete trovati? Camplus offre eventi in quanto organizzazione o ogni campus è vivo solo se gli studenti sono vivi e organizzano cose di loro spontanea volontà?

Inoltre, sui regolamenti non trovo niente a riguardo, quindi se c'è qualche studente che abita già in uno dei Camplus magari sa rispondermi. Si può portare nella propria camera personale la friggitrice ad aria o non è consentita?

reddit.com
u/Verial0 — 11 days ago

Hi, I'm 22, I live a quite sedentary lifestyle and I am a bit overweight BMI 25.9.

I had my lab test results and they are the following:

HDL: 44 mg/dl

LDL: 130 mg/dl

Lipoprotein (a): 44 mg/dl

I don't smoke

I'm really really ignorant, what should I do? I guess lose some weight and try to eat healthier.

What should I do? Avoid some type of food? Go to the gym? Lose some weight?

It is very hard for me, I'm a uni student living alone, most of the time I pass it studying, and I have had some eating disorders in the past. This really makes me stressed as I really don't know what to do next.

Any piece of advice is appreciated.

PS. My granddad died because of a stroke, and my parents have a high lipoprotein(a) value (one 40, the other 90)

reddit.com
u/Verial0 — 22 days ago