test 1.2 de la récupération de pp discord sur site web
This commit is contained in:
parent
6c0512972d
commit
5d0d451753
1 changed files with 20 additions and 20 deletions
|
|
@ -55,25 +55,25 @@ def setup_routes(app, bot):
|
|||
"description": guild.description if guild.description else None,
|
||||
"features": list(guild.features) if guild.features else [],
|
||||
"created_at": guild.created_at.isoformat() if guild.created_at else None,
|
||||
"channels": [
|
||||
{
|
||||
"id": channel.id,
|
||||
"name": channel.name,
|
||||
"type": str(channel.type),
|
||||
"category": channel.category.name if channel.category else None
|
||||
}
|
||||
for channel in guild.channels
|
||||
],
|
||||
"roles": [
|
||||
{
|
||||
"id": role.id,
|
||||
"name": role.name,
|
||||
"color": role.color,
|
||||
"position": role.position,
|
||||
"member_count": len(role.members)
|
||||
}
|
||||
for role in guild.roles
|
||||
]
|
||||
# "channels": [
|
||||
# {
|
||||
# "id": channel.id,
|
||||
# "name": channel.name,
|
||||
# "type": str(channel.type),
|
||||
# "category": channel.category.name if channel.category else None
|
||||
# }
|
||||
# for channel in guild.channels
|
||||
# ],
|
||||
# "roles": [
|
||||
# {
|
||||
# "id": role.id,
|
||||
# "name": role.name,
|
||||
# "color": role.color,
|
||||
# "position": role.position,
|
||||
# "member_count": len(role.members)
|
||||
# }
|
||||
# for role in guild.roles
|
||||
# ]
|
||||
})
|
||||
|
||||
@app.route("/api/status")
|
||||
|
|
@ -85,7 +85,7 @@ def setup_routes(app, bot):
|
|||
"user_id": bot.user.id if bot.user else None,
|
||||
"guild_count": len(bot.guilds),
|
||||
"total_members": sum(guild.member_count for guild in bot.guilds) if bot.guilds else 0,
|
||||
"total_channels": sum(len(guild.channels) for guild in bot.guilds) if bot.guilds else 0,
|
||||
# "total_channels": sum(len(guild.channels) for guild in bot.guilds) if bot.guilds else 0,
|
||||
"uptime": "N/A", # TODO: Implement uptime tracking
|
||||
"version": "2.0.0",
|
||||
"api_endpoints": [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue