Skip to content
Edit this page View source of this page

Home

rustycord Logo

Crates.io Documentation dependency status MIT License GitHub Stars GitHub Issues GitHub Pull Requests Rust Discord API Downloads

A fast, lightweight, and feature-rich Discord bot library written in Rust.

Development Notice

RustyCord is currently in heavy development and is NOT ready for production use.

  • APIs may change without notice
  • Features are incomplete and experimental
  • Breaking changes occur frequently
  • Documentation may be outdated
  • Use at your own risk for development/testing only

Do not use this library for production bots yet. Wait for the stable 1.0 release.

Current Status

  • ✅ Basic bot functionality working
  • ✅ Message edit, deletion, replies, files, embeds, and reactions
  • ✅ Prefix and slash command systems functional
  • ✅ HTTP rate limiting and gateway resume support
  • ⚠️ Advanced features under development
  • ❌ Voice support not available
  • ❌ Comprehensive production testing needed

Overview

rustycord is a modern Discord bot library that provides a clean, type-safe API for building Discord bots. Built with performance and reliability in mind, it offers comprehensive logging, flexible message handling, and an intuitive event system.

Key Features

  • 🚀 Async/Await Support: Built on Tokio for high-performance async operations
  • 📝 Comprehensive Logging: 5-level logging system with console and file output
  • 🔧 Flexible Message Handlers: Trait-based message handling system
  • 🎯 Type Safety: Leverages Rust's type system for compile-time safety
  • 📡 WebSocket Gateway: Discord Gateway v10 support with heartbeat, resume, and reconnect backoff
  • 🌐 HTTP Client: Discord REST API client with per-resource rate limiting
  • 🎨 Rich Embeds: Built-in embed builder with sized media and repeated fields
  • 📎 File Attachments: Multipart file uploads with attachment metadata
  • ⚡ Event System: Message, reaction, and application-command event handling
  • 🛠️ Guild Management: Channel, role, kick, ban, timeout, and member-role wrappers

Quick Start

use rustycord::{bot::Bot, gateway::intents};

#[tokio::main]
async fn main() {
    // Create the bot
    let intent = intents::ALL_INTENTS;
    let mut bot = Bot::builder(Some(intent)).await;
    let token = std::env::var("DISCORD_TOKEN")?;
    // Start the bot
    bot.run(token, Some("info".to_string())).await;
}

Installation

Add this to your Cargo.toml:

[dependencies]
rustycord = "0.2.0"
tokio = { version = "1.0", features = ["full"] }

Getting Started

Ready to build your first Discord bot? Check out our Getting Started Guide to learn how to set up your development environment and create your first bot.

Examples

Documentation

Community

License

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