#Attempting to fetch users custom status!
16 messages · Page 1 of 1 (latest)
- What's your exact discord.js
npm list discord.jsand nodenode -vversion? - Not a discord.js issue? Check out #1081585952654360687.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
✅Marked as resolved by OP
module.exports = {
cooldown: 4,
data: new SlashCommandBuilder()
.setName("checkstatus")
.setDescription("will see if your repping our status!"),
async execute(interaction, bot) {
const SendEmbed = new EmbedBuilder()
.setColor(ee.color)
.setTitle('Interaction successful!')
.setDescription(`your status is`)
.setAuthor({ name: 'Cosmic Bot', iconURL: ee.CosmicIMG})
.setFooter({ text: 'Cosmic Shop', iconURL: ee.CosmicIMG})
const mem = interaction.member
console.log(mem.presence.activities.type(4))
}
}
TypeError: mem.presence.activities.type is not a function
activities is an array
oh so i have to find the activity with the name "Custom Status" ??
You can use the type as you were, but for every activity, not the array of activities itself
how would i go about doing that?
tried:
console.log(mem.presence.activities.Activity.type(4))
It's an array, so you index into it, and then access type, which is a property
This is basic JavaScript
ah okay i see
i don't understand?? why is this returning a number?
console.log(mem.presence.activities.indexOf(['Activity']))
Because you're using indexOf, which returns an index?
Do you know JavaScript?