#pinging deleted role when using ${} but not when using static string
10 messages · Page 1 of 1 (latest)
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
What is that variable defined as
1066573020824617071
Show the exact declaration
const roles = {
owner: 1066573020824617071,
}```
• 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")
lemme try