Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

371
Views
DiscordAPIError: 404: Not Found When doing reaction roles

I keep getting an error in the console that says:

/media/nathan/D/digibot/node_modules/discord.js/src/rest/RequestHandler.js:154
      throw new DiscordAPIError(request.path, data, request.method, res.status);
            ^

DiscordAPIError: 404: Not Found
    at RequestHandler.execute (/media/nathan/D/digibot/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/media/nathan/D/digibot/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
    at async ChannelManager.fetch (/media/nathan/D/digibot/node_modules/discord.js/src/managers/ChannelManager.js:91:18)
    at async module.exports (/media/nathan/D/digibot/role-claims/first-message.js:10:21) {
  method: 'get',
  path: '/channels/',
  code: 0,
  httpStatus: 404
} 

I do not know why I am getting this and there is no reference that goes to my code. Thanks for any help.

Here is my code for the reaction rolse:

const firstMessage = require('./first-message')

module.exports = client => {

const channelD = ''

const getEmoki = emojiName => client.emojis.cache.find(emoji => emoji.name === emojiName)

const digitalEmoji = '🔒'


const emojis = {
    DD_DigitalShrug : '🔒Digital\'s Daring Detective Decoder'
}

const reactionIds = []

let emojiText = '**Congrats!**\n***Add a reaction to claim a role***\n'
for (const key in emojis){

    const emoji = getEmoki(key)
    reactionIds.push(emoji)


    const role = emojis[key]
    emojiText += `${emoji} = ${role}\n`

}

firstMessage(client, channelD, emojiText, reactionIds) 

const handleReaction = (reaction, user, add) => {
    if(user.id === '939257079875657758'){
        return
    }

    const emoji = reaction._emoji.name 

    const { guild } = reaction.message
    const roleName = emojis[emoji]
    if (!roleName){
        return
    }


    const role = guild.roles.cache.find(role => role.name === roleName)
    const member = guild.members.cache.find(member => member.id === user.id)

    if (add) {
        member.roles.add(role)
    } else {
        member.roles.remove(role)
    }
}

client.on('messageReactionAdd', (reaction, user) => {
    if (reaction.message.channel.id ===  channelD) {
        handleReaction(reaction, user, true)
    }
})

client.on('messageReactionRemove', (reaction, user) => {
    if (reaction.message.channel.id ===  channelD) {
        handleReaction(reaction, user, false)
    }
})

} I read something that said it was about the new version of discord but I am not sure and cannot find any other solved questions for this.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!