Fix 'custom show'

This commit is contained in:
SileNce5k 2021-07-10 20:01:16 +02:00
parent a442c5cbe8
commit a3f2804a8c
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -71,11 +71,10 @@ module.exports = {
case "show":
let json = fs.readFileSync(customPath, 'utf8');
let customCommands = JSON.parse(json)
customCommands.forEach(function (customCommand) {
if (customCommand.customName === args[1]) {
sendText = `\`\`\`\n${customCommand.customMessage}\n\`\`\``
}else{
sendText = "Command not found."
customCommands.forEach(function (customCommand) {
if (customCommand.customName === customName) {
sendText = `\`\`\`\n${customCommand.customMessage}\n\`\`\``
}
});
break;