mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -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.')
|
||||||
@ -246,60 +251,51 @@ export default {
|
|||||||
})[interaction.options.getSubcommand()]();
|
})[interaction.options.getSubcommand()]();
|
||||||
},
|
},
|
||||||
data: new Discord.SlashCommandBuilder()
|
data: new Discord.SlashCommandBuilder()
|
||||||
.setName('mp')
|
.setName('mp')
|
||||||
.setDescription('Display MP status and other things')
|
.setDescription('Display MP status and other things')
|
||||||
.addSubcommand(x=>x
|
.addSubcommand(x=>x
|
||||||
.setName('status')
|
.setName('status')
|
||||||
.setDescription('Display server status')
|
.setDescription('Display server status')
|
||||||
.addStringOption(x=>x
|
.addStringOption(x=>x
|
||||||
.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'},
|
.addSubcommand(x=>x
|
||||||
{name: 'Second Server', value: 'secondServer'}
|
.setName('players')
|
||||||
)))
|
.setDescription('Display players on server')
|
||||||
.addSubcommand(x=>x
|
.addStringOption(x=>x
|
||||||
.setName('players')
|
.setName('server')
|
||||||
.setDescription('Display players on server')
|
.setDescription('The server to display players for')
|
||||||
.addStringOption(x=>x
|
.setRequired(true)
|
||||||
.setName('server')
|
.setChoices(serverChoices[0])))
|
||||||
.setDescription('The server to display players for')
|
/* .addSubcommand(x=>x
|
||||||
.setRequired(true)
|
.setName('url')
|
||||||
.setChoices(
|
.setDescription('View or update the server URL')
|
||||||
{name: 'Main Server', value: 'mainServer'},
|
.addStringOption(x=>x
|
||||||
{name: 'Second Server', value: 'secondServer'}
|
.setName('server')
|
||||||
)))
|
.setDescription('The server to update')
|
||||||
.addSubcommand(x=>x
|
.setRequired(true)
|
||||||
.setName('url')
|
.setChoices(
|
||||||
.setDescription('View or update the server URL')
|
{name: 'Main Server', value: 'mainServer'},
|
||||||
.addStringOption(x=>x
|
{name: 'Second Server', value: 'secondServer'}
|
||||||
.setName('server')
|
))
|
||||||
.setDescription('The server to update')
|
.addStringOption(x=>x
|
||||||
.setRequired(true)
|
.setName('address')
|
||||||
.setChoices(
|
.setDescription('The URL to the dedicated-server-stats.json file')
|
||||||
{name: 'Main Server', value: 'mainServer'},
|
.setRequired(false))) */
|
||||||
{name: 'Second Server', value: 'secondServer'}
|
.addSubcommand(x=>x
|
||||||
))
|
.setName('info')
|
||||||
.addStringOption(x=>x
|
.setDescription('Display server information')
|
||||||
.setName('address')
|
.addStringOption(x=>x
|
||||||
.setDescription('The URL to the dedicated-server-stats.json file')
|
.setName('server')
|
||||||
.setRequired(false)))
|
.setDescription('The server to display information for')
|
||||||
.addSubcommand(x=>x
|
.setRequired(true)
|
||||||
.setName('info')
|
.setChoices(serverChoices[0])))
|
||||||
.setDescription('Display server information')
|
.addSubcommand(x=>x
|
||||||
.addStringOption(x=>x
|
.setName('maintenance')
|
||||||
.setName('server')
|
.setDescription('Toggle maintenance mode for #mp-active-players')
|
||||||
.setDescription('The server to display information for')
|
.addStringOption(x=>x
|
||||||
.setRequired(true)
|
.setName('message')
|
||||||
.setChoices(
|
.setDescription('The message to display in the channel')))
|
||||||
{name: 'Main Server', value: 'mainServer'},
|
|
||||||
{name: 'Second Server', value: 'secondServer'}
|
|
||||||
)))
|
|
||||||
.addSubcommand(x=>x
|
|
||||||
.setName('maintenance')
|
|
||||||
.setDescription('Toggle maintenance mode for #mp-active-players')
|
|
||||||
.addStringOption(x=>x
|
|
||||||
.setName('message')
|
|
||||||
.setDescription('The message to display in the channel')))
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user