X
X
XXXVladsXXX2020-05-18 16:06:00
JavaScript
XXXVladsXXX, 2020-05-18 16:06:00

What variable should be written?

const Discord = module.require("discord.js");
const fs = require("fs");
let profile = require("../profile.json");
const bot = new Discord.Client();
module.exports.run = async (bot,message,args) => {
    let embed = new Discord.RichEmbed()
    .setDescription("✅Профиль",message.author)
    .setColor('#FF8C00')
    .addField("Монеты:",`**${author.coins}**`) //какую надо писать переменную

    bot.send(embed);

};
module.exports.help = {
    name: "p",
    aliases: ['Профиль', 'Profile', 'п']
};

If I write the variable ${message.author.coins} then this gives
5ec2882eaa19f040069658.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
myxomor469, 2020-05-19
@XXXVladsXXX

you should select by user id his data from the profile.json file

.addField("Монеты:",`**${profile[message.author.id].coins}**`)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question