#Attempting to fetch users custom status!

16 messages · Page 1 of 1 (latest)

craggy heart
#

i have some code how ever it errors out!

hollow flareBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • 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
craggy heart
#
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
craggy heart
#

oh so i have to find the activity with the name "Custom Status" ??

grand jetty
#

You can use the type as you were, but for every activity, not the array of activities itself

craggy heart
#

how would i go about doing that?

#

tried:

console.log(mem.presence.activities.Activity.type(4))
grand jetty
#

It's an array, so you index into it, and then access type, which is a property

#

This is basic JavaScript

craggy heart
#

ah okay i see

craggy heart
#
console.log(mem.presence.activities.indexOf(['Activity']))
grand jetty
#

Do you know JavaScript?