#pinging deleted role when using ${} but not when using static string

10 messages · Page 1 of 1 (latest)

civic heath
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

bronze roost
#
async function updateRoleInfo(members) {
    console.log("E")
    let channelId = "1063212303669002314"
    const channel = client.channels.cache.get(channelId)
    let ownerArrayFormatted = ``
    let ownerArray = []
    for (var i = 0; i < members.length; i++) {
        if (checkRoles(members[i], roles.owner)) ownerArray.push(members[i].id)
    }
    for (var i = 0; i < ownerArray.length; i++) {
        (ownerArrayFormatted).concat(`\n${bulletPoint} <@${ownerArray[i]}> - \`${ownerArray[i]}\``)
    }
    const owners = `
    **Owners** - <@&${variableForThatId}>

    ${labsgradient}
    ${ownerArrayFormatted}
    `
    await channel.send({ files: [staffListImage] })
    await channel.send({ files: [labsgradient1Image] })
    await channel.send(owners)
}```
#

node v16.18.0

sly epoch
#

What is that variable defined as

bronze roost
#

1066573020824617071

sly epoch
#

Show the exact declaration

bronze roost
#
const roles = {
    owner: 1066573020824617071,
}```
prime sandalBOT
#

• Discord ids follow the snowflake format: learn more
• Discord ids must be represented as strings as they are larger than Number.MAX_SAFE_INTEGER, the largest integer that can be represented in JavaScript

- client.guilds.cache.get(123456789012345678)
+ client.guilds.cache.get("123456789012345678")
bronze roost
#

lemme try