【发布时间】:2020-07-03 14:41:07
【问题描述】:
所以我在使用 node.js 的 coinbase API 定义价格时遇到问题,我可以发送嵌入,但我有点习惯了我缺少的东西来显示价格.提前致谢!
exports.run = async (client, msg, args) => {
const Discord = require('discord.js');
var Client = require('coinbase').Client;
var client = new Client({'apiKey': 'API KEY',
'apiSecret': 'API SECRET'});
client.getBuyPrice({'currencyPair': 'BTC-USD'}, function(err, price) {
const av = new Discord.RichEmbed()
let embed = new Discord.RichEmbed()
.setTitle("BTC Price Checker")
.setDescription(price)
.setFooter("Created with ❤️ by anonymous");
msg.channel.send(embed)
msg.delete();
});
}
【问题讨论】:
标签: javascript node.js discord.js