Compare commits
4 commits
0d520066cf
...
9e2e2abce3
Author | SHA1 | Date | |
---|---|---|---|
9e2e2abce3 | |||
4d42d559ce | |||
94f285541b | |||
48f4bf095b |
4 changed files with 15 additions and 11 deletions
19
package-lock.json
generated
19
package-lock.json
generated
|
@ -1900,9 +1900,9 @@
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "20.11.28",
|
"version": "20.11.30",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.28.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz",
|
||||||
"integrity": "sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==",
|
"integrity": "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~5.26.4"
|
"undici-types": "~5.26.4"
|
||||||
}
|
}
|
||||||
|
@ -3766,8 +3766,9 @@
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/cookie": {
|
"node_modules/cookie": {
|
||||||
"version": "0.5.0",
|
"version": "0.6.0",
|
||||||
"license": "MIT",
|
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz",
|
||||||
|
"integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
|
@ -4744,16 +4745,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/express": {
|
"node_modules/express": {
|
||||||
"version": "4.18.3",
|
"version": "4.19.1",
|
||||||
"resolved": "https://registry.npmjs.org/express/-/express-4.18.3.tgz",
|
"resolved": "https://registry.npmjs.org/express/-/express-4.19.1.tgz",
|
||||||
"integrity": "sha512-6VyCijWQ+9O7WuVMTRBTl+cjNNIzD5cY5mQ1WM8r/LEkI2u8EYpOotESNwzNlyCn3g+dmjKYI6BmNneSr/FSRw==",
|
"integrity": "sha512-K4w1/Bp7y8iSiVObmCrtq8Cs79XjJc/RU2YYkZQ7wpUu5ZyZ7MtPHkqoMz4pf+mgXfNvo2qft8D9OnrH2ABk9w==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"accepts": "~1.3.8",
|
"accepts": "~1.3.8",
|
||||||
"array-flatten": "1.1.1",
|
"array-flatten": "1.1.1",
|
||||||
"body-parser": "1.20.2",
|
"body-parser": "1.20.2",
|
||||||
"content-disposition": "0.5.4",
|
"content-disposition": "0.5.4",
|
||||||
"content-type": "~1.0.4",
|
"content-type": "~1.0.4",
|
||||||
"cookie": "0.5.0",
|
"cookie": "0.6.0",
|
||||||
"cookie-signature": "1.0.6",
|
"cookie-signature": "1.0.6",
|
||||||
"debug": "2.6.9",
|
"debug": "2.6.9",
|
||||||
"depd": "2.0.0",
|
"depd": "2.0.0",
|
||||||
|
|
|
@ -10,7 +10,7 @@ export default class Series extends Command {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.CommandBuilder = new SlashCommandBuilder()
|
this.CommandBuilder = new SlashCommandBuilder()
|
||||||
.setName("view")
|
.setName("series")
|
||||||
.setDescription("View details on a series")
|
.setDescription("View details on a series")
|
||||||
.addSubcommand(x =>
|
.addSubcommand(x =>
|
||||||
x
|
x
|
||||||
|
|
|
@ -3,6 +3,7 @@ import AppLogger from "../client/appLogger";
|
||||||
import cloneDeep from "clone-deep";
|
import cloneDeep from "clone-deep";
|
||||||
import { CoreClient } from "../client/client";
|
import { CoreClient } from "../client/client";
|
||||||
import EmbedColours from "../constants/EmbedColours";
|
import EmbedColours from "../constants/EmbedColours";
|
||||||
|
import { CardRarityToString } from "../constants/CardRarity";
|
||||||
|
|
||||||
export default class SeriesHelper {
|
export default class SeriesHelper {
|
||||||
public static GenerateSeriesViewPage(seriesId: number, page: number): { embed: EmbedBuilder, row: ActionRowBuilder<ButtonBuilder> } | null {
|
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 cardsOnPage = series.cards.splice(page * itemsPerPage, itemsPerPage);
|
||||||
|
|
||||||
const description = cardsOnPage
|
const description = cardsOnPage
|
||||||
.map(x => `[${x.id}] ${x.name}`)
|
.map(x => `[${x.id}] ${x.name} ${CardRarityToString(x.type).toUpperCase()}`)
|
||||||
.join("\n");
|
.join("\n");
|
||||||
|
|
||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
|
|
|
@ -20,6 +20,7 @@ import Droprarity from "./commands/stage/droprarity";
|
||||||
import Claim from "./buttonEvents/Claim";
|
import Claim from "./buttonEvents/Claim";
|
||||||
import InventoryButtonEvent from "./buttonEvents/Inventory";
|
import InventoryButtonEvent from "./buttonEvents/Inventory";
|
||||||
import Reroll from "./buttonEvents/Reroll";
|
import Reroll from "./buttonEvents/Reroll";
|
||||||
|
import SeriesEvent from "./buttonEvents/Series";
|
||||||
import TradeButtonEvent from "./buttonEvents/Trade";
|
import TradeButtonEvent from "./buttonEvents/Trade";
|
||||||
|
|
||||||
export default class Registry {
|
export default class Registry {
|
||||||
|
@ -48,6 +49,7 @@ export default class Registry {
|
||||||
CoreClient.RegisterButtonEvent("claim", new Claim());
|
CoreClient.RegisterButtonEvent("claim", new Claim());
|
||||||
CoreClient.RegisterButtonEvent("inventory", new InventoryButtonEvent());
|
CoreClient.RegisterButtonEvent("inventory", new InventoryButtonEvent());
|
||||||
CoreClient.RegisterButtonEvent("reroll", new Reroll());
|
CoreClient.RegisterButtonEvent("reroll", new Reroll());
|
||||||
|
CoreClient.RegisterButtonEvent("series", new SeriesEvent());
|
||||||
CoreClient.RegisterButtonEvent("trade", new TradeButtonEvent());
|
CoreClient.RegisterButtonEvent("trade", new TradeButtonEvent());
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue