More precise ngift error messages.
This commit is contained in:
parent
e971f7e7c2
commit
8577f6f272
|
@ -729,9 +729,12 @@ command(
|
||||||
if (!targetId) {
|
if (!targetId) {
|
||||||
return say(`Please specify a valid @ target!`)
|
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) {
|
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
|
nft.owner = targetId
|
||||||
}, { hidden: true })
|
}, { hidden: true })
|
||||||
|
|
Loading…
Reference in New Issue