Start Bot
Start your first bot
1. Import startBot
startBot
First, make sure to import the startBot
function from the mvk-project
package:
2. Create a Bot Client
Next, create a client instance by calling the startBot
function with your configuration. Begin by providing your bot's token:
3. Add Intents
Specify the intents that your bot needs. Intents are necessary to receive certain types of events from the Discord API. You can add more intents if needed:
4. Set a Command Prefix
Set a prefix for your bot's commands. This prefix will be used to identify commands sent to your bot:
5. (Optional) Add a Startup Message
Optionally, you can add a log message to be displayed in the console when your bot starts:
Final Code
Here is the complete setup code:
If everything is set up correctly, you should see a startup message in your console like:
Last updated