Discord.py bot guild sayısı

Oct 15 2020

Botumun içinde bulunduğu lonca miktarını almaya çalışıyorum, bu benim mevcut kodum:

@client.command()
async def servers(ctx):
    await ctx.send(f"{str(client.guilds)}")

Ama bot sadece [<Guild id=739683588408082462 name='Epic bot testing' shard_id=None chunked=True member_count=17>]bunu nasıl düzeltebilirim?

Yanıtlar

1 FurtherReading Oct 15 2020 at 07:35

client.guildsSadece değiştirmek, böylece filolar listesidir striçin lenbu listenin uzunluğunu alır.

@client.command()
async def servers(ctx):
    await ctx.send(f"{len(client.guilds)}")