Skip to content

COXKPER/Diskel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Diskel

A fast, modular Discord bot built with Go and Lua plugins.

License: GPL v3 Go Version Release

Diskel is a Discord bot framework that separates its core (Go) from its command logic (Lua), enabling you to create, modify, and deploy new commands without recompiling the binary.


✨ Features

Feature Description
🔌 Dynamic Lua Plugins Write commands in Lua — no recompilation needed
💬 Reply with Quote Reply to messages while quoting the original message
😀 Message Reactions React to messages with emoji
🗑️ Delete Messages Delete command messages programmatically
👤 Sender Name Access Access sender's display name for personalized responses
🏘️ Group Detection Distinguish between server (group) and private messages
🖼️ Send Image/Sticker Upload and send images or files
📩 Private Messaging Send direct messages to users by ID
📥 Media Download Bridge Download attachments (image/video/audio/document) from messages
🔁 Quoted Media Download Download media from quoted/replied-to messages

📖 Documentation

📚 Read the full Wiki →

The Wiki contains the complete API reference, architecture guide, plugin creation tutorial with examples, configuration details, and troubleshooting FAQ.

🧠 Skills Reference →

A quick cheat-sheet of every ctx property and method with one-liner descriptions.

🚀 Quick Start

Requirements

Build from Source

git clone https://github.com/COXKPER/diskel.git
cd diskel
go build -o diskel .

Configure

Edit config.toml and set your bot token:

[bot]
token = "YOUR_BOT_TOKEN"
prefix = "."

Run

./diskel -config config.toml

Using Make

make build   # Build the binary
make run     # Build and run
make clean   # Remove binary

⚙️ Configuration

Edit config.toml to customize the bot:

[bot]
token = "YOUR_BOT_TOKEN"         # Discord bot token
prefix = "."                      # Command prefix

[plugins]
directory = "plugins"             # Lua plugins directory

🔌 Creating Plugins

Create a .lua file inside the plugins/ directory:

-- plugins/Hello.lua
export("hello", function(ctx)
    ctx:React("👋")
    ctx:ReplyQuote("Hello, " .. ctx.SenderName .. "! 🌍")
end)

That's it! The bot loads all .lua files automatically on startup.

Available Context API:

Properties Methods
ctx.Message ctx:Reply(text)
ctx.Sender ctx:ReplyQuote(text)
ctx.SenderName ctx:React(emoji)
ctx.Chat ctx:DeleteMessage()
ctx.Args ctx:ReplyImage(path, caption)
ctx.Prefix ctx:ReplySticker(path)
ctx.IsGroup ctx:SendPrivateMessage(target, text)
ctx.HasMedia ctx:DownloadMedia()
ctx.HasQuotedMedia ctx:DownloadQuotedMedia()
ctx.MediaType
ctx.QuotedMediaType

See the Wiki for the full API reference and the Skills for a quick cheat-sheet.

📁 Project Structure

diskel/
├── main.go              # Entry point
├── bot/
│   └── bot.go           # Discord client, event handling, context building
├── plugins/
│   ├── loader.go        # Lua VM, UserData metatables, command dispatch
│   └── Menu.lua         # Default commands (menu, ping, echo, greet, info)
├── config/
│   └── config.go        # TOML config parser
├── config.toml          # Bot configuration
├── WIKI.md              # Full API documentation & architecture guide
├── SKILLS.md            # Quick API cheat-sheet
├── LICENSE              # GPLv3
└── .github/
    └── workflows/
        └── release.yml  # Automated cross-platform release builds

📦 Releases

Pre-built binaries for Linux and Windows are available on the Releases page. Each tagged version automatically triggers a GitHub Actions workflow that compiles and publishes the binaries.

📄 License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages