Check JSON file has a key

client.on(‘guildMemberAdd’, async member => {
// check if user id and guild id exist in mutes.json


you can use fs to do that.

Use This Code to Store ur JSON As A Variable

using fs:

var variable = fs.readFileSync(‘data.json’,‘utf8’);

and i Think u can use a if Statement to Check it

1 Like