mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -04:00
rely on built-in application install metadata
This commit is contained in:
parent
4bdf0459bd
commit
8ceba51a30
1 changed files with 1 additions and 12 deletions
|
@ -62,21 +62,10 @@ module.exports = {
|
||||||
formatted.usage += cstats.usage
|
formatted.usage += cstats.usage
|
||||||
}
|
}
|
||||||
|
|
||||||
let applicationMetadata;
|
|
||||||
try{
|
|
||||||
applicationMetadata = await superagent.get(`https://canary.discord.com/api/v9/applications/${context.client.user.id}`)
|
|
||||||
.set({
|
|
||||||
"Authorization": "Bot " + context.client.token
|
|
||||||
})
|
|
||||||
}catch(e){}
|
|
||||||
|
|
||||||
const display = [
|
const display = [
|
||||||
`${iconPill("home", "Servers ")} ${highlight(` ${formatted.guilds} `)}`
|
`${iconPill("home", "Servers ")} ${highlight(` ${formatted.guilds} `)}`
|
||||||
]
|
]
|
||||||
|
display.push(`${iconPill("user", "Installations")} ${highlight(` ${context.client.application.approximateUserInstallCount} `)}`)
|
||||||
if(applicationMetadata.body?.approximate_user_install_count)
|
|
||||||
display.push(`${iconPill("user", "Installations")} ${highlight(` ${applicationMetadata.body.approximate_user_install_count} `)}`)
|
|
||||||
|
|
||||||
display.push(`${iconPill("robot", "Shard ")} ${highlight(` ${context.shardId + 1}/${context.manager.cluster.shardCount} `)}`)
|
display.push(`${iconPill("robot", "Shard ")} ${highlight(` ${context.shardId + 1}/${context.manager.cluster.shardCount} `)}`)
|
||||||
display.push(`${iconPill("latency", "Memory Usage ")} ${highlight(` ${Math.round(formatted.usage / 1024 / 1024)}MB `)}`)
|
display.push(`${iconPill("latency", "Memory Usage ")} ${highlight(` ${Math.round(formatted.usage / 1024 / 1024)}MB `)}`)
|
||||||
display.push(`${iconPill("clock", "Uptime ")} ${highlight(` ${format(process.uptime())} `)}`)
|
display.push(`${iconPill("clock", "Uptime ")} ${highlight(` ${format(process.uptime())} `)}`)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue