mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-29 05:35:38 -05:00
Only display one server for now
This commit is contained in:
parent
39ce572292
commit
938297e87d
@ -90,7 +90,7 @@ export default class TClient extends Client {
|
|||||||
this.tags = new tags(this);
|
this.tags = new tags(this);
|
||||||
this.repeatedMessages = {};
|
this.repeatedMessages = {};
|
||||||
this.setMaxListeners(45);
|
this.setMaxListeners(45);
|
||||||
this.statsGraph = -60;
|
this.statsGraph = -120;
|
||||||
}
|
}
|
||||||
async init(){
|
async init(){
|
||||||
console.time('Startup');
|
console.time('Startup');
|
||||||
|
@ -5,6 +5,11 @@ import canvas from 'canvas';
|
|||||||
import {readFileSync} from 'node:fs';
|
import {readFileSync} from 'node:fs';
|
||||||
import {FSData, TServer} from 'src/typings/interfaces.js';
|
import {FSData, TServer} from 'src/typings/interfaces.js';
|
||||||
|
|
||||||
|
const serverChoices = [
|
||||||
|
{name: 'Main Server', value: 'mainServer'},
|
||||||
|
{name: 'Second Server', value: 'secondServer'}
|
||||||
|
]
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
async run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
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.')
|
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')
|
.setName('server')
|
||||||
.setDescription('The server to update')
|
.setDescription('The server to update')
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
.setChoices(
|
.setChoices(serverChoices[0])))
|
||||||
{name: 'Main Server', value: 'mainServer'},
|
|
||||||
{name: 'Second Server', value: 'secondServer'}
|
|
||||||
)))
|
|
||||||
.addSubcommand(x=>x
|
.addSubcommand(x=>x
|
||||||
.setName('players')
|
.setName('players')
|
||||||
.setDescription('Display players on server')
|
.setDescription('Display players on server')
|
||||||
@ -266,11 +268,8 @@ export default {
|
|||||||
.setName('server')
|
.setName('server')
|
||||||
.setDescription('The server to display players for')
|
.setDescription('The server to display players for')
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
.setChoices(
|
.setChoices(serverChoices[0])))
|
||||||
{name: 'Main Server', value: 'mainServer'},
|
/* .addSubcommand(x=>x
|
||||||
{name: 'Second Server', value: 'secondServer'}
|
|
||||||
)))
|
|
||||||
.addSubcommand(x=>x
|
|
||||||
.setName('url')
|
.setName('url')
|
||||||
.setDescription('View or update the server URL')
|
.setDescription('View or update the server URL')
|
||||||
.addStringOption(x=>x
|
.addStringOption(x=>x
|
||||||
@ -284,7 +283,7 @@ export default {
|
|||||||
.addStringOption(x=>x
|
.addStringOption(x=>x
|
||||||
.setName('address')
|
.setName('address')
|
||||||
.setDescription('The URL to the dedicated-server-stats.json file')
|
.setDescription('The URL to the dedicated-server-stats.json file')
|
||||||
.setRequired(false)))
|
.setRequired(false))) */
|
||||||
.addSubcommand(x=>x
|
.addSubcommand(x=>x
|
||||||
.setName('info')
|
.setName('info')
|
||||||
.setDescription('Display server information')
|
.setDescription('Display server information')
|
||||||
@ -292,10 +291,7 @@ export default {
|
|||||||
.setName('server')
|
.setName('server')
|
||||||
.setDescription('The server to display information for')
|
.setDescription('The server to display information for')
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
.setChoices(
|
.setChoices(serverChoices[0])))
|
||||||
{name: 'Main Server', value: 'mainServer'},
|
|
||||||
{name: 'Second Server', value: 'secondServer'}
|
|
||||||
)))
|
|
||||||
.addSubcommand(x=>x
|
.addSubcommand(x=>x
|
||||||
.setName('maintenance')
|
.setName('maintenance')
|
||||||
.setDescription('Toggle maintenance mode for #mp-active-players')
|
.setDescription('Toggle maintenance mode for #mp-active-players')
|
||||||
|
Loading…
Reference in New Issue
Block a user