Skip to content

Commit

Permalink
add new info about latest shipments
Browse files Browse the repository at this point in the history
  • Loading branch information
ImUrX committed Dec 29, 2023
1 parent 96fe3eb commit 261c66b
Showing 1 changed file with 36 additions and 12 deletions.
48 changes: 36 additions & 12 deletions bingus-bot/src/commands/shipping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,7 @@ You can check on ${SHIP_WHEN_CHANNEL} on the progress of orders.`,
}`,
);

let shipment = SHIPMENTS.findIndex((x) => x[orderInfo.set] >= order);

if (
shipment === -1 &&
orderInfo.date.getUTCFullYear() === 2022 &&
orderInfo.date.getUTCMonth() <= 5
) {
shipment = 3;
}
const shipment = SHIPMENTS.findIndex((x) => x[orderInfo.set] >= order);

if (shipment === -1) {
if (orderInfo.date.getUTCFullYear() === 2022) {
Expand Down Expand Up @@ -144,6 +136,19 @@ You can check on ${
return;
}

if (JANUARY_SHIPMENT.has(shipment)) {
await interaction.reply({
content: `Your order is about to get shipped to Crowdsupply in January 3st, it's shipment ${
shipment + 2
}!
You can check on ${
SHIPMENT_MESSAGE[shipment]
} on the progress of the shipment.`,
ephemeral: true,
});
return;
}

if (MANUFACUTRED_SHIPMENTS.has(shipment)) {
await interaction.reply({
content: `Your order is being made currently, it's shipment ${
Expand All @@ -169,15 +174,17 @@ You can check on ${SHIP_WHEN_CHANNEL} to see when it's going to get shipped.`,

const MANUFACUTRED_SHIPMENTS = new Set([0, 1, 2, 3]);

const JANUARY_SHIPMENT = new Set([1, 2, 3]);

// Index of shipped shipment
const SHIPPED_SHIPMENTS = new Set([0]);

// Link to shipment message
const SHIPMENT_MESSAGE = [
"https://discord.com/channels/817184208525983775/1129107343058153623/1129110457953812651",
"https://discord.com/channels/817184208525983775/818062236492759050/1188242154498310144",
"https://discord.com/channels/817184208525983775/818062236492759050/1188242154498310144",
"https://discord.com/channels/817184208525983775/818062236492759050/1188242154498310144",
"https://discord.com/channels/817184208525983775/1129107343058153623/1129117575721267290",
"https://discord.com/channels/817184208525983775/1129107343058153623/1130164280537391154",
"https://discord.com/channels/817184208525983775/1129107343058153623/1183816649950888066",
];

// Shipments being prepared or shipped
Expand Down Expand Up @@ -233,4 +240,21 @@ const SHIPMENTS = [
[SlimeSet.DELUXE_TRACKER_BLACK]: 143353,
[SlimeSet.DELUXE_TRACKER_WHITE]: 150693,
},
{
[SlimeSet.LOWER_BODY_PURPLE]: 145034,
[SlimeSet.LOWER_BODY_BLACK]: 146417,
[SlimeSet.LOWER_BODY_WHITE]: 143933,
[SlimeSet.CORE_PURPLE]: 148676,
[SlimeSet.CORE_BLACK]: 143948,
[SlimeSet.CORE_WHITE]: 147485,
[SlimeSet.ENHANCED_CORE_PURPLE]: 135028,
[SlimeSet.ENHANCED_CORE_BLACK]: 142973,
[SlimeSet.ENHANCED_CORE_WHITE]: 132923,
[SlimeSet.FULLBODY_PURPLE]: 156056,
[SlimeSet.FULLBODY_BLACK]: 148429,
[SlimeSet.FULLBODY_WHITE]: 152199,
[SlimeSet.DELUXE_TRACKER_PURPLE]: 145844,
[SlimeSet.DELUXE_TRACKER_BLACK]: 143353,
[SlimeSet.DELUXE_TRACKER_WHITE]: 150693,
},
];

0 comments on commit 261c66b

Please sign in to comment.