I want to write a command that outputs information about the server. I ran into the error

ctx.guild.members returns full list of all members. Therefore a size of your embed is very big and Discord can't display it.

If you want to display member count use ctx.guild.member_count instead of ctx.guild.members.

To display number of bots use something like this:

sum(member.bot for member in ctx.guild.members)