Add Drop Rarity test command #73

Merged
Vylpes merged 2 commits from feature/16-drop-rarity into develop 2023-11-10 18:27:03 +00:00
4 changed files with 1 additions and 11 deletions
Showing only changes of commit 0bf9096fe8 - Show all commits

View file

@ -16,8 +16,6 @@ BOT_ENV=4
ABOUT_FUNDING=
ABOUT_REPO=
DROP_RARITY=-1
DB_HOST=127.0.0.1
DB_PORT=3301
DB_NAME=carddrop

View file

@ -16,8 +16,6 @@ BOT_ENV=1
ABOUT_FUNDING=
ABOUT_REPO=
DROP_RARITY=-1
DB_HOST=127.0.0.1
DB_PORT=3321
DB_NAME=carddrop

View file

@ -16,8 +16,6 @@ BOT_ENV=2
ABOUT_FUNDING=
ABOUT_REPO=
DROP_RARITY=-1
DB_HOST=127.0.0.1
DB_PORT=3311
DB_NAME=carddrop

View file

@ -17,11 +17,7 @@ export default class Drop extends Command {
}
public override async execute(interaction: CommandInteraction) {
let randomCard = await CardDropHelper.GetRandomCard();
if (process.env.DROP_RARITY && Number(process.env.DROP_RARITY) > 0) {
randomCard = await CardDropHelper.GetRandomCardByRarity(Number(process.env.DROP_RARITY));
}
const randomCard = await CardDropHelper.GetRandomCard();
const image = readFileSync(randomCard.Path);