pycord icon indicating copy to clipboard operation
pycord copied to clipboard

Add event(once=True) to Cog.listener

Open DTheIcyDragon opened this issue 2 years ago • 1 comments

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 avatar Jun 30 '23 17:06 DTheIcyDragon

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.

Dorukyum avatar Nov 30 '23 15:11 Dorukyum