mirror of
https://github.com/sern-handler/handler
synced 2026-06-27 18:22:14 +00:00
fix: crash on collectors (#89)
* fix: crash on collectors * feat: bump version for bug fix
This commit is contained in:
@@ -89,7 +89,7 @@ export default class InteractionHandler extends EventsHandler<{
|
||||
|
||||
protected setState(state: { event: Interaction; mod: CommandModule | undefined }): void {
|
||||
if (state.mod === undefined) {
|
||||
this.payloadSubject.error(SernError.UndefinedModule);
|
||||
this.wrapper?.sernEmitter?.emit('error', SernError.UndefinedModule);
|
||||
} else {
|
||||
//if statement above checks already, safe cast
|
||||
this.payloadSubject.next(state as { event: Interaction; mod: CommandModule });
|
||||
|
||||
Reference in New Issue
Block a user