mirror of
https://github.com/SrIzan10/handler.git
synced 2026-05-01 10:45:17 +00:00
fix: crash on collectors (#89)
* fix: crash on collectors * feat: bump version for bug fix
This commit is contained in:
@@ -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",
|
||||
"scripts": {
|
||||
|
||||
@@ -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