This commit is contained in:
Expand-sys 2021-10-14 08:58:38 +11:00
parent e6ec5215d6
commit 8cddd6a12a

View file

@ -8,7 +8,7 @@ module.exports = {
name: "mc", name: "mc",
description: "send a mc command", description: "send a mc command",
guildOnly: true, guildOnly: true,
permissions: "KICK_MEMBERS", permissions: "SEND_MESSAGES",
async execute(message, args) { async execute(message, args) {
if (!args) { if (!args) {
return message.reply("OI you need to specify the command you want"); return message.reply("OI you need to specify the command you want");
@ -20,11 +20,11 @@ module.exports = {
}); });
await rcon.connect(); await rcon.connect();
let content = message.content.split("!mc "); let content = message.content.substring(message.content.indexOf(" ") + 1);
let fuck = content[1]; console.log(content);
console.log(message.author); let fuck;
if (args[0] == "say") { if (args[0] == "say") {
fuck = fuck.split("say "); fuck = content.split("say ");
fuck[1] = `say ${message.author.username}: ${fuck[1]} `; fuck[1] = `say ${message.author.username}: ${fuck[1]} `;
} }
console.log(fuck); console.log(fuck);