How 0adiy/shellbot works
Project type and purpose
• This is a backend-only, event-driven microservice (a Discord bot) written in Go.
• Purpose: listen for commands on Discord, authenticate against a superuser list, execute them on a Linux shell, and relay results back to Discord.
File structure
• Top-level
• .github/workflows/go.yml – CI pipeline (build & test)
• taskfile.yaml – local build tasks
• go.mod / go.sum – dependency management
• app/
– config.go: reads config.yaml (token, prefix, superusers, emojis)
– discord.go: wraps Discord API client, event handlers
– main.go: orchestrates start-up, ties together config loader + Discord client
• There are no frontend or database components; instead there are two external systems: the Discord platform and the local OS shell.
README for additional insights
• Configuration drives the bot’s behavior (prefix, token, superusers).
• Build process can be invoked via Taskfile or direct go build.
• The runtime is a single long-running process on a Linux VPS.
Detailed breakdown
• Layer 1: End users & Discord Platform
• Layer 2: ShellBot binary, separated into sub-components
• Layer 3: Underlying OS shell
• Side-bar: CI/CD pipeline feeding into the ShellBot release and deployment