#Need help with some code support.

3 messages · Page 1 of 1 (latest)

tranquil ferry
#

error:-

    at Object.execute (/home/runner/shinchanfiles/commands/economy/profile.js:11:27) Promise {
  <rejected> TypeError: Assignment to constant variable.
      at Object.execute (/home/runner/shinchanfiles/commands/economy/profile.js:11:27)```
code-
```const discord= require('discord.js')
const db=require('quick.db')
const client= require('../../index.js')

module.exports={
name:"profile",
aliases:['profiles','pro'],
async execute(message, args){
    let user  = message.mentions.users.first() || message.author

const happya= await db.fetch(`happy_${user.id}`)
  if (happya===null)happya='0';
  
const coinss= await db.fetch(`coins_${user.id}`)
  if (coinss===null)coinss='0';
  
const slapp= await db.fetch(`slap_${user.id}`)
  if (slapp===null)slapp='0';

  
  const embed= new discord.MessageEmbed()
  embed.setTimestamp()
  embed.setThumbnail(message.author.displayAvatarURL({format:'png'}))
embed.setAuthor('Profile:-')
embed.addField(`You have ${coins} coins in your pocket.`)
  message.channel.send(embed)
}
}```
short wren
#

You’re trying to redeclare a constant variable

#

Also your code seems to be v12?