Skip to content

Commit

Permalink
fix: crash on collectors (#89)
Browse files Browse the repository at this point in the history
* fix: crash on collectors

* feat: bump version for bug fix
  • Loading branch information
jacoobes committed Jul 23, 2022
1 parent d18eaa9 commit d8051e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sern/handler",
"version": "1.1.5-beta",
"version": "1.1.6-beta",
"description": "A customizable, batteries-included, powerful discord.js framework to automate and streamline bot development.",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion src/handler/events/interactionHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit d8051e2

Please sign in to comment.