如何根据新更新在不和谐机器人中设置自定义状态? [英] How can I set custom status in discord bot according to new update?

查看:12
本文介绍了如何根据新更新在不和谐机器人中设置自定义状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据新的更新,您可以在不播放或收听的情况下设置自己的自定义状态,这尚未添加到文档中,但我可以在这里做什么.在 discord.js git 中没有设置自定义活动的选项,请参阅图像 stable/src/util/Constants.js 也在这里不和谐状态图片

According to new update youu can set your own custom status without playing or listening this is't added in documentation yet what can I do here. There is no option to set custom activity in the discord.js git see the image stable/src/util/Constants.js here too discord status image

推荐答案

你可以使用这段代码

client.on("ready", () =>{
    console.log(`Logged in as ${client.user.tag}!`);
    client.user.setPresence({
        status: "online",  //You can show online, idle....
        game: {
            name: "Using !help",  //The message shown
            type: "STREAMING" //PLAYING: WATCHING: LISTENING: STREAMING:
        }
    });
 });

这篇关于如何根据新更新在不和谐机器人中设置自定义状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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