mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 16:30:58 -05:00
Add BIGBAGPALLETS
to the search filter in pallets command
This commit is contained in:
parent
9aa486a28c
commit
740e145d8a
@ -101,7 +101,7 @@ export default class MP {
|
||||
pallets: async()=>{
|
||||
const DSS = await fetchData(client, interaction, choiceSelector) as FSData;
|
||||
if (!DSS) return console.log('Endpoint failed - pallets');
|
||||
const filter = DSS?.vehicles.filter(x=>x.category === 'PALLETS');
|
||||
const filter = DSS?.vehicles.filter(x=>['PALLETS', 'BIGBAGPALLETS'].includes(x.category));
|
||||
const rules = {
|
||||
one: 'single pallet',
|
||||
two: 'pallets',
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {FSData} from 'src/interfaces';
|
||||
|
||||
export default function(data:FSData) {
|
||||
const pallets = data.vehicles.filter(x=>x.category === 'PALLETS');
|
||||
const pallets = data.vehicles.filter(x=>['PALLETS', 'BIGBAGPALLETS'].includes(x.category));
|
||||
const counts = pallets.reduce((acc, name)=>{
|
||||
acc[name.name] = (acc[name.name] ?? 0) + 1;
|
||||
return acc;
|
||||
|
Loading…
Reference in New Issue
Block a user