I have a help command and when I use this, According to the language entered in the data of the json file, the bot responds to that language, but when we change the language through the json file, it still responds with the previous language.
My json file:
{"serverid": "fa"}
serverid for example 70436705474 :)
const lang = require('../data/lang.json')
module.exports = {
name: "help",
description: "For see help",
execute(client, message){
let server = message.guild.id // server id for example 70436705474
if (lang[server] == "fa"){
let embed1 = new Discord.MessageEmbed()
.setAuthor("سلام")
.setDescription(`چطور میتونم کمکتون کنم؟`)
message.channel.send(embed1)
} else if (lang[server] == "en") {
let embed2 = new Discord.MessageEmbed()
.setAuthor("Hi")
.setDescription(`How can I help you?`)
message.channel.send(embed2)
}
}
}
response is embed 1
when I edit json file to => {"serverid": "en"}
again I get response embed1 but command not update
I need when I edit the language fa to en in json file I get "embed2"