dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
665 stars 155 forks source link

AttributeError: `Activity` object has no attribute `to_settings_dict` #469

Closed Iinksafe closed 1 year ago

Iinksafe commented 1 year ago

Summary

The Activity object has no attribute named 'to_settings_dict'. (Maybe you mean 'to_dict'?)

Reproduction Steps

Pass the activity keyword when constructing a Client object - image

Code

Task exception was never retrieved
future: <Task finished name='Task-3252' coro=<Client.change_presence() done, defined at /home/runner/windows/venv/lib/python3.8/site-packages/discord/client.py:1309> exception=AttributeError("'Activity' object has no attribute 'to_settings_dict'")>
Traceback (most recent call last):
  File "/nix/store/2vm88xw7513h9pyjyafw32cps51b0ia1-python3-3.8.12/lib/python3.8/asyncio/tasks.py", line 280, in __step
    result = coro.send(None)
  File "/home/runner/windows/venv/lib/python3.8/site-packages/discord/client.py", line 1392, in change_presence
    await self.user.edit_settings(**payload)  # type: ignore # user is always present when logged in
  File "/home/runner/windows/venv/lib/python3.8/site-packages/discord/user.py", line 865, in edit_settings
    payload['custom_status'] = custom_activity and custom_activity.to_settings_dict()
AttributeError: 'Activity' object has no attribute 'to_settings_dict'

https://cdn.discordapp.com/attachments/1032398526778462309/1086280232941654076/image.png

Expected Results

Change the activity.

Actual Results

An error occurs.

System Information

Checklist

Additional Information

No response

dolfies commented 1 year ago

I'm having trouble reproducing this. Either way #476 will probably fix it.

G3VV commented 1 month ago

setting edit_settings=False will fix this, if set to true it errors

Iinksafe commented 1 month ago

Hi, thanks for commenting on this issue. I no longer use Replit, rather a VPS. Additionally, I no longer use this library or any other that facilitates access to automated user accounts.