Skip to content
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

Add event(once=True) to Cog.listener #2157

Closed
DTheIcyDragon opened this issue Jun 30, 2023 · 1 comment · Fixed by #2403
Closed

Add event(once=True) to Cog.listener #2157

DTheIcyDragon opened this issue Jun 30, 2023 · 1 comment · Fixed by #2403
Labels
feature request New feature request on hold

Comments

@DTheIcyDragon
Copy link

DTheIcyDragon commented Jun 30, 2023

Summary

Adding the once variable to Cog listeners

What is the feature request for?

discord.ext.commands

The Problem

The @commands.Cog.listen() does not have the once=True variable to set.

The Ideal Solution

Add the once variable to the decorator

The Current Solution

No response

Additional Context

This is tested on the latest github commit

@DTheIcyDragon DTheIcyDragon added the feature request New feature request label Jun 30, 2023
@Dorukyum Dorukyum removed the on hold label Nov 30, 2023
@Dorukyum
Copy link
Member

The _once attribute is used for the normal event listeners but it can't be added to cog listeners because they're methods of a class. Once-listeners must be stored in some other way for this to be added.

@plun1331 plun1331 linked a pull request Mar 24, 2024 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request on hold
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants