Prerequisites
Before you begin, ensure you have:- Node.js v14–16 (v18+ recommended for modern use)
- npm or yarn package manager
- A Discord Application with a bot token (Create one here)
- (Optional) MongoDB instance for persistence features
Quick setup
Install dependencies
Install all required packages:This will install discord.js, gcommands, mongoose, canvas, and all other dependencies listed in
package.json.Configure environment variables
Create a
.env file in the project root with your bot credentials:.env
Enable Discord intents
In the Discord Developer Portal, enable the required Gateway Intents:
- Server Members Intent (for member tracking)
- Message Content Intent (if using message-based commands)
- Presence Intent (if needed for status features)
Run the bot
Start Yato with one of these commands:You should see output indicating successful login:
Invite the bot to your server
Generate an invite link in the Discord Developer Portal:
- Go to Your Application → OAuth2 → URL Generator
- Select scopes:
botandapplications.commands - Select bot permissions based on features you want to use
- Copy the generated URL and open it in your browser
- Select your server and authorize
Project structure
Here’s what you’ll find in the Yato directory:Next steps
Detailed installation
Learn about system requirements and advanced setup options
Configuration
Customize bot behavior and configure optional features
Commands
Explore all available commands and their usage
Development
Learn how to add custom commands and extend functionality
Troubleshooting
Bot doesn't respond to commands
Bot doesn't respond to commands
- Verify the bot is online in your server member list
- Check that you’ve enabled the required Gateway Intents
- Ensure the bot has permission to read messages and send messages
- Wait a few minutes for slash commands to register globally
MongoDB connection failed
MongoDB connection failed
- Verify your
MONGO_URIis correct in.env - Check that your MongoDB instance is running and accessible
- The bot can run without MongoDB, but persistence features won’t work
Canvas/image commands not working
Canvas/image commands not working
- Ensure the
canvaspackage installed correctly - On Linux, you may need additional system dependencies (libcairo, libjpeg, etc.)
- Check that custom fonts are in the
/fontsdirectory
Dependencies have vulnerabilities
Dependencies have vulnerabilities
- This is expected for an archived project with outdated packages
- Run
npm audit fixat your own risk - Consider upgrading to discord.js v14+ for modern security patches