Skip to content
All projects

Lain Discord Bot (Rust)

A high-performance, asynchronous Discord bot written in Rust, featuring targeted message delivery and strict RBAC (Role-Based Access Control) for administrators.

Tech stack

Languages
Frameworks & libraries

Why I built it

Most Discord bots are written in Python or Node.js, making them prone to memory leaks and high latency under load. I rebuilt a conceptual bot in Rust to ensure memory safety and immediate execution via compiled binaries.

Architecture & decisions

Powered by Rust and the Discord API. The bot implements a strict permission hierarchy, granting raw command execution only to predefined user IDs. It parses chat streams in real-time, matching patterns to trigger specific, hardcoded payloads.

Key features

  1. 01Asynchronous event handling via Rust
  2. 02Hardcoded Role-Based Access Control (RBAC)
  3. 03Zero-latency message parsing and routing