Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This plugin made discord ban my IP address #450

Open
GitKactus opened this issue Aug 25, 2023 · 26 comments
Open

This plugin made discord ban my IP address #450

GitKactus opened this issue Aug 25, 2023 · 26 comments

Comments

@GitKactus
Copy link

GitKactus commented Aug 25, 2023

Plugin worked, perhaps a little too well. I've been IP banned on discord and can only use discord from my phone through mobile data. Didn't even send any messages via pidgin.
Appear to have gone up against their rate limits https://discord.com/developers/docs/topics/rate-limits

Also I was hoping for a plugin that just did private messages, instead got one that showed me mostly messages from servers I have muted.

@LurkerHub
Copy link

Same here:

You are being blocked from accessing our API temporarily due to exceeding our rate limits frequently. Please read our docs at https://discord.com/developers/docs/topics/rate-limits to prevent this moving forward.

How do I disable this behaviour?

@JenoraFeuer
Copy link

This is an issue that has been around for a while; right now the only fix seems to be to disable 'Fetch unread messages when account connects' in the Advanced tab of the configuration, though you have to do that before connecting. It seems to be that pre-fetch that gets Discord upset about going over the rate limits.

Unfortunately, especially since you seem to want to use this primarily for private messages, disabling that option means that the plugin won't fetch any private messages that have arrived while you're offline. It also disables messages tagged to you (or @everyone or any group you're a part of) in other servers, but for me the biggest issue is that it doesn't grab private messages when that option is turned off. But at least the other Pidgin capabilities work.

@alexolog
Copy link

I am getting tempbanned right and left because of that.
It is ridiculous that the choice is between loss of (potentially important) messages and loss of access.

@EionRobb please please please fix it!

@legofanlovessayori
Copy link

legofanlovessayori commented Dec 12, 2023

seems like that toggle does absolutely nothing cause my pidgin just spams tabs / windows when logging in (with setting toggled to off while adding the account)

(joined a lot of servers so yeah)

is it not possible to just not open chat windows automaticly

@LurkerHub
Copy link

This is an issue that has been around for a while; right now the only fix seems to be to disable 'Fetch unread messages when account connects' in the Advanced tab of the configuration, though you have to do that before connecting. It seems to be that pre-fetch that gets Discord upset about going over the rate limits.

Unfortunately, especially since you seem to want to use this primarily for private messages, disabling that option means that the plugin won't fetch any private messages that have arrived while you're offline. It also disables messages tagged to you (or @everyone or any group you're a part of) in other servers, but for me the biggest issue is that it doesn't grab private messages when that option is turned off. But at least the other Pidgin capabilities work.

It does not work.
The moment somebody tags @here or @everyone on a busy channel, regardless of that setting, BAM! temporary ban and I cannot use Discord for hours.

Does anyone have an old DLL that doesn't fetch history at all?

@Metalhead33
Copy link

This is still a problem, even as of 2024 October.

It tends to happen "from time to time", but even then, it's rather annoying. It would be great if we could do something about it, maybe avoiding the @here and @everyone mentions or something.

For some reason, this wasn't a problem at all in 2022.

@sebbu2
Copy link

sebbu2 commented Oct 4, 2024

The thing is that AFAIK fetch unread ignore muted status on channels, while people usuallly only want to know mentions and new PM, so it uses a lotof space/bandwidth... add to that an unstable connection, status not being kept and the same data being resent... rate limits gets reached.

@alexolog
Copy link

alexolog commented Oct 4, 2024

The correct way to fix it is to support rate limits

@Metalhead33
Copy link

This has gotten worse in the last couple of days. Now I get automatically rate-limited whenever my old rate limit expires. What the hell. At this rate, I might as well take matters into my own hand and look into the code.

@Metalhead33
Copy link

I decided to take matters into my own hands.

@LurkerHub
Copy link

Thank you @Metalhead33!
I hope for a Windows DLL, so I can start using Pidgin again.

@EionRobb
Copy link
Owner

Thank you @Metalhead33! I hope for a Windows DLL, so I can start using Pidgin again.

There's a dll build of that PR at https://github.com/EionRobb/purple-discord/actions/runs/11470276591/artifacts/2091519359 if you want to try it out @LurkerHub

@LurkerHub
Copy link

LurkerHub commented Oct 23, 2024

Thank you @Metalhead33! I hope for a Windows DLL, so I can start using Pidgin again.

There's a dll build of that PR at EionRobb/purple-discord/actions/runs/11470276591/artifacts/2091519359 if you want to try it out @LurkerHub

Unfortunately, that version monopolized the CPU and made Pidgin lag like it was running on a 4.77MHz 8088.

The log was full of

(14:15:48) http: Request 31C927F0 performed without success.
(14:15:48) discord: Got response: 
(14:15:48) http: Request 31C90E58 performed without success.
(14:15:48) discord: Got response: 
(14:15:48) http: Request 31C90090 performed without success.
(14:15:48) discord: Got response: 
(14:15:48) http: Request 31C996D8 performed without success.
(14:15:48) discord: Got response: 
(14:15:48) http: Request 31C99438 performed without success.
(14:15:48) discord: Got response: 
(14:15:48) http: Request 31C99198 performed without success.

Edit:
I killed pidgin and now I cannot run it at all with the plugin enabled -- it hangs in startup

@Metalhead33
Copy link

Strange. For me, the plugin works just fine.... except that I don't get any of the Rate Limit-related messages in the debug console, which is weird. However, ever since it, I have not run into a rate limit error. Makes me think my code didn't think anything, and that it's just a placebo effect.

@LurkerHub
Copy link

I am subscribe to several servers. Maybe you just didn't hit the combination that makes it hang in a loop.

@Metalhead33
Copy link

@LurkerHub I am a member of 44 servers. Granted, I turned off "Fetch unread chat messages when account connects" and "Open chat when you are mentioned". I didn't test it with those options turned on.

@LurkerHub
Copy link

LurkerHub commented Oct 24, 2024

I am a member of 44 servers.

I am pretty sure that we have at least some non-intersecting servers, and with Discord adding features right and left, there may be messages that trigger that bevaviour.

Granted, I turned off "Fetch unread chat messages when account connects" and "Open chat when you are mentioned". I didn't test it with those options turned on.

There you go! I have both turned on.

@LurkerHub
Copy link

Can you please take a look?

@LurkerHub
Copy link

Any news?

@Metalhead33
Copy link

@LurkerHub Sorry, I don't feel like trying it out with those features turned on, because I don't want to risk losing my one and only Discord account :)

@LurkerHub
Copy link

@LurkerHub Sorry, I don't feel like trying it out with those features turned on, because I don't want to risk losing my one and only Discord account :)

  1. You won't lose the account. Worst case you won't be able to access it for a couple of hours.

  2. Why not make another discord account for testing?

  3. A change that accommodates one workflow but kills Pidgin (hangs on startup) for those that use a different one is sub-optimal.

