From cf9c63e5c18697fb161b48fe0eda5c19b5f5ff7f Mon Sep 17 00:00:00 2001 From: Neko-Life Date: Thu, 5 Aug 2021 16:58:08 +0700 Subject: [PATCH] added `--m` flag --- cmds/fun/say.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cmds/fun/say.js b/cmds/fun/say.js index 5ee7a78..f66ba24 100644 --- a/cmds/fun/say.js +++ b/cmds/fun/say.js @@ -2,7 +2,7 @@ const commando = require("@iceprod/discord.js-commando"); const emoteMessage = require("../../resources/emoteMessage"); -const { ranLog, trySend, tryDelete } = require("../../resources/functions"); +const { ranLog, trySend, tryDelete, getChannelMessage } = require("../../resources/functions"); module.exports = class say extends commando.Command { constructor(client) { @@ -14,13 +14,21 @@ module.exports = class say extends commando.Command { }); } async run(msg, args) { + const REPLACE = args.match(/(?\s")).test(msg.content) && msg.member.hasPermission("MANAGE_MESSAGES") && msg.guild.member(this.client.user).hasPermission("MANAGE_MESSAGES")) { tryDelete(msg); }