1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 12:21:00 -05:00

Only display one server for now

This commit is contained in:
AnxietyisReal 2023-08-20 11:04:14 +10:00
parent a5630ed6c1
commit e62c5e972e
2 changed files with 53 additions and 57 deletions

View File

@ -90,7 +90,7 @@ export default class TClient extends Client {
this.tags = new tags(this);
this.repeatedMessages = {};
this.setMaxListeners(45);
this.statsGraph = -60;
this.statsGraph = -120;
}
async init(){
console.time('Startup');

View File

@ -5,6 +5,11 @@ import canvas from 'canvas';
import {readFileSync} from 'node:fs';
import {FSData, TServer} from 'src/typings/interfaces.js';
const serverChoices = [
{name: 'Main Server', value: 'mainServer'},
{name: 'Second Server', value: 'secondServer'}
]
export default {
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
if (client.uptime < 30000) return interaction.reply('I have just restarted, please wait for MPLoop to finish initializing.')
@ -255,10 +260,7 @@ export default {
.setName('server')
.setDescription('The server to update')
.setRequired(true)
.setChoices(
{name: 'Main Server', value: 'mainServer'},
{name: 'Second Server', value: 'secondServer'}
)))
.setChoices(serverChoices[0])))
.addSubcommand(x=>x
.setName('players')
.setDescription('Display players on server')
@ -266,11 +268,8 @@ export default {
.setName('server')
.setDescription('The server to display players for')
.setRequired(true)
.setChoices(
{name: 'Main Server', value: 'mainServer'},
{name: 'Second Server', value: 'secondServer'}
)))
.addSubcommand(x=>x
.setChoices(serverChoices[0])))
/* .addSubcommand(x=>x
.setName('url')
.setDescription('View or update the server URL')
.addStringOption(x=>x
@ -284,7 +283,7 @@ export default {
.addStringOption(x=>x
.setName('address')
.setDescription('The URL to the dedicated-server-stats.json file')
.setRequired(false)))
.setRequired(false))) */
.addSubcommand(x=>x
.setName('info')
.setDescription('Display server information')
@ -292,10 +291,7 @@ export default {
.setName('server')
.setDescription('The server to display information for')
.setRequired(true)
.setChoices(
{name: 'Main Server', value: 'mainServer'},
{name: 'Second Server', value: 'secondServer'}
)))
.setChoices(serverChoices[0])))
.addSubcommand(x=>x
.setName('maintenance')
.setDescription('Toggle maintenance mode for #mp-active-players')