This commit is contained in:
parent
7106b16aec
commit
f086ca4bda
1 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ export default class Sacrifice extends ButtonEvent {
|
||||||
private async confirm(interaction: ButtonInteraction) {
|
private async confirm(interaction: ButtonInteraction) {
|
||||||
const userId = interaction.customId.split(" ")[2];
|
const userId = interaction.customId.split(" ")[2];
|
||||||
const cardNumber = interaction.customId.split(" ")[3];
|
const cardNumber = interaction.customId.split(" ")[3];
|
||||||
const quantity = Number(interaction.customId.split(" ")[4]);
|
const quantity = Number(interaction.customId.split(" ")[4]) ?? 1;
|
||||||
|
|
||||||
if (userId != interaction.user.id) {
|
if (userId != interaction.user.id) {
|
||||||
await interaction.reply("Only the user who created this sacrifice can confirm it.");
|
await interaction.reply("Only the user who created this sacrifice can confirm it.");
|
||||||
|
@ -105,7 +105,7 @@ export default class Sacrifice extends ButtonEvent {
|
||||||
private async cancel(interaction: ButtonInteraction) {
|
private async cancel(interaction: ButtonInteraction) {
|
||||||
const userId = interaction.customId.split(" ")[2];
|
const userId = interaction.customId.split(" ")[2];
|
||||||
const cardNumber = interaction.customId.split(" ")[3];
|
const cardNumber = interaction.customId.split(" ")[3];
|
||||||
const quantity = Number(interaction.customId.split(" ")[4]);
|
const quantity = Number(interaction.customId.split(" ")[4]) ?? 1;
|
||||||
|
|
||||||
if (userId != interaction.user.id) {
|
if (userId != interaction.user.id) {
|
||||||
await interaction.reply("Only the user who created this sacrifice can cancel it.");
|
await interaction.reply("Only the user who created this sacrifice can cancel it.");
|
||||||
|
|
Loading…
Reference in a new issue