Skip to content
This repository was archived by the owner on May 8, 2023. It is now read-only.

Commit a50e347

Browse files
committed
Check if a message has been edited.
discord-akairo#210
1 parent fece853 commit a50e347

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/struct/commands/CommandHandler.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ class CommandHandler extends AkairoHandler {
464464
async handleRegexCommands(message) {
465465
const hasRegexCommands = [];
466466
for (const command of this.modules.values()) {
467-
if (message.edited ? command.editable : true) {
467+
if (message.editedTimestamp ? command.editable : true) {
468468
const regex = typeof command.regex === 'function' ? command.regex(message) : command.regex;
469469
if (regex) hasRegexCommands.push({ command, regex });
470470
}
@@ -520,7 +520,7 @@ class CommandHandler extends AkairoHandler {
520520

521521
const filterPromises = [];
522522
for (const command of this.modules.values()) {
523-
if (message.edited && !command.editable) continue;
523+
if (message.editedTimestamp && !command.editable) continue;
524524
filterPromises.push((async () => {
525525
let cond = command.condition(message);
526526
if (isPromise(cond)) cond = await cond;

0 commit comments

Comments
 (0)