The Fog from Human Resources
Explore posts from serversDIAdiscord.js - Imagine an app
•Created by The Fog from Human Resources on 11/13/2024 in #djs-questions
npx create-discord-bot generates broken code
I'm picking up Discord.JS in order to expand my choices for clients, so I figured I should take a look at Discord.JS, however when i run
npx create-discord-bot
and say yes to Typescript, it will create a project with broken code
in src/util/deploy.ts
it says Argument of type 'RESTPostAPIApplicationCommandsJSONBody[]' is not assignable to parameter of type 'RESTPutAPIApplicationCommandsJSONBody
on const result = await api.applicationCommands.bulkOverwriteGlobalCommands(process.env.APPLICATION_ID!, commandData);
, its the commandData
part that is showing the issue, I have no clue how or why this happens, for context I originally come from Discord.NET which pretty much hides away the entire command registering behind its RegisterCommandsGloballyAsync
function10 replies