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
feat(View): add prevent_update param #886
Conversation
If the |
Also, to avoid breaking changes, the default for |
I'm thinking something like |
That doesn't make sense imo. The whole point of this PR is to limit storing persistent views with a specific message, right? |
Well, the main part of this is to fix the issue of views being stored without the user's knowledge, since most people probably call their views without knowing they need to properly stop it, it being set to True makes sense. Will wait on more input tho. |
Can you elaborate how this happens? Also, wouldn't more precise docs be better instead of this breaking change? |
On every message sent with a view, all components are added to a list specific to that message. Over time, these are not deleted, even when the messages are uncached, accumulating in the background. It's a very rare scenario you would need to use message-specific data if you're using a persistent view, usually, you get all the message data from |
Ah I understand now. |
that's really weird, changing the var and it's suddenly failing |
nevermind it's just a the python global, guess cant use "global" as name |
This comment was marked as outdated.
This comment was marked as outdated.
Ignore my last comment, I confused the |
hold on i used the wrong version 💀 |
I changed the name to |
I have no idea why there's a conflict. |
9d18267
to
65ee8af
Compare
* Readded updated to abc.py * Readded updated to view.py
Reopen, still adding back changes |
Summary
Adding prevent_update to View. Option preventing storing permanent views for separate messages by default.
(since there's no limit to how many different buttons get stored, and if not stopped properly can cause issues over time when running a bot for long periods without reboot, and users are not notified of these being stored)
Checklist
task pyright
and fixed the relevant issues.