- Riou,
Bonjour je vous contacte aujourd’hui car je bloque sur ma commande server info. Dans la console rien apparait d’anormal. Mais quand je fais la commande sur discord sa n’affiche rien !! Voici mon code :
@bot.command()
async def server_info(ctx):
name = str(ctx.guild.name)
description = str(ctx.guild.description)
owner = str(ctx.guild.owner)
id = str(ctx.guild.id)
region = str(ctx.guild.region)
memberCount = str(ctx.guild.member_count)
icon = str(ctx.guild.icon_url)
total_roles = len(discord.Guild.roles)
total_boosts = str(discord.Guild.premium_subscription_count)
boost_level = str(discord.Guild.premium_tier)
total_voice_channels = len(discord.Guild.voice_channels)
total_channels = len(discord.Guild.channels)
total_categories = len(discord.Guild.categories)
total_text_channels = len(discord.Guild.text_channels)
banniere = discord.Guild.banner_url
embed = discord.Embed(title = name + "Server Information", description = description, color = 0xfa8072)
embed.set_thumbnail(url = icon)
embed.add_field(name = "créateur", value = owner, inline = False)
embed.add_field(name = "Server ID", value = id, inline = False)
embed.add_field(name = "Région", value = region, inline = False)
embed.add_field(name = "Nombre de membres", value = memberCount, inline = False)
embed.add_field(name = "Nombre de roles", value = total_roles, inline = False)
embed.add_field(name = "Nombre de boosts ( niveau de boost )", value = f"{total_boosts} Boosts ( Niveau {boost_level} )", inline = False)
embed.add_field(name = "Nombre de salons", value = total_channels, inline = False)
embed.add_field(name = "Nombre de catégories", value = total_categories, inline = False)
embed.add_field(name = "Nombre de salons textuels", value = total_text_channels, inline = False)
embed.add_field(name = "Nombre de salons vocaux", value = total_voice_channels, inline = False)
embed.add_field(name = "Bannière", value = banniere, inline = False)
await ctx.send(embed = embed)
Tout n’est pas afficher mais les balise mise dans value son detaillé au desus
+0
-0