Skip to content

Commit 04e1f4a

Browse files
committed
Add interface stubs
1 parent 63961b9 commit 04e1f4a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/commands/command.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,25 @@ export interface ApplicationCommand extends CommandBase {
3535
// For a MessageCommand we require an additional modCommand property and a handler method
3636
export interface MessageCommand extends CommandBase {
3737
handleMessage(message: ProcessableMessage, context: BotContext): Promise<void>;
38+
handleEditedMessage?(
39+
oldMessage: ProcessableMessage,
40+
newMessage: ProcessableMessage,
41+
context: BotContext,
42+
): Promise<void>;
3843
}
3944

4045
// For SpecialCommands we require a pattern and a randomness (<= 1)
4146
export interface SpecialCommand extends CommandBase {
4247
readonly randomness: number;
4348
readonly cooldownTime?: number;
49+
4450
matches(message: ProcessableMessage, context: BotContext): boolean;
4551

4652
handleSpecialMessage(message: ProcessableMessage, context: BotContext): Promise<void>;
53+
54+
handleEditedSpecialMessage?(
55+
oldMessage: ProcessableMessage,
56+
newMessage: ProcessableMessage,
57+
context: BotContext,
58+
): Promise<void>;
4759
}

0 commit comments

Comments
 (0)