Module 'discord.js' has no exported member 'Routes'.
See original GitHub issueWhich package is this bug report for?
discord.js
Issue description
Hi guys, i hope you are doing well.
I found a problem with types
Code sample
import { REST } from "@discordjs/rest";
import { Routes } from "discord.js";
const commands = [
{
name: "ping",
description: "Replies with Pong!",
},
];
const rest = new REST({ version: "10" }).setToken("token");
(async () => {
try {
console.log("Started refreshing application (/) commands.");
await rest.put(Routes.applicationGuildCommands(CLIENT_ID, GUILD_ID), {
body: commands,
});
console.log("Successfully reloaded application (/) commands.");
} catch (error) {
console.error(error);
}
})();
Package version
“discord.js”: “^13.8.0”
Node.js version
v16.15.0
Operating system
No response
Priority this issue should have
High (immediate attention needed)
Which partials do you have configured?
No Partials
Which gateway intents are you subscribing to?
No Intents
I have tested this issue on a development release
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Module '"discord.js"' has no exported member 'Intents'
js "' has no exported member 'Intents'. My code is: import dotenv from 'dotenv'; const bot = new Client ...
Read more >Module '"discord.js"' has no exported member 'ClientApplication'.
I just got the next error while initializing my discord bot: Module '"discord.js"' has no exported member 'ClientApplication'. Code or steps to ...
Read more >Module has no exported member error in TypeScript
The error "Module has no exported member" occurs when we try to import a member that doesn't exist in the specified module. To...
Read more >Command handling - discord.js Guide
Collection is used to store and efficiently retrieve commands for execution. Next, using the modules imported above, dynamically retrieve your ...
Read more >module.exports – How to Export in Node.js and JavaScript
The exports keyword is a reference to the exports object in the modules object. By doing exports.value1 = value1 , it added the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just follow the main readme.
In the main readme you are showing an example that doesn’t work, you know ?
Sorry my english and thank you very much for the help
It is: https://discord.js.org/#/docs/discord.js/13.8.0/general/welcome