Change sacrifice command embed colours to go green when successful from red #237
1 changed files with 10 additions and 0 deletions
|
@ -24,6 +24,11 @@ export default class Sacrifice extends ButtonEvent {
|
|||
const userId = interaction.customId.split(" ")[2];
|
||||
const cardNumber = interaction.customId.split(" ")[3];
|
||||
|
||||
if (userId != interaction.user.id) {
|
||||
await interaction.reply("Only the user who created this sacrifice can confirm it.");
|
||||
return;
|
||||
}
|
||||
|
||||
const cardInInventory = await Inventory.FetchOneByCardNumberAndUserId(userId, cardNumber);
|
||||
|
||||
if (!cardInInventory) {
|
||||
|
@ -94,6 +99,11 @@ export default class Sacrifice extends ButtonEvent {
|
|||
const userId = interaction.customId.split(" ")[2];
|
||||
const cardNumber = interaction.customId.split(" ")[3];
|
||||
|
||||
if (userId != interaction.user.id) {
|
||||
await interaction.reply("Only the user who created this sacrifice can cancel it.");
|
||||
return;
|
||||
}
|
||||
|
||||
const cardInInventory = await Inventory.FetchOneByCardNumberAndUserId(userId, cardNumber);
|
||||
|
||||
if (!cardInInventory) {
|
||||
|
|
Loading…
Reference in a new issue