Change sacrifice command embed colours to go green when successful from red #237

Merged
Vylpes merged 4 commits from feature/230-sacrifice-changes into develop 2024-05-24 17:45:58 +01:00
Showing only changes of commit 791bd6d2a6 - Show all commits

View file

@ -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) {