如何显示嵌入中用户的列值?

时间:2019-11-11 14:54:41

标签: javascript mysql node.js discord discord.js

我想从表userLevel中显示用户xp

代码如下:

connection.query(`SELECT userXP FROM 'userLevel' WHERE userID='${message.author.id}`, err => {
        if(err) throw err;
        message.channel.send({embed: {
            color: 15844367,
            description: 
          }
        });
    });

我不知道说明中显示的是xp

1 个答案:

答案 0 :(得分:0)

connection.query(`SELECT userXP FROM 'userLevel' WHERE userID='${message.author.id}`, err => {
        if(err) throw err;
        message.channel.send({embed: {
            color: 15844367,
            description: userXP
          }
        });
    });