Fix warn notification sometimes triggering on the bot's own reaction
This commit is contained in:
parent
a8b105bdec
commit
285cd2bcd8
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ export const WarnCmd = modActionsCmd({
|
||||||
config.warn_notify_message.replace("{priorWarnings}", `${priorWarnAmount}`),
|
config.warn_notify_message.replace("{priorWarnings}", `${priorWarnAmount}`),
|
||||||
);
|
);
|
||||||
|
|
||||||
const reply = await waitForReaction(pluginData.client, tooManyWarningsMsg, ["✅", "❌"]);
|
const reply = await waitForReaction(pluginData.client, tooManyWarningsMsg, ["✅", "❌"], msg.author.id);
|
||||||
tooManyWarningsMsg.delete();
|
tooManyWarningsMsg.delete();
|
||||||
if (!reply || reply.name === "❌") {
|
if (!reply || reply.name === "❌") {
|
||||||
msg.channel.createMessage(errorMessage("Warn cancelled by moderator"));
|
msg.channel.createMessage(errorMessage("Warn cancelled by moderator"));
|
||||||
|
|
Loading…
Add table
Reference in a new issue