Answer the question
In order to leave comments, you need to log in
Added - } in profile.json file when executing code??
Such a problem...When executing this code
if(profile[rUser.id].warns ==20){
message.channel.send('Пользователь забанен на сервере по причине того что у него 20/20 Предупреждений');
message.guild.member(rUser).ban({ reason: '20/20 Предупреждений' });
profile[rUser.id].warns -= 20;
fs.writeFile('./profile.json',JSON.stringify(profile),(err)=>{
if(err) console.log(err);
});
};
{"590373859874570251":{"coins":1302,"warns":0,"xp":54,"lvl":11},"610091146768678933":{"coins":39,"warns":0,"xp":13,"lvl":1},"725607950655291473":{"coins":99,"warns":0,"xp":13,"lvl":2}}
Answer the question
In order to leave comments, you need to log in
{
"590373859874570251":
{
"coins": 1302,
"warns": 0,
"xp": 54,
"lvl": 11
},
"610091146768678933":
{
"coins": 39,
"warns": 0,
"xp": 13,
"lvl": 1
},
"725607950655291473":
{
"coins": 99,
"warns": 0,
"xp": 13,
"lvl": 2
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question