Skip to main content

DiscordRDA Documentation

Welcome to DiscordRDA - a modern, scalable Ruby library for Discord bot development with full Slash Commands and Component V2 support.

What is DiscordRDA?​

DiscordRDA (Ruby Development API) is a high-performance Ruby library designed for building Discord bots. It provides:

  • ⚑ Async Runtime: Built on Ruby 3.0+ Fiber scheduler for true concurrency
  • 🏭 Factory Pattern: Clean entity creation with EntityFactory
  • πŸ“‘ Auto Sharding: Automatic and manual sharding with zero-downtime resharding
  • πŸ’Ύ Pluggable Cache: Memory or Redis backends with pattern-based invalidation
  • πŸ”Œ Plugin System: Extensible architecture for commands and features
  • πŸ“Š Rate Limiting: Advanced Discord API rate limit handling with queue management

Slash Commands & Interactions​

DiscordRDA provides comprehensive support for Discord's modern interaction system:

  • Full Slash Command API: Create, edit, delete global and guild commands
  • Context Menu Commands: User and Message context menu support
  • Autocomplete: Real-time autocomplete with dynamic choices
  • Modals: Custom modal forms with text inputs
  • Component V2: Latest Discord components (buttons, selects, containers)

Enterprise Features​

Built for production bots:

  • Zero-Downtime Resharding: Add shards without stopping the bot
  • Hot Reload: File system event-based code reloading
  • Session Transfer: Migrate guilds between shards seamlessly
  • REST Proxy Support: Horizontal scaling with proxy servers
  • State Preservation: Maintain sessions across reloads

Quick Example​

require 'discord_rda'

bot = DiscordRDA::Bot.new(
token: ENV['DISCORD_TOKEN'],
intents: [:guilds, :guild_messages, :message_content]
)

bot.on(:message_create) do |event|
if event.content == '!ping'
event.message.respond(content: 'Pong!')
end
end

bot.run

Documentation Structure​

This documentation is organized into sections:

Requirements​

Getting Help​


License: MIT
Author: JΓΊlia Klee