Discord Bot的“状态"从玩到观看? [英] Discord Bot "Status" from Playing to Watching?

查看:183
本文介绍了Discord Bot的“状态"从玩到观看?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望将我的不和谐机器人的状态从正在播放"更改为正在观看"或其他任何选项,但无法理解在何处声明,有人可以帮助我吗?这是我当前状态的代码行:

I'm hoping to change my discord's bot status from "Playing" to "Watching" or any of the other options but can not understand where to declare this at, can someone please help me? This is the line of code I have for the current status:

client.user.setActivity(`${client.users.size} in here buying the dip on AAPL`);
});

推荐答案

您可以使用

You can use setActivity, you just aren't using it correctly if you want to change it to watching.

client.user.setActivity('YouTube', { type: 'WATCHING' });

这是您应该执行的方式,WATCHING也可以用LISTENINGPLAYINGSTREAMING代替,这些都是

This is how you should do it, WATCHING can also be replaced by LISTENING, PLAYING and STREAMING, these are all of part of Activity Type.

这篇关于Discord Bot的“状态"从玩到观看?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