因此,我试图让我的机器人的流媒体与抑郁症,但我已经尝试了多种方法,他们都不起作用。
我尝试过以下方法:
client.user.setPresence({ game: { name: 'with depression' }, status: 'online' });
bot.user.setGame('with depression', 'https://www.twitch.tv/monstercat');所有这些似乎都没有以他们应该的方式工作。任何帮助都是非常感谢的。
发布于 2018-06-16 02:02:31
使用以下命令:
client.user.setActivity("with depression", {
type: "STREAMING",
url: "https://www.twitch.tv/monstercat"
});发布于 2018-03-15 06:35:02
.setGame已停产。使用:
client.user.setActivity("Game"); 设置正在进行的游戏状态。
另外,如果您使用的是较早版本的discord.js,请尝试执行以下操作:
client.user.setGame("Game");在较新版本的discord.js中,这是不推荐使用的。
发布于 2018-06-18 15:56:08
启动时启动消息的简单方法:
bot.on('ready', () => {
bot.user.setStatus('available')
bot.user.setPresence({
game: {
name: 'with depression',
type: "STREAMING",
url: "https://www.twitch.tv/monstercat"
}
});
});您也可以在启动后在其他地方声明它,以便根据需要更改消息:
bot.user.setPresence({ game: { name: 'with depression', type: "streaming", url: "https://www.twitch.tv/monstercat"}}); https://stackoverflow.com/questions/49286640
复制相似问题