![]() For this reason many bots don’t change their status based on commands.Īnother limitation of the Discord API is that it does not at this time support custom statuses. In other words, if the bot is in many servers, its status will change in every server anytime a status change is triggered. One major issue with frequently changing the bot status is that Discord only supports a single status per server. This only updates when the bot starts, so for now it won’t update in real time as the bot is added to more servers. Now when the bot starts up it will automatically show how many servers it is a part of. # Startup Information async def on_ready(): await client.change_presence(activity=discord.Game('Sea of Thieves')) print('Connected to bot: '.format()) Naturally, I wanted the bot to be playing Sea of Thieves around the clock.Īdding the following code in the on_ready function sets the bot’s status to “Playing Sea of Thieves”. The bot was going to be in a server dedicated to Sea of Thieves. This is particularly relevant to the bot I originally set out to build. Let’s start with one of the most common statuses seen on Discord, playing a game. In order to keep things simple, we’ll append the examples to the on_ready event. Setting the bot’s status when it first comes online will add a bit of polish while it is hanging out in the server. Watching: Use discord.Activity() with the type argument set to to show the bot as watching something.Listening: Use discord.Activity() with the type argument set to to show the bot as listening to something.Streaming: Use discord.Streaming() to display the bot as streaming with an optional url argument.Provide the name of the game to the name argument ![]() Playing: Use discord.Game() to display the bot as playing a game.There are so many options for what a bot can do! ![]()
0 Comments
Leave a Reply. |