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. "29bf036c918cab334b907bc158c99230f3983e24" and "9aa486a28c482d0cdcf8d915e2e0609722735858" have entirely different histories.
29bf036c91
...
9aa486a28c
@ -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 --rebase', {windowsHide:true}, (err:Error, stdout)=>{
|
exec('git pull', {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)=>{
|
||||||
|
@ -101,7 +101,7 @@ export default class MP {
|
|||||||
pallets: async()=>{
|
pallets: async()=>{
|
||||||
const DSS = await fetchData(client, interaction, choiceSelector) as FSData;
|
const DSS = await fetchData(client, interaction, choiceSelector) as FSData;
|
||||||
if (!DSS) return console.log('Endpoint failed - pallets');
|
if (!DSS) return console.log('Endpoint failed - pallets');
|
||||||
const filter = DSS?.vehicles.filter(x=>['PALLETS', 'BIGBAGPALLETS'].includes(x.category));
|
const filter = DSS?.vehicles.filter(x=>x.category === 'PALLETS');
|
||||||
const rules = {
|
const rules = {
|
||||||
one: 'single pallet',
|
one: 'single pallet',
|
||||||
two: 'pallets',
|
two: 'pallets',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {FSData} from 'src/interfaces';
|
import {FSData} from 'src/interfaces';
|
||||||
|
|
||||||
export default function(data:FSData) {
|
export default function(data:FSData) {
|
||||||
const pallets = data.vehicles.filter(x=>['PALLETS', 'BIGBAGPALLETS'].includes(x.category));
|
const pallets = data.vehicles.filter(x=>x.category === 'PALLETS');
|
||||||
const counts = pallets.reduce((acc, name)=>{
|
const counts = pallets.reduce((acc, name)=>{
|
||||||
acc[name.name] = (acc[name.name] ?? 0) + 1;
|
acc[name.name] = (acc[name.name] ?? 0) + 1;
|
||||||
return acc;
|
return acc;
|
||||||
|
Loading…
Reference in New Issue
Block a user