Added commit hash to info/stats, point readme/info to steel's current twitter
This commit is contained in:
parent
963d5247f6
commit
abfbfe14fe
4 changed files with 14 additions and 5 deletions
|
@ -1,6 +1,9 @@
|
|||
import { readFileSync } from "fs";
|
||||
const { version } = JSON.parse(readFileSync(new URL("../../package.json", import.meta.url)));
|
||||
import Command from "../../classes/command.js";
|
||||
import { exec as baseExec } from "child_process";
|
||||
import { promisify } from "util";
|
||||
const exec = promisify(baseExec);
|
||||
|
||||
class InfoCommand extends Command {
|
||||
async run() {
|
||||
|
@ -16,11 +19,11 @@ class InfoCommand extends Command {
|
|||
"description": `This instance is managed by **${owner.username}#${owner.discriminator}**.`,
|
||||
"fields": [{
|
||||
"name": "ℹ️ Version:",
|
||||
"value": `v${version}${process.env.NODE_ENV === "development" ? "-dev" : ""}`
|
||||
"value": `v${version}${process.env.NODE_ENV === "development" ? `-dev (${(await exec("git rev-parse HEAD")).stdout.substring(0, 7)})` : ""}`
|
||||
},
|
||||
{
|
||||
"name": "📝 Credits:",
|
||||
"value": "Bot by **[Essem](https://essem.space)** and **[various contributors](https://github.com/esmBot/esmBot/graphs/contributors)**\nIcon by **[MintBorrow](https://mintborrow.newgrounds.com)**"
|
||||
"value": "Bot by **[Essem](https://essem.space)** and **[various contributors](https://github.com/esmBot/esmBot/graphs/contributors)**\nIcon by **[MintBurrow](https://twitter.com/MintBurrow)**"
|
||||
},
|
||||
{
|
||||
"name": "💬 Total Servers:",
|
||||
|
|
|
@ -3,6 +3,9 @@ const { version } = JSON.parse(readFileSync(new URL("../../package.json", import
|
|||
import os from "os";
|
||||
import Command from "../../classes/command.js";
|
||||
import { VERSION } from "eris";
|
||||
import { exec as baseExec } from "child_process";
|
||||
import { promisify } from "util";
|
||||
const exec = promisify(baseExec);
|
||||
|
||||
class StatsCommand extends Command {
|
||||
async run() {
|
||||
|
@ -20,7 +23,7 @@ class StatsCommand extends Command {
|
|||
"color": 16711680,
|
||||
"fields": [{
|
||||
"name": "Version",
|
||||
"value": `v${version}${process.env.NODE_ENV === "development" ? "-dev" : ""}`
|
||||
"value": `v${version}${process.env.NODE_ENV === "development" ? `-dev (${(await exec("git rev-parse HEAD")).stdout.substring(0, 7)})` : ""}`
|
||||
},
|
||||
{
|
||||
"name": "Cluster Memory Usage",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue