mirror of https://github.com/thaldrin/thaldrin.git
remove prometheus and fix help command
This commit is contained in:
parent
053dcdf236
commit
0176a3d1fc
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "thaldrin",
|
||||
"version": "4.0-dev",
|
||||
"version": "4",
|
||||
"description": "",
|
||||
"main": "build/shard.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import Logger from "../utils/logger"
|
||||
import config from "../../config"
|
||||
import { Guild } from "discord.js"
|
||||
import Prom from "../utils/init.prometheus";
|
||||
// import Prom from "../utils/init.prometheus";
|
||||
export = {
|
||||
name: "guildCreate",
|
||||
// @ts-ignore
|
||||
run: async (client, guild: Guild) => {
|
||||
Prom.guildCount.inc()
|
||||
Prom.totalGuilds.set(client.guilds.cache.size)
|
||||
// Prom.guildCount.inc()
|
||||
// Prom.totalGuilds.set(client.guilds.cache.size)
|
||||
Logger.info({
|
||||
type: "event:guildCreate",
|
||||
message: `New Guild: ${guild.name} [${guild.id}]`
|
||||
|
|
|
@ -8,13 +8,13 @@ import { Commands, Shortlink, SourceFinder } from "../utils/wrapper.features";
|
|||
import language from "../utils/language";
|
||||
import replace from "../utils/replace";
|
||||
import chalk from "chalk";
|
||||
import Prom from "../utils/init.prometheus";
|
||||
// import Prom from "../utils/init.prometheus";
|
||||
|
||||
|
||||
//
|
||||
export = {
|
||||
name: "message",
|
||||
run: async (client: Client, message: Message) => {
|
||||
Prom.messagesSeen.inc()
|
||||
// Prom.messagesSeen.inc()
|
||||
if (message.author.bot) return
|
||||
if (message.channel.type === "dm") return
|
||||
|
||||
|
@ -124,7 +124,7 @@ export = {
|
|||
|
||||
}
|
||||
|
||||
Prom.commandsExecuted.inc()
|
||||
// Prom.commandsExecuted.inc()
|
||||
let { data: command_usage_data, command_usage_error } = await supabase.from<Usage>('usage').update({ amount: (usage_check_data[0] || { amount: 0 }).amount + 1 }).select().eq("name", cmd.name)
|
||||
Logger.info({
|
||||
type: "command:executed",
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import Logger from "../utils/logger"
|
||||
import config from "../../config"
|
||||
import prom from "../utils/init.prometheus"
|
||||
// import prom from "../utils/init.prometheus"
|
||||
export = {
|
||||
name: "ready",
|
||||
// @ts-ignore
|
||||
run: async (client: any) => {
|
||||
prom.totalGuilds.set(client.guilds.cache.size)
|
||||
// prom.totalGuilds.set(client.guilds.cache.size)
|
||||
Logger.info({
|
||||
type: "event:ready",
|
||||
message: `${config.variables.name} has started`
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import Logger from "../utils/logger"
|
||||
import { Guild } from "discord.js"
|
||||
import Prom from "../utils/init.prometheus";
|
||||
// import Prom from "../utils/init.prometheus";
|
||||
export = {
|
||||
name: "guildDelete",
|
||||
// @ts-ignore
|
||||
run: async (client, guild: Guild) => {
|
||||
Prom.guildCount.dec()
|
||||
Prom.totalGuilds.set(client.guilds.cache.size)
|
||||
// Prom.guildCount.dec()
|
||||
// Prom.totalGuilds.set(client.guilds.cache.size)
|
||||
Logger.info({
|
||||
type: "event:guildDelete",
|
||||
message: `Left Guild: ${guild.name} [${guild.id}]`
|
||||
|
|
|
@ -42,8 +42,8 @@ export = class Stats extends Command {
|
|||
|
||||
let embed = new MessageEmbed().setColor(ctx.config.variables.color).setFooter(`${ctx.config.variables.name} v${ctx.config.pkg.version} [${commitHash}]`, ctx.config.variables.avatar)
|
||||
.setTitle(`Statistics`)
|
||||
// .setDescription(`Visit [our System Dashboard](https://system.thaldr.in) for more in-depth stats`)
|
||||
.addField(`Misc`, MiscValues.map((value) => `${value}`))
|
||||
.setDescription(MiscValues.map((value) => `${value}`))
|
||||
// .addField(`Misc`, )
|
||||
|
||||
|
||||
ctx.channel.send(embed)
|
||||
|
|
|
@ -34,9 +34,9 @@ export = class Help extends Command {
|
|||
let commands = await (await Commands(arg, ctx.client)).map(command => `\`${command.name}\` - ${command.description}`)
|
||||
embed.addField("Commands", commands.join("\n"))
|
||||
// @ts-ignore
|
||||
embed.setTitle(`${language.get(ctx.settings.locale).categories[command?.module.toLowerCase()].name || arg}`)
|
||||
embed.setTitle(`${language.get(ctx.settings.locale).categories[arg].name || arg}`)
|
||||
// @ts-ignore
|
||||
embed.setDescription(`${language.get(ctx.settings.locale).categories[command?.module.toLowerCase()].desc || ""}\n\nTotal Commands: **${commands.length}**`)
|
||||
embed.setDescription(`${language.get(ctx.settings.locale).categories[arg].desc || ""}\n\nTotal Commands: **${commands.length}**`)
|
||||
return ctx.channel.send(embed)
|
||||
}
|
||||
// @ts-ignore
|
||||
|
|
Loading…
Reference in New Issue