Skip to content

Instantly share code, notes, and snippets.

@scragly
Created October 28, 2018 03:12
Show Gist options
  • Save scragly/2579b4d335f87e83fbacb7dfd3d32828 to your computer and use it in GitHub Desktop.
Save scragly/2579b4d335f87e83fbacb7dfd3d32828 to your computer and use it in GitHub Desktop.
Activity updates on discord.py
# Setting `Playing ` status
await bot.change_presence(activity=discord.Game(name="a game"))

# Setting `Streaming ` status
await bot.change_presence(activity=discord.Streaming(name="My Stream", url=my_twitch_url))

# Setting `Listening ` status
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name="a song"))

# Setting `Watching ` status
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="a movie"))

Activity Enums:
https://discordpy.readthedocs.io/en/rewrite/api.html#discord.ActivityType

Activity classes docs:
Activity
Game
Streaming

@Iinksafe
Copy link

yo nice

@Azara33
Copy link

Azara33 commented Mar 22, 2021

thank you dude

@ajhawkings
Copy link

Thanks for the quick reference!

@yashmehla
Copy link

Thanks. <3

@XdekHckr
Copy link

XdekHckr commented Nov 22, 2021

There is also:

# Setting `Competing ` status

await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.competing, name="a movie"))

@PVER-Programz
Copy link

Thanks..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment