refactor: minor (#347)

* some refactoring

* accidental merge

* refactor: ensure all asserts have error message to avoid cryptic messages

* general refactoring

* move controller to create-plugin
This commit is contained in:
Jacob Nguyen
2024-01-02 13:04:59 -06:00
committed by GitHub
parent b962dae36c
commit b0399f9507
19 changed files with 54 additions and 98 deletions

View File

@@ -114,7 +114,7 @@ export class Context extends CoreContext<Message, ChatInputCommandInteraction> {
if ('interaction' in wrappable) {
return new Context(Ok(wrappable));
}
assert.ok(wrappable.isChatInputCommand());
assert.ok(wrappable.isChatInputCommand(), "Context created with bad interaction.");
return new Context(Err(wrappable));
}
}