const activities_list = [
"happy holidays!❄️",
"happy holidays!?",
"happy holidays!?",
"happy holidays!⛄"
];
bot.on('ready', () => {
setInterval(() => {
const index = Math.floor(Math.random() * (activities_list.length - 1) + 1);
bot.user.setActivity(activities_list[index]);
}, 30000);
});
但是我想在WATCHING状态类型中显示它,我该怎么做?
答案 0 :(得分:0)
首先查看the Discord.js documentation,这是您所追求的一个直接例子:
client.user.setActivity('YouTube', { type: 'WATCHING' })
答案 1 :(得分:0)
bot.on('ready', () => {
setInterval(() => {
const index = Math.floor(Math.random() * (activities_list.length - 1) + 1);
bot.user.setActivity(activities_list[index], {type: 'Watching'});
}, 30000);
});