“Discord.py Set Activity” Réponses codées

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

Comment utiliser l'activité personnalisée dans 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"))
Code Worm

Comment utiliser l'activité personnalisée dans 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"))
Enchanting Elephant

Réponses similaires à “Discord.py Set Activity”

Questions similaires à “Discord.py Set Activity”

Plus de réponses similaires à “Discord.py Set Activity” dans Python

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code