0

i am right now trying to program a Discord bot currencysytem that is saved in a .json file. How its saved looks like this:

"<userid>" : <currency>, "userid" : <currency>, ...

And i try to get the data out of it looks like this:

const currency = require('../currency.json');
    let fs = require('fs')
    let an = message.author.id

    message.channel.send(currency.{an}); // !!here I need help!!

    
 

In the line where i wrote "// !!I need help here!! i want to use the variable "an" and the visuial studio code doesnt get it... Does anyone has a solution to my problem pls help me. Thx you <3

0 Answers0