Any tips for optimizing work on converting all bot commands to slash commmands.
I know it's going to take a lot of manual labor but since my bot has around 130 commands I'm just looking for absolutely any tips on how to go about doing this properly. Cheers!
9 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out Creating Your Bot: Command handling
Unless your bot project is a small one, it's not a very good idea to have a single file with a giant if/else if chain for commands. If you want to implement features into your bot and make your development process a lot less painful, you'll want to implement a command handler. Let's get started...
read moreMy bot already has a command handler (of course) and I'm aware of this guide. Just looking for any additional tips users might have from their own personal experience
Sorry but what does that even mean? The bot is a game bot that brings an RPG into discord. That's the reason it has so many commands so I really don't get the point of your comment
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
That's a good suggestion and I appreciate the example actually
you can also go through the list and see if there are commands that aren't being used much or don't have much reason to be there. you can also check if some commands can be merged for example /tempban and /permban would be merged into a /ban with duration options)
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
True true. Guess there's no more efficient way of doing this
In my experience it was more of building a structure that you can take the bulk of your existing code.
Most of the changes for me were changing from MessageCreate Event to the interaction event.
Also I built a general response function that takes in the interaction event to respond to the user or log an activity.
Interesting