Add drop rarity force logic to reroll
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
20461dde6d
commit
97dc81df9a
1 changed files with 5 additions and 1 deletions
|
@ -10,7 +10,11 @@ export default class Reroll extends ButtonEvent {
|
|||
public override async execute(interaction: ButtonInteraction) {
|
||||
if (!interaction.guild || !interaction.guildId) return;
|
||||
|
||||
const randomCard = await CardDropHelper.GetRandomCard();
|
||||
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 image = readFileSync(randomCard.Path);
|
||||
|
||||
|
|
Loading…
Reference in a new issue