QTCord icon indicating copy to clipboard operation
QTCord copied to clipboard

Crashes with account that has deleted friends

Open padoruuuu opened this issue 1 year ago • 5 comments

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'

padoruuuu avatar Aug 11 '24 03:08 padoruuuu

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

mak448a avatar Aug 11 '24 03:08 mak448a

yes, i have a lot of people friended on discord

padoruuuu avatar Aug 11 '24 03:08 padoruuuu

Did you ever chat with someone with a deleted account?

mak448a avatar Aug 11 '24 03:08 mak448a

Did you ever chat with someone with a deleted account?

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

padoruuuu avatar Aug 11 '24 04:08 padoruuuu

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

mak448a avatar Aug 11 '24 04:08 mak448a

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

mak448a avatar Sep 13 '24 02:09 mak448a

it seems to be working fine now.

padoruuuu avatar Sep 13 '24 03:09 padoruuuu

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

mak448a avatar Sep 13 '24 04:09 mak448a