简体   繁体   English

更改discord.py中的状态

[英]Change status in discord.py

I want to make status for Discord bot like "Listening People's Problems". 我想让Discord机器人的状态如“听别人的问题”。 But how to change "Playing" into "Listening"? 但是如何将“播放”更改为“听”?

Here are some snippets I saved while I was writing my bot a while ago 这是我前一段时间写机器人时保存的一些代码片段

.setActivity({type: "LISTENING", "WATCHING", "PLAYING", "ETC."})


client.user.setPresence({
  game: {
    name: 'game',
    type: 0
   }
})

0: playing 0:玩

1: streaming 1:流式传输

2: listening 2:听

3: watching 3:观看


They depreciate things quiet often, try something in the scope of change_presence 他们经常贬低事物,尝试在change_presence范围内尝试

Check this out for reference: https://www.programcreek.com/python/example/107424/discord.Game 查看此作为参考: https : //www.programcreek.com/python/example/107424/discord.Game

Hope this inspires something 希望这能激发一些灵感

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM