Closed
Description
Which package is this bug report for?
create-discord-bot
Issue description
Steps
- Do
yarn create discord-bot
. - In options use typescript.
- In src/util/deploy.ts, error occurs.
Argument of type 'import("(location of bot code)/node_modules/@discordjs/rest/dist/index").REST' is not assignable to parameter of type 'import("(location of bot code)/node_modules/@discordjs/rest/dist/index", { assert: { "resolution-mode": "import" } }).REST'.
Property '#private' in type 'REST' refers to a different member that cannot be accessed from within type 'REST'.ts(2345)
Code sample
import process from 'node:process';
import { URL } from 'node:url';
import { API } from '@discordjs/core/http-only';
import { REST } from 'discord.js';
import { loadCommands } from './loaders.ts';
const commands = await loadCommands(new URL('../commands/', import.meta.url));
const commandData = [...commands.values()].map((command) => command.data);
const rest = new REST({ version: '10' }).setToken(process.env.DISCORD_TOKEN!);
const api = new API(rest);
const result = await api.applicationCommands.bulkOverwriteGlobalCommands(process.env.APPLICATION_ID!, commandData);
console.log(`Successfully registered ${result.length} commands.`);
Versions
- [email protected]
- [email protected]
- node v20.8.0
Issue priority
Low (no impact on functionality)
Which partials do you have configured?
Not applicable
Which gateway intents are you subscribing to?
Not applicable
I have tested this issue on a development release
No response