mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-18 00:31:00 -05:00
Compare commits
No commits in common. "f7f3db7c904a596487b0edcab2b0282bf3a0978c" and "29bf036c918cab334b907bc158c99230f3983e24" have entirely different histories.
f7f3db7c90
...
29bf036c91
@ -81,7 +81,7 @@ export default class Developer {
|
|||||||
if (interaction.replied) interaction.followUp(update_success);
|
if (interaction.replied) interaction.followUp(update_success);
|
||||||
else interaction.reply(update_success);
|
else interaction.reply(update_success);
|
||||||
};
|
};
|
||||||
exec('git pull', {windowsHide:true}, (err:Error, stdout)=>{
|
exec('git pull --rebase', {windowsHide:true}, (err:Error, stdout)=>{
|
||||||
if (err) hammondYouIdiot.edit(`\`\`\`${UsernameHelper(err.message)}\`\`\``);
|
if (err) hammondYouIdiot.edit(`\`\`\`${UsernameHelper(err.message)}\`\`\``);
|
||||||
else if (stdout.includes('Already up to date')) hammondYouIdiot.edit('Repository is currently up to date.');
|
else if (stdout.includes('Already up to date')) hammondYouIdiot.edit('Repository is currently up to date.');
|
||||||
else hammondYouIdiot.edit('Running `yarn tsc`...').then(()=>exec('yarn tsc', {windowsHide:true}, (err:Error)=>{
|
else hammondYouIdiot.edit('Running `yarn tsc`...').then(()=>exec('yarn tsc', {windowsHide:true}, (err:Error)=>{
|
||||||
|
@ -93,10 +93,10 @@ export default class MP {
|
|||||||
if (!DSS) return console.log('Endpoint failed - status');
|
if (!DSS) return console.log('Endpoint failed - status');
|
||||||
|
|
||||||
DSS.server ? await interaction.reply({embeds: [new client.embed().setColor(client.config.embedColor).addFields(
|
DSS.server ? await interaction.reply({embeds: [new client.embed().setColor(client.config.embedColor).addFields(
|
||||||
{name: 'Name', value: `\`${DSS.server?.name.length > 0 ? DSS.server.name : 'Offline'}\``},
|
{name: 'Name', value: DSS.server?.name?.length < 1 ? '*`Offline`*' : `\`${DSS?.server?.name}\``},
|
||||||
{name: 'Players', value: `${DSS?.slots.used}/${DSS?.slots.capacity}`},
|
{name: 'Players', value: `${DSS?.slots.used}/${DSS?.slots.capacity}`},
|
||||||
{name: 'Map', value: DSS.server?.mapName.length > 0 ? DSS.server.mapName : 'No map'}
|
{name: 'Map', value: DSS?.server.mapName ?? 'Unavailable'}
|
||||||
).setFooter({text: `Version: ${DSS?.server?.version.length > 0 ? DSS?.server?.version : '0.0.0.0'} | Time: ${`${('0'+Math.floor((DSS?.server.dayTime/3600/1000))).slice(-2)}:${('0'+Math.floor((DSS?.server.dayTime/60/1000)%60)).slice(-2)}`}`})]}) : null
|
).setFooter({text: `Version: ${DSS?.server?.version} | Time: ${`${('0'+Math.floor((DSS?.server.dayTime/3600/1000))).slice(-2)}:${('0'+Math.floor((DSS?.server.dayTime/60/1000)%60)).slice(-2)}`}`})]}) : null
|
||||||
},
|
},
|
||||||
pallets: async()=>{
|
pallets: async()=>{
|
||||||
const DSS = await fetchData(client, interaction, choiceSelector) as FSData;
|
const DSS = await fetchData(client, interaction, choiceSelector) as FSData;
|
||||||
|
@ -13,7 +13,7 @@ export default ()=>{
|
|||||||
'traffic light', 'bridge',
|
'traffic light', 'bridge',
|
||||||
'fountain', 'dumpster',
|
'fountain', 'dumpster',
|
||||||
'mailbox', 'parking meter',
|
'mailbox', 'parking meter',
|
||||||
'bus', 'truck', 'glass door'
|
'bus', 'truck'
|
||||||
] as string[];
|
] as string[];
|
||||||
return ranIntoSomething[Math.floor(Math.random()*ranIntoSomething.length)];
|
return ranIntoSomething[Math.floor(Math.random()*ranIntoSomething.length)];
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,6 @@ export class MPServerSvc {
|
|||||||
}
|
}
|
||||||
async fetchPlayerData(serverName:string) {
|
async fetchPlayerData(serverName:string) {
|
||||||
const server = await this.model.findOne({where: {serverName}});
|
const server = await this.model.findOne({where: {serverName}});
|
||||||
if (!server) return [];
|
|
||||||
return server.dataValues.playerData ??= [];
|
return server.dataValues.playerData ??= [];
|
||||||
}
|
}
|
||||||
async addServer(serverName:string, ip:string, code:string) {
|
async addServer(serverName:string, ip:string, code:string) {
|
||||||
|
Loading…
Reference in New Issue
Block a user