Fix dropnumber command #109
1 changed files with 6 additions and 8 deletions
|
@ -31,20 +31,18 @@ export default class Dropnumber extends Command {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const series = CoreClient.Cards.find(x => x.cards.find(y => y.id == cardNumber.toString()));
|
const card = CoreClient.Cards
|
||||||
|
.flatMap(x => x.cards)
|
||||||
if (!series) {
|
.find(x => x.id == cardNumber.value);
|
||||||
await interaction.reply('Card not found');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const card = series.cards.find(x => x.id == cardNumber.toString());
|
|
||||||
|
|
||||||
if (!card) {
|
if (!card) {
|
||||||
await interaction.reply('Card not found');
|
await interaction.reply('Card not found');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const series = CoreClient.Cards
|
||||||
|
.find(x => x.cards.includes(card))!;
|
||||||
|
|
||||||
let image: Buffer;
|
let image: Buffer;
|
||||||
const imageFileName = card.path.split("/").pop()!;
|
const imageFileName = card.path.split("/").pop()!;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue