Hey everyone, I'm the developer of Jet Brawley & few other Discord Bots. Today, I'd like to share with everyone about my personal experience as a bot developer, as well as things that you need to know before or during the process of developing your Discord Bot.
As a disclaimer, this is not a tutorial on creating a Discord Bot. I wrote this post to help those who are serious about creating a unique and useful Discord Bot.
The level of your coding skills & how experienced you are with programming isn't the top priority of creating an awesome Discord Bot but don't get me wrong, you do need to have a fairly decent grasp of a programming language in order to get started.
Those who had never create a Discord Bot before, you should start playing around with the Discord API libraries of the programming language that you're going to use.
So, you are trying to create a unique & useful bot, here's a few ideas that you should forget about.
Features that an existing bot offers (or similar features) unless you're able to improve it on your own way that can attract new users that are looking for a bot that offers that specific feature)
Things that don't make sense. You should be clear of what bots on Discord can and can't do.
You've had lots of ideas in mind, now just list them out like a todo list.
Here's an example:
- [news] command - Make a request to example.com and fetch the latest news - In embed form - Include links to the post - [getnews] command - Make a request to example.com/getnews and fetch the specific news article - an option to choose category and search parameter option that is required
First, you'll have to find out privileges that your bot needs. For instance, the message content privilege is required in order to read messages. (Tip: the use of message content privilege should be avoided for command purpose)
Finally, learn how to use the library and creating an application on Discord (this process should be easy). It shouldn't be too complex if you're familiar with the programming language.
In order to simplify the process, you should probably develop a bot with the programming language that you are most familiar with. (To give yourself a challenge, you can try developing your Discord bot with a programming language that you're not familiar with, that's a way of improving your skills)
I'd always encourage programmers to write down another todo list, make a planning for the development process of your bot. Don't worry as I will walk you through the process.
- Libraries that you need for your project (bot). Try to list down every library that you'll be using for your project. Try to include what you're going to use them for. Example:
- discord.js // interact with Discord API - axios // Make http request to example.com, fetch the API - mongoose // Store user data
- Explaining what you are trying to do. You've listed out the commands that you're going to work on, now make it clearer, almost like documenting what you're trying to do with your own way. For Example:
- When a user runs /news 1. Reply with the thinking message 2. Fetch example.com/news 3. Create an embed - Title: Example news - Description: Today's news - Fields: an array of objects (name: the article name, value: the article brief) 4. Edit the message - When a user runs /help 1. Create an embed 2. A guide on how to use the bot 3. reply interaction
Yes, I know, this sounds like an extra work, but this really comes in handy if you're working on a complex and challenging project. But it is definitely a good practice.
- Use code formatting tools. This makes your code more user readable.
- Explain your code. Adding a comment to explain or describe about your code does allow you to debug your project with less hesitation.
- Keep it clean & organized. Your code/files should be organized in a way that makes it easy for you to find a piece of code. Here's an example:
- Remove unused code. Some code editors tell if a function or variable is not in used, you should probably get rid of them.
- Keep your bot up to date. Update your libraries, keep improving your bot
- User feedback. Take note on every feedbacks from users, try to improve them
- Remove unused registered slash commands
- Test your bot before deploying as a production
- Adding features. Adding features to your bot will attract more users
- Get your bot verified.
This is my very first post, hope everyone had learned something new.
Feel free to leave a comment down below !
Check out Jet Brawley