Skip to content

[BUG] Client.remove()/Client.reload() does not remove old listeners #665

@hpenney2

Description

@hpenney2

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.

  1. Load an extension with Client.load()
  2. Reload it with Client.remove() + Client.load() or simply use Client.reload()
  3. 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

  • I agree to follow the contribution requirements.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions