【发布时间】:2019-01-05 19:31:05
【问题描述】:
我有一个不和谐的机器人,我正在尝试每小时更改一次状态以带来一些多样性。但是我对javascript日期不太熟悉,有什么帮助吗? 这是我的代码:
var quotes = ["to my fire mix | >commands", "to youtube videos | >commands"]
if(it is this time of day){
var rand = quotes[Math.floor(Math.random() * quotes.length)];
client.user.setActivity(rand, {type: 'LISTENING'})
}
【问题讨论】:
标签: javascript node.js npm discord.js