Skip to main content
Archived project: This bot may require updates to work with the current Discord API. Node.js 18+ and discord.js v14+ migration is recommended for production use.
This guide will help you get Yato up and running quickly. Follow these steps to go from cloning to a live bot in your server.

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

1

Clone the repository

Clone Yato to your local machine:
git clone https://github.com/qonTesq/Yato.git
cd Yato
2

Install dependencies

Install all required packages:
npm install
This will install discord.js, gcommands, mongoose, canvas, and all other dependencies listed in package.json.
3

Configure environment variables

Create a .env file in the project root with your bot credentials:
.env
TOKEN=your_discord_bot_token
CLIENT_ID=your_bot_application_client_id
MONGO_URI=your_mongo_connection_string_optional
Get your bot token from the Discord Developer Portal under your application’s Bot settings.
Never commit your .env file to version control. It contains sensitive credentials.
4

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)
Navigate to: Your Application → Bot → Privileged Gateway Intents
5

Run the bot

Start Yato with one of these commands:
npm run dev
You should see output indicating successful login:
➤ Logged in as Yato#1234 (123456789012345678)
✔ Connected to MongoDB
6

Invite the bot to your server

Generate an invite link in the Discord Developer Portal:
  1. Go to Your Application → OAuth2 → URL Generator
  2. Select scopes: bot and applications.commands
  3. Select bot permissions based on features you want to use
  4. Copy the generated URL and open it in your browser
  5. Select your server and authorize
7

Test your bot

In your Discord server, try these commands:
/help
/serverinfo
/userinfo
Or mention the bot:
@Yato help

Project structure

Here’s what you’ll find in the Yato directory:
Yato/
├── src/
│   ├── index.js              # Bot startup and initialization
│   ├── commands/             # Command categories
│   │   ├── games/           # Game commands
│   │   ├── images/          # Image generation
│   │   ├── information/     # Info commands (help, serverinfo)
│   │   ├── memes/           # Meme commands
│   │   ├── misc/            # Miscellaneous commands
│   │   ├── moderation/      # Moderation tools
│   │   ├── utilities/       # Utility commands
│   │   └── weeb/            # Anime/manga commands
│   ├── config/              # Configuration files
│   ├── models/              # Mongoose database models
│   └── structures/          # Helper classes and utilities
├── fonts/                   # Custom fonts for Canvas
├── package.json
├── .env                     # Your environment variables (create this)
└── README.md

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

  • 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
  • Verify your MONGO_URI is correct in .env
  • Check that your MongoDB instance is running and accessible
  • The bot can run without MongoDB, but persistence features won’t work
  • Ensure the canvas package installed correctly
  • On Linux, you may need additional system dependencies (libcairo, libjpeg, etc.)
  • Check that custom fonts are in the /fonts directory
  • This is expected for an archived project with outdated packages
  • Run npm audit fix at your own risk
  • Consider upgrading to discord.js v14+ for modern security patches

Build docs developers (and LLMs) love