Create series command #190
3 changed files with 5 additions and 2 deletions
|
@ -10,7 +10,7 @@ export default class Series extends Command {
|
|||
super();
|
||||
|
||||
this.CommandBuilder = new SlashCommandBuilder()
|
||||
.setName("view")
|
||||
.setName("series")
|
||||
.setDescription("View details on a series")
|
||||
.addSubcommand(x =>
|
||||
x
|
||||
|
|
|
@ -3,6 +3,7 @@ import AppLogger from "../client/appLogger";
|
|||
import cloneDeep from "clone-deep";
|
||||
import { CoreClient } from "../client/client";
|
||||
import EmbedColours from "../constants/EmbedColours";
|
||||
import { CardRarityToString } from "../constants/CardRarity";
|
||||
|
||||
export default class SeriesHelper {
|
||||
public static GenerateSeriesViewPage(seriesId: number, page: number): { embed: EmbedBuilder, row: ActionRowBuilder<ButtonBuilder> } | null {
|
||||
|
@ -28,7 +29,7 @@ export default class SeriesHelper {
|
|||
const cardsOnPage = series.cards.splice(page * itemsPerPage, itemsPerPage);
|
||||
|
||||
const description = cardsOnPage
|
||||
.map(x => `[${x.id}] ${x.name}`)
|
||||
.map(x => `[${x.id}] ${x.name} ${CardRarityToString(x.type).toUpperCase()}`)
|
||||
.join("\n");
|
||||
|
||||
const embed = new EmbedBuilder()
|
||||
|
|
|
@ -20,6 +20,7 @@ import Droprarity from "./commands/stage/droprarity";
|
|||
import Claim from "./buttonEvents/Claim";
|
||||
import InventoryButtonEvent from "./buttonEvents/Inventory";
|
||||
import Reroll from "./buttonEvents/Reroll";
|
||||
import SeriesEvent from "./buttonEvents/Series";
|
||||
import TradeButtonEvent from "./buttonEvents/Trade";
|
||||
|
||||
export default class Registry {
|
||||
|
@ -48,6 +49,7 @@ export default class Registry {
|
|||
CoreClient.RegisterButtonEvent("claim", new Claim());
|
||||
CoreClient.RegisterButtonEvent("inventory", new InventoryButtonEvent());
|
||||
CoreClient.RegisterButtonEvent("reroll", new Reroll());
|
||||
CoreClient.RegisterButtonEvent("series", new SeriesEvent());
|
||||
CoreClient.RegisterButtonEvent("trade", new TradeButtonEvent());
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue