|
1 | 1 | import { AliasPiece, AliasPieceJSON, AliasPieceOptions, PieceContext } from '@sapphire/pieces';
|
2 |
| -import { Awaited, isNullish } from '@sapphire/utilities'; |
| 2 | +import { Awaitable, isNullish } from '@sapphire/utilities'; |
3 | 3 | import { Message, PermissionResolvable, Permissions, Snowflake } from 'discord.js';
|
4 | 4 | import * as Lexure from 'lexure';
|
5 | 5 | import { Args } from '../parsers/Args';
|
@@ -95,7 +95,7 @@ export abstract class Command<T = Args> extends AliasPiece {
|
95 | 95 | * @param parameters The raw parameters as a single string.
|
96 | 96 | * @param context The command-context used in this execution.
|
97 | 97 | */
|
98 |
| - public preParse(message: Message, parameters: string, context: CommandContext): Awaited<T> { |
| 98 | + public preParse(message: Message, parameters: string, context: CommandContext): Awaitable<T> { |
99 | 99 | const parser = new Lexure.Parser(this.lexer.setInput(parameters).lex()).setUnorderedStrategy(this.strategy);
|
100 | 100 | const args = new Lexure.Args(parser.parse());
|
101 | 101 | return new Args(message, this as any, args, context) as any;
|
@@ -142,7 +142,7 @@ export abstract class Command<T = Args> extends AliasPiece {
|
142 | 142 | * @param message The message that triggered the command.
|
143 | 143 | * @param args The value returned by {@link Command.preParse}, by default an instance of {@link Args}.
|
144 | 144 | */
|
145 |
| - public abstract run(message: Message, args: T, context: CommandContext): Awaited<unknown>; |
| 145 | + public abstract run(message: Message, args: T, context: CommandContext): Awaitable<unknown>; |
146 | 146 |
|
147 | 147 | /**
|
148 | 148 | * Defines the JSON.stringify behavior of the command.
|
|
0 commit comments