Like the title says, I want to get every element of an array as its own string in order to check if a certain other array includes any of the strings from array 1.
I feel like I've been trying at this forever and I'm not sure if it's even possible but I could just be stupid. Any help would be greatly appreciated!
const v = items.map((value) => {
if(value.tags.includes('weapon')) return value.id
})
const results = v.filter(e => {
return e !== undefined
})
const c = Object.keys((challengerItems)).map((key) => {return key})
const o = Object.keys((opposerItems)).map((key) => {return key})
const va = results.filter(element => {
return element
});
if(challengerItems === undefined) return message.reply(`\`❓\` <@${message.author.id}> does not have any weapons! Duel canceled!`)
if(opposerItems === undefined) return message.reply(`\`❓\` <@${opposer.id}> does not have any weapons! Duel canceled!`)
if(!c.includes(CHECK IF USER HAS ANY WEAPONS)) return message.reply(`\`❓\` <@${message.author.id}> does not have any weapons! Duel canceled!`)
if(!o.includes(CHECK IF OTHER USER HAS ANY WEAPONS)) return message.reply(`\`❓\` <@${opposer.id}> does not have any weapons! Duel canceled!`)