i I want to write a command that outputs information about the server. I ran into the error
My code:
@client.command( pass_context = True )
async def server( ctx ): #server
emb = discord.Embed( title = '<:rightgrey:927573354863542292> Kuromi | Информация', description = f'<:ccrown:928503495361982605> **Владелец:** {ctx.guild.owner.mention} | `{ctx.guild.owner.name}`', colour = 0x2f3136, url = '' )
emb.add_field(name=f"Пользователей: {ctx.guild.member_count}", value=f"Участников: {ctx.guild.members}\nБотов:")
await ctx.send( embed = emb )
#{ctx.guild.member_count}
client.run('') #твой токен бота
Именно часть с {ctx.guild.members} отказывается работать, выводя такую ошибку:
Traceback (most recent call last):
File "C:\Users\vlad\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\vlad\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\vlad\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embed: Embed size exceeds maximum size of 6000
and I don't really understand how to display the display of the number of bots!