Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

discord.py set activity

# 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"))
Comment

how to use custom activity in 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"))

# Setting `Competing ` status
await bot.change_presence(status=discord.Status.online, activity=discord.Activity(type=discord.ActivityType.competing, name=f"Chess"))
Comment

how to use custom activity in discord.py

# 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"))

# Setting `Competing ` status
await bot.change_presence(status=discord.Status.online, activity=discord.Activity(type=discord.ActivityType.competing, name=f"Chess"))
Comment

PREVIOUS NEXT
Code Example
Python :: merge sort python 
Python :: pandas groupby 
Python :: python remove first element of list 
Python :: python greater than dunder 
Python :: union type python 
Python :: supress jupyter notebook output 
Python :: import modules given the full path python 
Python :: management command in django 
Python :: python count unique values in list 
Python :: python histogram one liners 
Python :: python selenium: does not wait until page is loaded after a click() command 
Python :: python sh command 
Python :: python filter list with list of booleans 
Python :: how to open py file without console 
Python :: .defaultdict 
Python :: stock market python 
Python :: Tuple: Create tuple 
Python :: python terminal ui 
Python :: beautiful soup find 
Python :: multiple model search in django rest framework 
Python :: python startswith method 
Python :: split string by special characters python 
Python :: python turtle 
Python :: numpy unique axis 
Python :: lru_cache 
Python :: what is chr function on python 
Python :: python looping over a list 
Python :: python coding practice 
Python :: python access class variable by string 
Python :: pandas convert string to float 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =