!                         Yousef
! Yousef
DIAdiscord.js - Imagine an app
Created by ! Yousef on 10/11/2023 in #djs-questions
DiscordAPIError[0]: 404: Not Found
The Code
require ('dotenv').config();
const { REST, Routes } = require ('discord.js')

const commands =[
{
name: 'storm',
description: 'Send A Storm',
},
];

const rest = new REST({ version:'0.10'}).setToken(process.env.TOKEN);


(async () => {
try {
console.log(`⏹️ Registering Slash Commands.⏹️`)
await rest.put(
Routes.applicationGuildCommand(
process.env.CLIENT_ID,
process.env.GUILD_ID),
{ body: commands }
)
console.log(`✔️ Slash Commands Were Registerd ✔️`)
} catch (error) {
console.log(`💣 Error happened The Error Is ==> "${error}" 🤔 `)
}
})();
require ('dotenv').config();
const { REST, Routes } = require ('discord.js')

const commands =[
{
name: 'storm',
description: 'Send A Storm',
},
];

const rest = new REST({ version:'0.10'}).setToken(process.env.TOKEN);


(async () => {
try {
console.log(`⏹️ Registering Slash Commands.⏹️`)
await rest.put(
Routes.applicationGuildCommand(
process.env.CLIENT_ID,
process.env.GUILD_ID),
{ body: commands }
)
console.log(`✔️ Slash Commands Were Registerd ✔️`)
} catch (error) {
console.log(`💣 Error happened The Error Is ==> "${error}" 🤔 `)
}
})();
The Error : => DiscordAPIError[0]: 404: Not Found I Need Help.
13 replies