我正在尝试创建一个命令来输出玩家收藏品并总结recentAveragePrice
列出的物品总数。问题是当我尝试输出此 API 的任何部分时,它只是输出undefined
.
if (command === "inv"){
let getInv = async () => {
let response = await axios.get("https://inventory.roblox.com/v1/users/1417341214/assets/collectibles?sortOrder=Asc&limit=100");
let inv = response.data;
return inv;
}
let invValue = await getInv();
console.log(invValue);
message.channel.send(`${invValue.data.name} \n ${invValue.data.recentAveragePrice}`);
}
有只小跳蛙
相关分类