More precise ngift error messages.
This commit is contained in:
parent
e971f7e7c2
commit
8577f6f272
|
@ -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 })
|
||||
|
|
Loading…
Reference in New Issue