@Metalhead33
Copy link

Looks like we have a problem. I still keep getting rate-limited despite using my own modified version of the plugin. It looks like this issue has the answer: the rate limits are only visible for bots, not for regular users.

Thanks, Discord!

@Metalhead33
Copy link

Metalhead33 commented Dec 20, 2024

Fingers crossed that the newest version by me will make rate limiting even rarer. My code changes so far haven't been particularly invasive, but if I get another tempban, I might have to resort to more invasive measures, such as some kind of queue.

The next time I get a tempban, I will program in some sort of FIFO queue or event loop. I have already begun working on an alternate branch for this very purpose, but it does not work yet.

Otherwise, if even that fails to work, I will truly be out of options.

@LurkerHub
Copy link

I really appreciate your efforts, @Metalhead33, thank you very much for tackling this issue!
But can you please verify that it also works with "Fetch unread chat messages when account connects" and "Open chat when you are mentioned" options? Right now it causes Pidgin to hang hard on startup.

@Metalhead33
Copy link

Metalhead33 commented Dec 22, 2024

@LurkerHub

  1. I just tested those two features today with my newest version, and they appear to work just fine on my machine. My Pidgin does not hang on startup. Not sure if my recent code edits fixed the issue, or it's jut me being lucky, or possibly me using Linux. Who knows. Either way, to the "Fetch unread chat messages when account connects" and "Open chat when you are mentioned" features, I can only answer: ItWorksOnMyMachine™.
  2. Then again, If I'm being completely honest, I have no intention of supporting "Fetch unread chat messages when account connects" and "Open chat when you are mentioned", because they are known for causing a large amount of API requests that directly contribute to the problem of surpassing rate limits. I recommend having those options turned off at all times.

@LurkerHub
Copy link

I have no intention of supporting "Fetch unread chat messages when account connects" and "Open chat when you are mentioned", because they are known for causing a large amount of API requests that directly contribute to the problem of surpassing rate limits. I recommend having those options turned off at all times.

  1. What happens when people message you and your computer is turned off? Or if Windows restarted after an update and is waiting for a log-in? Or if it's on but Pidgin crashed (unfortunately, it does it often)? Unless you have "Fetch unread chat messages when account connects" set, you won't see the message. I don't know about your use case, but I prefer not to lose incoming messages.
  2. "Open chat when you are mentioned" alerts me that there is a message requiring my attention when I return from AFK.
  3. they are known for causing a large amount of API requests that directly contribute to the problem of surpassing rate limits. Isn't that because they (supposedly) do not throttle requests, which is what this fix is all about?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants