Describe the bug.
When using Client.remove() or Client.reload(), the listeners for the extension are not removed. This results in duplicated listeners that can result in API spam and actions being doubled.
List the steps.
- Load an extension with
Client.load()
- Reload it with
Client.remove() + Client.load() or simply use Client.reload()
- Trigger a listener within the extension (for example, I just had a listener print/log something)
What you expected.
The listener should only be run once.
What you saw.
Instead, the listener's behavior happens a second time. If the extension is reloaded again, a third listener is added, and so on.
What version of the library did you use?
release
Version specification
4.1.0
Code of Conduct