“Discord.py Custom Status” Code-Antworten

Discord.py Status

# 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

Discord.py Änderungsstatus

# Playing ____
await bot.change_presence(activity=discord.Game(name='Minecraft'))
# Streaming ____
await bot.change_presence(activity=discord.Streaming(name="Chess", url=twitch_url))
# Watching ____
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="Harry Potter"))
# Competing in ____
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.competing, name="the House Cup"))
# Listening to ____
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name="!help"))
DenverCoder1

Discord.py Lesen Sie den benutzerdefinierten Status

@bot.command() #use @client.command here if you are using client to alternate commands.Bot
async def customstatus(ctx):
    for s in ctx.author.activities:
        if isinstance(s, discord.CustomActivity):
            print(s)
Wrong Wildebeest

Discord.py Custom Status

@client.event
async def on_ready():
    await client.change_presence(activity=discord.Game(name=f"on {len(client.guilds)} server\'s"))## this will show how meany server's you're bot is on
Tame Tamarin

Ähnliche Antworten wie “Discord.py Custom Status”

Fragen ähnlich wie “Discord.py Custom Status”

Weitere verwandte Antworten zu “Discord.py Custom Status” auf Python

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen