let db = new sqlite3.Database('./db/usermutehistory.db');
// construct the insert statement with multiple placeholders
// based on the number of rows
let sql = 'SELECT Who who, Made made, Reason reason FROM UsersMuteHistory where Who = ? ';
// output the INSERT statement
let who = search.id
db.each(sql, [who], (err, row) => {
if (err) {
throw err;
}
console.log(row);
let logchannel = message.guild.channels.find(channel => channel.name === "logs");
var mutehistory = new Discord.RichEmbed()
.setAuthor("Fury-Bot", bot.user.avatarURL)
.setColor('#FF0000')
.addField(`Who`, `<@${row.who}>`,true)
.addField(`Made`, `<@${row.made}>`,true)
.addField(`Reason`, row.reason);
logchannel.send(mutehistory);
});
每次我给row.who或row.make打电话时,它总是向我显示40的结尾,但在数据库上,它以其他数字结尾。 https://imgur.com/a/7quNAwV =输出 https://imgur.com/a/f7HicCK =数据库中的数据
答案 0 :(得分:0)
JavaScript没有内置的Number
表示形式,表示数量如此之大。我会考虑使用字符串。