* Remove command from the collection * @param {string} id Command's ID * @return {this}
(id: string)
| 304 | * @return {this} |
| 305 | */ |
| 306 | remove(id: string) { |
| 307 | if (this.isActive(id)) { |
| 308 | this.stopCommand(this.get(id), { force: true }); |
| 309 | } |
| 310 | |
| 311 | delete this.active[id]; |
| 312 | delete this.commands[id]; |
| 313 | |
| 314 | return this; |
| 315 | } |
| 316 | |
| 317 | /** |
| 318 | * Get command by ID |