This commit is contained in:
parent
1e7b221276
commit
0d520066cf
3 changed files with 148 additions and 20 deletions
|
@ -3,6 +3,7 @@ import { Command } from "../type/command";
|
|||
import { CoreClient } from "../client/client";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import SeriesHelper from "../helpers/SeriesHelper";
|
||||
|
||||
export default class Series extends Command {
|
||||
constructor() {
|
||||
|
@ -58,30 +59,14 @@ export default class Series extends Command {
|
|||
return;
|
||||
}
|
||||
|
||||
const description = series.cards
|
||||
.map(x => { return `[${x.id}] ${x.name}` })
|
||||
.join("\n");
|
||||
const embed = SeriesHelper.GenerateSeriesViewPage(series.id, 0);
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setTitle(series.name)
|
||||
.setColor(EmbedColours.Ok)
|
||||
.setDescription(description)
|
||||
.setFooter({ text: `${series.id} · ${series.cards.length} cards` });
|
||||
|
||||
await interaction.reply({ embeds: [ embed ]});
|
||||
await interaction.reply({ embeds: [ embed!.embed ], components: [ embed!.row ]});
|
||||
}
|
||||
|
||||
private async ListSeries(interaction: CommandInteraction) {
|
||||
const description = CoreClient.Cards
|
||||
.map(x => { return `[${x.id}] ${x.name}` })
|
||||
.join("\n");
|
||||
const embed = SeriesHelper.GenerateSeriesListPage(0);
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
.setTitle("Series")
|
||||
.setColor(EmbedColours.Ok)
|
||||
.setDescription(description)
|
||||
.setFooter({ text: `${CoreClient.Cards.length} series` });
|
||||
|
||||
await interaction.reply({ embeds: [ embed ]});
|
||||
await interaction.reply({ embeds: [ embed!.embed ], components: [ embed!.row ]});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue