From 8577f6f272ac50d09b58b644b0e9fce28fa789f4 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Tue, 15 Mar 2022 11:43:23 -0400 Subject: [PATCH] More precise ngift error messages. --- src/games/hvacoins/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/games/hvacoins/index.js b/src/games/hvacoins/index.js index dac678c..d725433 100644 --- a/src/games/hvacoins/index.js +++ b/src/games/hvacoins/index.js @@ -729,9 +729,12 @@ command( if (!targetId) { return say(`Please specify a valid @ target!`) } - const nft = nfts.find(nft => nft.name === words[2] && nft.owner === event.user) + const nft = nfts.find(nft => nft.name === words[2]) if (!nft) { - return say(`You don't own an nft with that name!`) + return say(`There is not NFT named "${words[2]}"!`) + } + if (nft.owner !== event.user) { + return say(`You do not own "${nft.name}"!`) } nft.owner = targetId }, { hidden: true })