Skip to content
github-actions[bot] edited this page Sep 22, 2025 · 5 revisions

@waforix/mocha Documentation

Welcome to the comprehensive documentation for @waforix/mocha, a powerful and flexible Discord bot framework with advanced statistics tracking, autocomplete functionality, and multi-database support.

πŸ“š Documentation Index

Getting Started

Core Documentation

Advanced Topics

Reference

πŸš€ Quick Start

Installation

# Using npm
npm install @waforix/mocha

# Using yarn
yarn add @waforix/mocha

# Using bun (recommended)
bun add @waforix/mocha

Basic Setup

import { Client } from '@waforix/mocha';

const client = new Client({
  token: 'your-discord-bot-token',
  database: {
    type: 'sqlite',
    path: './data/stats.db'
  }
});

// Wait for client to be ready
client.on('ready', () => {
  console.log('Client is ready!');
});

// Start the client
await client.connect();

✨ Key Features

  • 🎯 Modern Discord Bot Framework - Built with TypeScript and modern Discord API features
  • πŸ“Š Advanced Statistics Tracking - Track messages, voice activity, reactions, and more
  • πŸ” Dynamic Autocomplete - Flexible autocomplete system for slash commands
  • πŸ—„οΈ Multi-Database Support - SQLite, PostgreSQL, and MySQL support
  • ⚑ High Performance - Optimized for production use with caching and rate limiting
  • πŸ› οΈ Developer Friendly - Comprehensive TypeScript support and intuitive API
  • πŸ“ˆ Analytics & Insights - Built-in analytics and data export capabilities
  • πŸ”§ Highly Configurable - Extensive configuration options for all use cases

πŸ—οΈ Architecture

@waforix/mocha is built with a modular architecture:

  • Client - Main client class that orchestrates all functionality
  • Command System - Slash command builders and handlers
  • Autocomplete System - Dynamic autocomplete for command options
  • Database Layer - Multi-database abstraction with migrations
  • Event System - Comprehensive Discord event tracking
  • Analytics Engine - Statistics aggregation and insights
  • Cache System - Intelligent caching for performance
  • Export System - Data export in multiple formats

πŸ“‹ Requirements

  • Node.js 18+ or Bun
  • TypeScript 5.0+
  • One of: SQLite 3.x, PostgreSQL 12+, or MySQL 8.0+

🀝 Community

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

From Waforix, thanks for using Mocha <3

Clone this wiki locally