i can't find the problem why the error appears. I checked both ID (GUILD, BOT) but I can't see why he will not accept this.
Do I have to map it to a file?
const { REST, Routes, SlashCommandBuilder } = require('discord.js');
const commands = [
{
name: 'bier',
description: 'Antwortet mit Krug oder Fass?',
},
];
const rest = new REST ({ version: '10' }).setToken(process.env.TOKEN);
(async () => {
try {
console.log('Nehme Bestellung auf!');
await rest.put(
Routes.applicationGuildCommands(process.env.GUILD_ID, process.env.BOT_ID),
{ body: commands }
)
console.log('Bestellung wurde aufgenommen!')
} catch (error) {
console.log(`Bier ist aus! ${error}`);
}
})();
===========================================
ERROR: > node commands/bier.js
Nehme Bestellung auf!
Bier ist aus! DiscordAPIError[10002]: Unknown Application
Just restarted the Bot in the Discord Dev Portal, and deleted the 'v' before the 10. Now it works!