Open hydroxideee opened 3 weeks ago
Confirming I'm having this issue too: This code (from the documentation):
async def on_ready():
game = discord.Game("with the Python")
throws this error:
2024-10-10 09:27:15 ERROR discord.client Ignoring exception in on_ready
Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/discord/client.py", line 507, in _run_event
await coro(*args, **kwargs)
File "/workspace/selfbot-unocorp/selfbot.py", line 223, in on_ready
await client.change_presence(activity=game)
File "/usr/local/lib/python3.12/dist-packages/discord/client.py", line 1567, in change_presence
await self.settings.edit(**payload)
File "/usr/local/lib/python3.12/dist-packages/discord/settings.py", line 1100, in edit
existing = self.to_dict()
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/discord/settings.py", line 146, in to_dict
return MessageToDict(
^^^^^^^^^^^^^^
TypeError: MessageToDict() got an unexpected keyword argument 'including_default_value_fields'
i'm gonna try to downgrade protobuf to see if it works. I'm letting you know.
@hydroxideee, downgrading to protobuf 4.25.0 solved the issue form me. You could try to do the same, I did it in a venv, but didn't try protobuf version 4.25.4.
Summary
When changing presence to idle TypeError is raised
Reproduction Steps
Call Client.change_presence with status set to idle and afk=True
Code
Expected Results
Presence should change with no error and push notifications should start to be received.
Actual Results
Presence appears to change to idle even with the error being raised, but no push notifications are received this way.
System Information
Checklist
Additional Information
Might be similar to #729 but downgrading the protobuf library to the 4.25.4 or lower did not fix the issue