mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 20:30:58 -05:00
Compare commits
3 Commits
29bf036c91
...
f7f3db7c90
Author | SHA1 | Date | |
---|---|---|---|
|
f7f3db7c90 | ||
|
6eb0298238 | ||
|
7e105f8a1e |
@ -81,7 +81,7 @@ export default class Developer {
|
||||
if (interaction.replied) interaction.followUp(update_success);
|
||||
else interaction.reply(update_success);
|
||||
};
|
||||
exec('git pull --rebase', {windowsHide:true}, (err:Error, stdout)=>{
|
||||
exec('git pull', {windowsHide:true}, (err:Error, stdout)=>{
|
||||
if (err) hammondYouIdiot.edit(`\`\`\`${UsernameHelper(err.message)}\`\`\``);
|
||||
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)=>{
|
||||
|
@ -93,10 +93,10 @@ export default class MP {
|
||||
if (!DSS) return console.log('Endpoint failed - status');
|
||||
|
||||
DSS.server ? await interaction.reply({embeds: [new client.embed().setColor(client.config.embedColor).addFields(
|
||||
{name: 'Name', value: DSS.server?.name?.length < 1 ? '*`Offline`*' : `\`${DSS?.server?.name}\``},
|
||||
{name: 'Name', value: `\`${DSS.server?.name.length > 0 ? DSS.server.name : 'Offline'}\``},
|
||||
{name: 'Players', value: `${DSS?.slots.used}/${DSS?.slots.capacity}`},
|
||||
{name: 'Map', value: DSS?.server.mapName ?? 'Unavailable'}
|
||||
).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
|
||||
{name: 'Map', value: DSS.server?.mapName.length > 0 ? DSS.server.mapName : 'No map'}
|
||||
).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
|
||||
},
|
||||
pallets: async()=>{
|
||||
const DSS = await fetchData(client, interaction, choiceSelector) as FSData;
|
||||
|
@ -13,7 +13,7 @@ export default ()=>{
|
||||
'traffic light', 'bridge',
|
||||
'fountain', 'dumpster',
|
||||
'mailbox', 'parking meter',
|
||||
'bus', 'truck'
|
||||
'bus', 'truck', 'glass door'
|
||||
] as string[];
|
||||
return ranIntoSomething[Math.floor(Math.random()*ranIntoSomething.length)];
|
||||
}
|
||||
|
@ -57,6 +57,7 @@ export class MPServerSvc {
|
||||
}
|
||||
async fetchPlayerData(serverName:string) {
|
||||
const server = await this.model.findOne({where: {serverName}});
|
||||
if (!server) return [];
|
||||
return server.dataValues.playerData ??= [];
|
||||
}
|
||||
async addServer(serverName:string, ip:string, code:string) {
|
||||
|
Loading…
Reference in New Issue
Block a user