我想知道为什么下面的代码没有改变我的机器人的活动。我运行我的漫游器,但状态仅更改,控制台记录该漫游器处于联机状态。我的漫游器显示如下:https://gyazo.com/9def3dad8fa388032d9f33b9e3b14de7
有什么想法吗?
bot.on('ready', ()=>{
bot.user.setActivity('Chillzone', {type: 'WATCHING'})
bot.user.setStatus('idle')
console.log('This bot is online')
});
答案 0 :(得分:0)
也许尝试这样的事情:
bot.on("ready", () => {
console.log(`I'm ready!`);
bot.user
.setPresence({
activity: { name: 'Chillzone' },
status: "idle",
type: "WATCHING"
})
.then(console.log)
.catch(console.error);
});
这是同一件事,对我有用,希望对您有用!