“How to properly change a Discord bot’s status (Online, Idle, DND, Invisible) using discord.py?” #10162
-
I'm working on a Discord bot using discord.py and trying to change the bot's status (like Online, Idle, DND, Invisible). While I can change the activity (like Playing, Watching, etc.), the actual status always remains "Online" no matter what I try. Here’s a simplified version of what I’m doing: await bot.change_presence(
status=discord.Status.dnd,
activity=discord.Game(name="Do Not Disturb Mode")
) The activity changes correctly (shows “Playing Do Not Disturb Mode”), but the status doesn't change — the bot still appears Online in Discord. I also tried I'm using:
❓ My Questions:
Thanks in advance for any help! 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
How are you calling this change? |
Beta Was this translation helpful? Give feedback.
-
Mine error was the code was running on 2 places |
Beta Was this translation helpful? Give feedback.
How are you calling this change?
And instead of using a command/event, do it in your
commands.Bot(status..., activity...)