diff options
author | 2022-11-20 06:11:52 -0800 | |
---|---|---|
committer | 2022-11-20 06:11:52 -0800 | |
commit | 0179ae50cbb49c83eeca4493e14a67e813ef3772 (patch) | |
tree | 1a46937d5e38e2901f4e845c2d0c0289b3ea0c90 /pydis_site/apps/content/resources | |
parent | Migrate Setting Different Statuses to Set Your Bot pin by Python bot to site (diff) |
Appeased the requests from reviews.
Diffstat (limited to 'pydis_site/apps/content/resources')
-rw-r--r-- | pydis_site/apps/content/resources/guides/python-guides/setting-different-statuses-on-your-bot.md | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/pydis_site/apps/content/resources/guides/python-guides/setting-different-statuses-on-your-bot.md b/pydis_site/apps/content/resources/guides/python-guides/setting-different-statuses-on-your-bot.md index 53390416..b44c55e1 100644 --- a/pydis_site/apps/content/resources/guides/python-guides/setting-different-statuses-on-your-bot.md +++ b/pydis_site/apps/content/resources/guides/python-guides/setting-different-statuses-on-your-bot.md @@ -1,13 +1,22 @@ --- -title: Setting Different Statuses to Set Your Bot +title: Setting Different Statuses on Your Bot description: How to personalize your Discord bot status --- + +You've probably seen a bot or two have a status message under their username in the member bar set to something such as `Playing Commands: .help`. + +This guide shows how to set such a presence, so your bot can have one as well. + **Please note:** -If you want to change the bot status, it is suggested to not do it during the on_ready event, since it would be called -many times and making an API call on that event has a chance to disconnect the bot. -Instead, set the desired status using the activity / status kwarg of commands.Bot, for example -`bot = commands.Bot(command_prefix="!", activity=..., status=...)` +If you want to change the bot status, it is suggested to not do so during the on_ready event, since it would be called many times and making an API call on that event has a chance to disconnect the bot. + +Instead, set the desired status using the activity / status kwarg of commands.Bot, for example: +```python +bot = commands.Bot(command_prefix="!", activity=..., status=...) +``` + +The following are examples of what you can put into the `activity` keyword argument. #### Setting 'Playing' Status ```python @@ -29,19 +38,9 @@ await client.change_presence(activity=discord.Activity(type=discord.ActivityType await client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="a movie")) ``` -#### Add Optional Status as Well: - -* status=discord.Status.\<status> - -####Available Statuses: - -* do_not_disturb(red icon) - - -* idle(yellow icon) - - -* online(default, green icon) - +### Add Optional Status as Well: -* offline(gray icon) +* `discord.Status.online` (default, green icon) +* `discord.Status.idle` (yellow icon) +* `discord.Status.do_not_disturb` (red icon) +* `discord.Status.offline` (gray icon) |