Add ability to sacrifice multiple cards at once #354
No reviewers
Labels
No labels
blocked
duplicate
needs criteria
needs estimate
needs testing
question
requires documentation
type
admin
type
alert
type
bug
type
change
type
defect
type
dependencies
type
epic
type
spike
type
story
type
subtask
won't fix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: External/card-drop#354
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/337-sacrifice-multiple"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
/sacrifice
command now accepts an optional parameter to be able to specify the quantitySacrifice
button event now accepts a parameter to specify the quantity, this one is required but the command will default it to 1 if not supplied#337
@ -23,6 +23,7 @@ export default class Sacrifice extends ButtonEvent {
private async confirm(interaction: ButtonInteraction) {
const userId = interaction.customId.split(" ")[2];
const cardNumber = interaction.customId.split(" ")[3];
const quantity = Number(interaction.customId.split(" ")[4]) ?? 1;
I don't actually think this works, try using
||
instead of??
@ -98,6 +105,7 @@ export default class Sacrifice extends ButtonEvent {
private async cancel(interaction: ButtonInteraction) {
const userId = interaction.customId.split(" ")[2];
const cardNumber = interaction.customId.split(" ")[3];
const quantity = Number(interaction.customId.split(" ")[4]) ?? 1;
Same here
@ -21,3 +25,4 @@
public override async execute(interaction: CommandInteraction<CacheType>): Promise<void> {
const cardnumber = interaction.options.get("cardnumber", true);
const quantity = interaction.options.get("quantity")?.value as number ?? 1;
Same here
98bfd79a00
to4359cbba1e