Add dropnumber test command #69
5 changed files with 0 additions and 21 deletions
1
.dev.env
1
.dev.env
|
@ -17,7 +17,6 @@ ABOUT_FUNDING=
|
||||||
ABOUT_REPO=
|
ABOUT_REPO=
|
||||||
|
|
||||||
DROP_RARITY=-1
|
DROP_RARITY=-1
|
||||||
DROP_CARD=-1
|
|
||||||
|
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=3301
|
DB_PORT=3301
|
||||||
|
|
|
@ -17,7 +17,6 @@ ABOUT_FUNDING=
|
||||||
ABOUT_REPO=
|
ABOUT_REPO=
|
||||||
|
|
||||||
DROP_RARITY=-1
|
DROP_RARITY=-1
|
||||||
DROP_CARD=-1
|
|
||||||
|
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=3321
|
DB_PORT=3321
|
||||||
|
|
|
@ -17,7 +17,6 @@ ABOUT_FUNDING=
|
||||||
ABOUT_REPO=
|
ABOUT_REPO=
|
||||||
|
|
||||||
DROP_RARITY=-1
|
DROP_RARITY=-1
|
||||||
DROP_CARD=-1
|
|
||||||
|
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=3311
|
DB_PORT=3311
|
||||||
|
|
|
@ -15,15 +15,6 @@ export default class Reroll extends ButtonEvent {
|
||||||
|
|
||||||
if (process.env.DROP_RARITY && Number(process.env.DROP_RARITY) > 0) {
|
if (process.env.DROP_RARITY && Number(process.env.DROP_RARITY) > 0) {
|
||||||
randomCard = await CardDropHelper.GetRandomCardByRarity(Number(process.env.DROP_RARITY));
|
randomCard = await CardDropHelper.GetRandomCardByRarity(Number(process.env.DROP_RARITY));
|
||||||
} else if (process.env.DROP_CARD && process.env.DROP_CARD != '-1') {
|
|
||||||
let card = await Card.FetchOneByCardNumber(process.env.DROP_CARD, [ "Series" ]);
|
|
||||||
|
|
||||||
if (!card) {
|
|
||||||
await interaction.reply("Card not found");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
randomCard = card;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const image = readFileSync(randomCard.Path);
|
const image = readFileSync(randomCard.Path);
|
||||||
|
|
|
@ -21,15 +21,6 @@ export default class Drop extends Command {
|
||||||
|
|
||||||
if (process.env.DROP_RARITY && Number(process.env.DROP_RARITY) > 0) {
|
if (process.env.DROP_RARITY && Number(process.env.DROP_RARITY) > 0) {
|
||||||
randomCard = await CardDropHelper.GetRandomCardByRarity(Number(process.env.DROP_RARITY));
|
randomCard = await CardDropHelper.GetRandomCardByRarity(Number(process.env.DROP_RARITY));
|
||||||
} else if (process.env.DROP_CARD && process.env.DROP_CARD != '-1') {
|
|
||||||
let card = await Card.FetchOneByCardNumber(process.env.DROP_CARD, [ "Series" ]);
|
|
||||||
|
|
||||||
if (!card) {
|
|
||||||
await interaction.reply("Card not found");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
randomCard = card;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const image = readFileSync(randomCard.Path);
|
const image = readFileSync(randomCard.Path);
|
||||||
|
|
Loading…
Reference in a new issue