sm00th / bitlbee-discord

Bitlbee plugin for Discord (http://discordapp.com)
GNU General Public License v2.0
290 stars 27 forks source link

Failed to get pinned messages #114

Open manavortex opened 6 years ago

manavortex commented 6 years ago

Hey Sm00th, thanks for maintaining this. I'm highly fed up by this Discord stuff that the young people these days insist on using, your plugin makes it bearable.

However, I disconnect several times a day and usually reconnect instantly:

│&bitlbee    @root | discord - Error: Failed to read data.
│&bitlbee    @root | discord - Signing off..
│&bitlbee    @root | discord - Reconnecting in 5 seconds..
│&bitlbee    @root | discord - Logging in: Logged in

While that is annoying (it would be highly convenient if you would add an option to suppress this exact output sequence - I haven't managed to conjure up the right filter myself yet, which I probably should instead of bothering you with it) that's not what I'ma ctually posting about.

For a while now (the first log entry that I found was 2017-11-18, 01:21:57 CEST) I am getting additional errors whenever I log in:

│&bitlbee    @root | discord - Error: Failed to get pinned messages (429).
│&bitlbee    @root | discord - Error: Failed to get pinned messages (429).
│&bitlbee    @root | discord - Error: Failed to get pinned messages (429).

I downloaded the discord desktop client (yikes) and manually marked all servers as read, but that didn't make the issue go away. Is there anything I (or you) can do about it? If you need additional debug output, please tell me how to obtain it and you shall have it.

Regards,

sm00th commented 6 years ago

Started seeing those ratelimit errors for pinned messages myself lately but haven't looked into it yet. As a workaround you can disable fetching pinned messages on connect. Just set fetch_pinned to off in your account settings.

manavortex commented 6 years ago

Awesome, thank you.

squigglezworth commented 6 years ago

Has there been any update on this? Or is there any way to see pinned messages other than the initial fetch on connection?

sm00th commented 6 years ago

This is sorta fixed in 24601035a1ebb5cf79295cdf25366307820f8692. The fix is not ideal: it handles rate limiting but i'd rather not run into it at all, not sure atm how to do this though.

After that commit there won't be any error messages about rate limiting and pinned messages will get fetched, but they are getting fetched channel by channel with a slight delay inbetween.