@@ -384,6 +384,48 @@ def __init__(self, app: "EggsplodeApp"):
384384 super ().__init__ (timeout = None )
385385 self .app = app
386386 self .container = discord .ui .Container ()
387+ self .add_item (self .container )
388+ self .add_item (
389+ discord .ui .Button (
390+ label = "Help" ,
391+ url = "https://github.com/iqnite/eggsplode/wiki" ,
392+ emoji = "❓" ,
393+ )
394+ )
395+ self .add_item (
396+ discord .ui .Button (
397+ label = "Website" ,
398+ url = "https://iqnite.github.io/" ,
399+ style = discord .ButtonStyle .link ,
400+ emoji = replace_emojis ("🌐" ),
401+ )
402+ )
403+ self .add_item (
404+ discord .ui .Button (
405+ label = "Official Server" ,
406+ url = "https://discord.gg/UGm36FkGDF" ,
407+ style = discord .ButtonStyle .link ,
408+ emoji = replace_emojis ("💬" ),
409+ )
410+ )
411+ self .add_item (
412+ discord .ui .Button (
413+ label = "GitHub" ,
414+ url = "https://github.com/iqnite/eggsplode" ,
415+ style = discord .ButtonStyle .link ,
416+ emoji = replace_emojis ("🐙" ),
417+ )
418+ )
419+ self .add_item (
420+ discord .ui .Button (
421+ label = "Vote on top.gg" ,
422+ url = "https://top.gg/bot/1325443178622484590/vote" ,
423+ style = discord .ButtonStyle .link ,
424+ emoji = "🎉" ,
425+ )
426+ )
427+
428+ async def create_container (self ):
387429 self .container .add_section (
388430 discord .ui .TextDisplay (
389431 format_message ("version_eggsplode" , INFO ["version" ])
@@ -415,13 +457,19 @@ def __init__(self, app: "EggsplodeApp"):
415457 format_message ("status_memory" , psutil .virtual_memory ().percent )
416458 )
417459 self .container .add_separator ()
460+ application_info = await self .app .application_info ()
418461 self .container .add_section (
419462 discord .ui .TextDisplay (
420- format_message ("status_server_installs" , len (self .app .guilds ))
463+ format_message (
464+ "status_server_installs" , application_info .approximate_guild_count
465+ )
466+ ),
467+ discord .ui .TextDisplay (
468+ format_message (
469+ "status_user_installs" ,
470+ application_info .approximate_user_install_count ,
471+ )
421472 ),
422- # discord.ui.TextDisplay(
423- # format_message("status_user_installs", len(self.app.users))
424- # ),
425473 accessory = discord .ui .Button (
426474 label = "Install" ,
427475 url = "https://discord.com/oauth2/authorize?client_id=1325443178622484590" ,
@@ -430,46 +478,6 @@ def __init__(self, app: "EggsplodeApp"):
430478 )
431479 if self .app .admin_maintenance :
432480 self .container .add_text (format_message ("maintenance" ))
433- self .add_item (self .container )
434- self .add_item (
435- discord .ui .Button (
436- label = "Help" ,
437- url = "https://github.com/iqnite/eggsplode/wiki" ,
438- emoji = "❓" ,
439- )
440- )
441- self .add_item (
442- discord .ui .Button (
443- label = "Website" ,
444- url = "https://iqnite.github.io/" ,
445- style = discord .ButtonStyle .link ,
446- emoji = replace_emojis ("🌐" ),
447- )
448- )
449- self .add_item (
450- discord .ui .Button (
451- label = "Official Server" ,
452- url = "https://discord.gg/UGm36FkGDF" ,
453- style = discord .ButtonStyle .link ,
454- emoji = replace_emojis ("💬" ),
455- )
456- )
457- self .add_item (
458- discord .ui .Button (
459- label = "GitHub" ,
460- url = "https://github.com/iqnite/eggsplode" ,
461- style = discord .ButtonStyle .link ,
462- emoji = replace_emojis ("🐙" ),
463- )
464- )
465- self .add_item (
466- discord .ui .Button (
467- label = "Vote on top.gg" ,
468- url = "https://top.gg/bot/1325443178622484590/vote" ,
469- style = discord .ButtonStyle .link ,
470- emoji = "🎉" ,
471- )
472- )
473481
474482
475483def get_uptime () -> datetime .timedelta :
0 commit comments