From 8cddd6a12a559f26a97b2690a462730593a9a702 Mon Sep 17 00:00:00 2001 From: Expand-sys Date: Thu, 14 Oct 2021 08:58:38 +1100 Subject: [PATCH] stage --- commands/moderation/mc.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/moderation/mc.js b/commands/moderation/mc.js index 068a22f..7e8e0dd 100644 --- a/commands/moderation/mc.js +++ b/commands/moderation/mc.js @@ -8,7 +8,7 @@ module.exports = { name: "mc", description: "send a mc command", guildOnly: true, - permissions: "KICK_MEMBERS", + permissions: "SEND_MESSAGES", async execute(message, args) { if (!args) { return message.reply("OI you need to specify the command you want"); @@ -20,11 +20,11 @@ module.exports = { }); await rcon.connect(); - let content = message.content.split("!mc "); - let fuck = content[1]; - console.log(message.author); + let content = message.content.substring(message.content.indexOf(" ") + 1); + console.log(content); + let fuck; if (args[0] == "say") { - fuck = fuck.split("say "); + fuck = content.split("say "); fuck[1] = `say ${message.author.username}: ${fuck[1]} `; } console.log(fuck);