0fficerSally
DIAdiscord.js - Imagine an app
•Created by 0fficerSally on 10/12/2024 in #djs-questions
Command Handling With TypeScript
Hello, I'm having trouble setting up command handling with TypeScript. I'm trying to follow the official guide that is directed towards JavaScript.
What I Have So Far
/src/index.ts
/src/commands/utility/ping.ts
Where I Am Stuck
We recommend attaching a .commands
property to your client instance so that you can access your commands in other files. The rest of the examples in this guide will follow this convention. For TypeScript users, we recommend extending the base Client class to add this property, casting, or augmenting the module type.
I'd like to ask if what I currently have is good so far, and where I go from here. I already tried a couple of different things over the last few days, but I'm starting over and immediately asking here to be sure I understand what I'm doing.9 replies