Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

Commit

Permalink
fix error with prompts and slash commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Tricked-dev committed Aug 6, 2021
1 parent e816c3e commit b40d420
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"deno.enable": true,
"deno.lint": true,
"deno.unstable": true
"deno.unstable": true,
"deno.suggest.imports.hosts": {
"https://deno.land": false
}
}
3 changes: 0 additions & 3 deletions src/struct/commands/Command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,4 @@ export abstract class NaticoCommand extends NaticoModule {

this.category = category || "general";
}
exec(_message: DiscordenoMessage, _options: Arguments): Promise<any> | any {
throw new Error(`NOT_CREATED ${this.id}`);
}
}
10 changes: 7 additions & 3 deletions src/struct/commands/CommandHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,13 @@ export class NaticoCommandHandler extends NaticoHandler {
const options: ApplicationCommandOption[] = [];
if (command.options) {
command.options.forEach((option) => {
delete option["match"];
delete option["customType"];
options.push(option);
options.push({
name: option.name,
description: option.description,
options: option.options,
type: option.type,
required: option.required,
});
});
}
if (command.options) slashdata["options"] = options;
Expand Down

0 comments on commit b40d420

Please sign in to comment.