2023-03-15 14:09:09 +00:00
import { readFileSync } from "fs" ;
const { version } = JSON . parse ( readFileSync ( new URL ( "../../package.json" , import . meta . url ) ) ) ;
import Command from "../../classes/command.js" ;
import { getServers } from "../../utils/misc.js" ;
class InfoCommand extends Command {
async run ( ) {
let owner = this . client . users . get ( process . env . OWNER . split ( "," ) [ 0 ] ) ;
if ( ! owner ) owner = await this . client . rest . users . get ( process . env . OWNER . split ( "," ) [ 0 ] ) ;
const servers = await getServers ( this . client ) ;
2023-03-17 00:23:01 +00:00
// await this.acknowledge();
2023-03-15 14:09:09 +00:00
return {
embeds : [ {
color : 16711680 ,
author : {
name : "esmBot Info/Credits" ,
iconURL : this . client . user . avatarURL ( )
} ,
description : ` This instance is managed by ** ${ owner . username } # ${ owner . discriminator } **. ` ,
fields : [ {
name : "ℹ ️ Version:" ,
value : ` v ${ version } ${ process . env . NODE _ENV === "development" ? ` -dev ( ${ process . env . GIT _REV } ) ` : "" } `
} ,
{
name : "📝 Credits:" ,
value : "Bot by **[Essem](https://essem.space)** and **[various contributors](https://github.com/esmBot/esmBot/graphs/contributors)**\nLogo by **[MintBurrow](https://twitter.com/MintBurrow)**"
} ,
{
name : "💬 Total Servers:" ,
value : servers ? servers : ` ${ this . client . guilds . size } (for this process only) `
} ,
{
name : "✅ Official Server:" ,
value : "[Click here!](https://esmbot.net/support)"
} ,
{
name : "💻 Source Code:" ,
value : "[Click here!](https://github.com/esmBot/esmBot)"
} ,
{
name : "🛡️ Privacy Policy:" ,
value : "[Click here!](https://esmbot.net/privacy.html)"
} ,
{
name : "🐘 Mastodon:" ,
value : "[Click here!](https://wetdry.world/@esmBot)"
}
]
} ]
} ;
}
static description = "Gets some info and credits about me" ;
static aliases = [ "botinfo" , "credits" ] ;
}
2021-08-19 14:19:14 +00:00
export default InfoCommand ;