added cookie collect button
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
const {
|
||||||
|
collectCookies
|
||||||
|
} = require(
|
||||||
|
"../../commands/applications/cookies"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name:
|
||||||
|
"crumbSaucerCollect",
|
||||||
|
|
||||||
|
|
||||||
|
async execute(
|
||||||
|
interaction
|
||||||
|
) {
|
||||||
|
return collectCookies(
|
||||||
|
interaction
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -197,7 +197,7 @@ async function collect(interaction) {
|
|||||||
let amount =
|
let amount =
|
||||||
randomInteger(
|
randomInteger(
|
||||||
1,
|
1,
|
||||||
200
|
1000
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+16
-11
@@ -48,7 +48,8 @@ const HEIST_METHODS = {
|
|||||||
maxStealAmount: 1500,
|
maxStealAmount: 1500,
|
||||||
|
|
||||||
minPenaltyPercent: 0.01,
|
minPenaltyPercent: 0.01,
|
||||||
maxPenaltyPercent: 0.04
|
maxPenaltyPercent: 0.04,
|
||||||
|
maxPenaltyAmount: 750
|
||||||
},
|
},
|
||||||
|
|
||||||
Hack: {
|
Hack: {
|
||||||
@@ -59,7 +60,8 @@ const HEIST_METHODS = {
|
|||||||
maxStealAmount: 3500,
|
maxStealAmount: 3500,
|
||||||
|
|
||||||
minPenaltyPercent: 0.03,
|
minPenaltyPercent: 0.03,
|
||||||
maxPenaltyPercent: 0.07
|
maxPenaltyPercent: 0.07,
|
||||||
|
maxPenaltyAmount: 2000
|
||||||
},
|
},
|
||||||
|
|
||||||
Smash: {
|
Smash: {
|
||||||
@@ -70,7 +72,8 @@ const HEIST_METHODS = {
|
|||||||
maxStealAmount: 7500,
|
maxStealAmount: 7500,
|
||||||
|
|
||||||
minPenaltyPercent: 0.06,
|
minPenaltyPercent: 0.06,
|
||||||
maxPenaltyPercent: 0.12
|
maxPenaltyPercent: 0.12,
|
||||||
|
maxPenaltyAmount: 5000
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -111,10 +114,10 @@ async function resolveCookieHeist(
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
type !==
|
type !==
|
||||||
"cookieHeist"
|
"cookieHeist"
|
||||||
||
|
||
|
||||||
ownerId !==
|
ownerId !==
|
||||||
interaction.user.id
|
interaction.user.id
|
||||||
) {
|
) {
|
||||||
return temporaryEphemeralReply(
|
return temporaryEphemeralReply(
|
||||||
interaction,
|
interaction,
|
||||||
@@ -132,7 +135,7 @@ async function resolveCookieHeist(
|
|||||||
|
|
||||||
const method =
|
const method =
|
||||||
HEIST_METHODS[
|
HEIST_METHODS[
|
||||||
methodName
|
methodName
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@@ -231,10 +234,10 @@ async function resolveCookieHeist(
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
playerCookies <
|
playerCookies <
|
||||||
1
|
1
|
||||||
||
|
||
|
||||||
vaultCookies <
|
vaultCookies <
|
||||||
1
|
1
|
||||||
) {
|
) {
|
||||||
return interaction.editReply({
|
return interaction.editReply({
|
||||||
embeds: [
|
embeds: [
|
||||||
@@ -571,6 +574,8 @@ async function resolveCookieHeist(
|
|||||||
penaltyPercent
|
penaltyPercent
|
||||||
),
|
),
|
||||||
|
|
||||||
|
method.maxPenaltyAmount,
|
||||||
|
|
||||||
playerCookies
|
playerCookies
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -858,7 +863,7 @@ function getHeistProgressText(
|
|||||||
methodName
|
methodName
|
||||||
) {
|
) {
|
||||||
switch (
|
switch (
|
||||||
methodName
|
methodName
|
||||||
) {
|
) {
|
||||||
case "Sneak":
|
case "Sneak":
|
||||||
return [
|
return [
|
||||||
@@ -906,7 +911,7 @@ function getSuccessText(
|
|||||||
|
|
||||||
|
|
||||||
switch (
|
switch (
|
||||||
methodName
|
methodName
|
||||||
) {
|
) {
|
||||||
case "Sneak":
|
case "Sneak":
|
||||||
return (
|
return (
|
||||||
@@ -950,7 +955,7 @@ function getFailureText(
|
|||||||
|
|
||||||
|
|
||||||
switch (
|
switch (
|
||||||
methodName
|
methodName
|
||||||
) {
|
) {
|
||||||
case "Sneak":
|
case "Sneak":
|
||||||
return [
|
return [
|
||||||
|
|||||||
@@ -102,7 +102,13 @@ function buildMainMenuButtons() {
|
|||||||
.setCustomId("abort")
|
.setCustomId("abort")
|
||||||
.setLabel("Close")
|
.setLabel("Close")
|
||||||
.setEmoji("✖️")
|
.setEmoji("✖️")
|
||||||
.setStyle(ButtonStyle.Secondary)
|
.setStyle(ButtonStyle.Secondary),
|
||||||
|
|
||||||
|
new ButtonBuilder()
|
||||||
|
.setCustomId("crumbSaucerCollect")
|
||||||
|
.setLabel("Collect")
|
||||||
|
.setEmoji("🍪")
|
||||||
|
.setStyle(ButtonStyle.Success)
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user