Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixes Persistent not not sending #3324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Taaku18 merged 2 commits into modmail-dev:development from martinbndr:fix-persistent-note
Oct 27, 2024

Conversation

@martinbndr
Copy link
Contributor

@martinbndr martinbndr commented Dec 27, 2023

This PR fixes persistent notes not sending on thread creation.

This error raised:

Task exception was never retrieved
future: <Task finished name='Task-86' coro=<Thread.setup() done, defined at c:\Users\MA\Documents\modmail-dev\devmodmail\core\thread.py:160> exception=TypeError("Thread.setup.<locals>.send_persistent_notes.<locals>.State.store_user() got an unexpected keyword argument 'cache'")>
Traceback (most recent call last):
 File "c:\Users\MA\Documents\modmail-dev\devmodmail\core\thread.py", line 291, in setup
 await asyncio.gather(
 File "c:\Users\MA\Documents\modmail-dev\devmodmail\core\thread.py", line 277, in send_persistent_notes
 message = discord.Message(state=State(), channel=self.channel, data=data)
 File "c:\Users\MA\Documents\modmail-dev\devmodmail\venv\lib\site-packages\discord\message.py", line 1687, in __init__
 getattr(self, f'_handle_{handler}')(data[handler])
 File "c:\Users\MA\Documents\modmail-dev\devmodmail\venv\lib\site-packages\discord\message.py", line 1811, in _handle_author 
 self.author = self._state.store_user(author, cache=self.webhook_id is None)
TypeError: Thread.setup.<locals>.send_persistent_notes.<locals>.State.store_user() got an unexpected keyword argument 'cache'

Maybe not ideal solution but adding the cache arg to the store_user() funtion at line 253 fixes it.

Erisa reacted with thumbs up emoji
Taaku18 and others added 2 commits November 26, 2023 13:53
This fixes persistent note not sending on thread creation.
Copy link
Contributor Author

@Taaku18 Please take a look at pr ́s like this that fixes relatively small things that are somehow important for small features. These could be released regardless of having a big bot update or not.
Currently if users having persistent notes they won ́t get sent after they created a new thread

@Taaku18 Taaku18 merged commit 7c1574f into modmail-dev:development Oct 27, 2024
Copy link
Contributor Author

So can this be merged to master? @Taaku18 Its quite needed for peristent notes...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Taaku18 Taaku18 Taaku18 approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /