我目前有一个cron作业功能,每天早上7:00 AM发送一条消息,它工作正常,但现在我希望它从Trello卡中获得消息,而Trello部分则工作正常,但是当我把他们在一起是行不通的。有任何想法吗?这是我到目前为止所拥有的:
var job = new CronJob('01 15 18 * * *',function() {
let listID = "5ec3fda8a26c384e44f063bb";
trello.getcardsOnListWithExtraParams(listID,"pos:top",function (error,trelloCard) {
console.log('Found card:',trelloCard[0].name);
})
const wyrEmbed = new discord.RichEmbed()
.setTitle("❓**WOULD YOU RATHER**❓")
.addField(
"**THE WOULD YOU RATHER**","test: " + trelloCard[0].name)
.setDescription(
"? Top o' the mornin’ to ya! All throughout the night,I’ve been preparing a would you rather question for all of you! I can’t wait to see all of the answers you guys think of! "
)
.setTimestamp()
.setfooter("Munchies Ice Cream",client.user.avatarURL)
.setThumbnail("https://t4.rbxcdn.com/366f4da2e1924b6e4b0816086b485f05")
.setColor("7ab7e2");
const wyrthing = client.channels.get("688177088573997066")
wyrthing.send(wyrEmbed)
console.log('You will see this message every second')
},null,true,'America/New_York'
);
})