Learn Before
Concept

Change bot activity status

It is possible to change your bot's current activity to 1 of 4 different statuses. Use the following templates to change the status whenever you want within your code (as long as the code is within an async function).

Playing a game

await client.change_presence(activity= discord.Game(name="some game"))

Streaming

await client.change_presence(activity= discord.Streaming(name="some stream", url=stream_url))

Listening

await client.change_presence(activity= discord.Activity(type=discord.ActivityType.listening, name="some song"))

Watching

await client.change_presence(activity= discord.Activity(type=discord.ActivityType.watching, name="some movie"))

0

1

Updated 2021-08-24

Tags

Python Programming Language

Data Science

Related