mak448a / Qtcord

Qtcord is a Discord client built with QT aiming to bring a lightweight, native experience.
MIT License
51 stars 1 forks source link

Crashes with account that has deleted friends #39

Closed padoruuuu closed 8 hours ago

padoruuuu commented 1 month ago

flatpak run io.github.mak448a.QTCord Connection opened Sending heartbeats every 41.25 seconds Heartbeat acknowledged Traceback (most recent call last): File "/app/bin/main.py", line 312, in win = ChatInterface() ^^^^^^^^^^^^^^^ File "/app/bin/main.py", line 66, in init self.setup() File "/app/bin/main.py", line 179, in setup get_info() File "/app/bin/main.py", line 167, in get_info self.get_friends() File "/app/bin/main.py", line 185, in get_friends "channel": discord_integration.get_channel_from_id(friend["id"]), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/bin/discord_integration.py", line 107, in get_channel_from_id return r.json()["id"]


KeyError: 'id'
mak448a commented 1 month ago

That's strange. Do you have anyone friended on Discord?

padoruuuu commented 1 month ago

yes, i have a lot of people friended on discord

mak448a commented 1 month ago

Did you ever chat with someone with a deleted account?

padoruuuu commented 1 month ago

Did you ever chat with someone with a deleted account?

probably, its a account thats a few years old and i dont close dms

mak448a commented 1 month ago

I guess I'll have to add error handling for that.

mak448a commented 9 hours ago

Could you try this again @padoruuuu? I can't seem to reproduce with an account that has deleted friends.

padoruuuu commented 8 hours ago

it seems to be working fine now.

mak448a commented 7 hours ago

I think it was because randomusername-a (a contributor) did some changes to the code.