“Cómo usar la actividad personalizada en discord.py” Código de respuesta

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

Cómo usar la actividad personalizada en 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

Cómo usar la actividad personalizada en 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

Respuestas similares a “Cómo usar la actividad personalizada en discord.py”

Preguntas similares a “Cómo usar la actividad personalizada en discord.py”

Más respuestas relacionadas con “Cómo usar la actividad personalizada en discord.py” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código