-
-
Notifications
You must be signed in to change notification settings - Fork 468
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: add once kwarg to Cog.listener #2403
feat: add once kwarg to Cog.listener #2403
Conversation
Maybe we can create an enum like |
This closes #2157, so why isn't that issue linked to this PR? |
bcs someone forgot to use the closes keyword in their pr desc |
* feat: add once kwarg to Cog.listener (Pycord-Development#2403) * add once kwarg to Cog.listener * clarify * style(pre-commit): auto fixes from pre-commit.com hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Lala Sabathil <[email protected]> * chore(pre-commit): pre-commit autoupdate (Pycord-Development#2410) updates: - [github.com/asottile/pyupgrade: v3.15.1 → v3.15.2](asottile/pyupgrade@v3.15.1...v3.15.2) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * fix: pass proper state to interaction._guild (Pycord-Development#2411) * fix: option and BridgeOption adjustments (Pycord-Development#2417) * chore(pre-commit): pre-commit autoupdate (Pycord-Development#2416) updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](pre-commit/pre-commit-hooks@v4.5.0...v4.6.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * feat: implement Guild.search_members (Pycord-Development#2418) * implement guild member search * clarification. * style(pre-commit): auto fixes from pre-commit.com hooks * cl * undo iteration * style(pre-commit): auto fixes from pre-commit.com hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * ci(deps): bump ribtoks/tdg-github-action from 0.4.7.pre.beta to 0.4.10.pre.beta (Pycord-Development#2420) ci(deps): bump ribtoks/tdg-github-action Bumps [ribtoks/tdg-github-action](https://github.com/ribtoks/tdg-github-action) from 0.4.7.pre.beta to 0.4.10.pre.beta. - [Release notes](https://github.com/ribtoks/tdg-github-action/releases) - [Commits](ribtoks/tdg-github-action@v0.4.7-beta...v0.4.10-beta) --- updated-dependencies: - dependency-name: ribtoks/tdg-github-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: plun1331 <[email protected]> * fix: Added member data to the raw_reaction_remove event (Pycord-Development#2412) * fix: Added member data to the raw_reaction_remove event * style(pre-commit): auto fixes from pre-commit.com hooks * Added changelog.md for adding member data to raw reaction remove * Update CHANGELOG.md Signed-off-by: plun1331 <[email protected]> * doc: Updated documentation for the RawReactionActionEvent.member field --------- Signed-off-by: plun1331 <[email protected]> Co-authored-by: root <root@DESKTOP-U7KGUE3> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: plun1331 <[email protected]> * chore(pre-commit): pre-commit autoupdate (Pycord-Development#2422) updates: - [github.com/psf/black: 24.3.0 → 24.4.0](psf/black@24.3.0...24.4.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * docs: remove false optional (Pycord-Development#2424) docs: not optional * fix: Guild.query_members may accept empty query and limit (Pycord-Development#2419) Signed-off-by: UK <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: JustaSqu1d <[email protected]> Co-authored-by: Dorukyum <[email protected]> Co-authored-by: plun1331 <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: plun1331 <[email protected]> Signed-off-by: UK <[email protected]> Co-authored-by: UK <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Lala Sabathil <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: jordan-day <[email protected]> Co-authored-by: root <root@DESKTOP-U7KGUE3> Co-authored-by: Dorukyum <[email protected]> Co-authored-by: JustaSqu1d <[email protected]>
Summary
Adds the
once
kwarg toCog.listener
as per #2157. But as noted in that request, there's a caveat - due to how it's stored,once
resets on cog load. Either this PR can go through as is with that warning, or we can slightly rework it to not reset on reload (perhaps through an extra kwarg specifying which behavior you want)Information
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.Closes #2157