02 / Case Study

Aesthetic King

A public Discord bot with slash commands for aesthetic themes, profiles, color utilities, and image-based interactions, hosted continuously on a Raspberry Pi.

TECHNOLOGIES
Node.jsJavaScriptDiscord APIPM2LinuxRaspberry PiCloudflare

Discord interaction and bot execution

Aesthetic King Runtime Flow

DOCUMENTED SYSTEM
01Discord UserSlash command interaction
02Discord APICommand delivery
03Aesthetic KingBot application
04Raspberry PiAlways-on application host
05PM2Process supervision
06Cloudflare AssetsHosted bot assets

03 / Screenshots

Theme Command
Aesthetic King Discord bot responding to the theme slash command inside Discord.
Aesthetic King's /theme command running inside Discord, demonstrating the bot's slash-command interaction and user-facing response.

Overview

Aesthetic King is a public Discord bot built around slash commands for aesthetic themes, profile generation, color utilities, and image-based interactions.

The bot runs continuously on a Raspberry Pi and is supervised with PM2 so it can restart automatically after failures or reboots.

The project combines Discord application development with Linux hosting, process management, external asset delivery, and command-based user interaction.

Objective

The goal of Aesthetic King was to build a useful public Discord bot that could provide aesthetic and customization-focused commands without requiring users to leave Discord.

The bot needed to:

  • Support modern Discord slash commands
  • Respond quickly to user interactions
  • Run continuously on self-hosted hardware
  • Remain manageable through Linux tooling
  • Support image and asset delivery
  • Provide a structure that could grow as more commands were added
  • Avoid storing unnecessary persistent user data

The project also provided a practical environment for learning how a continuously running application behaves outside of local development.

Requirements

The initial requirements included:

  • Public Discord bot deployment
  • Slash-command support
  • Multiple independent commands
  • Always-on hosting
  • Automatic process recovery
  • Lightweight resource usage
  • External asset hosting
  • Simple deployment and update workflow
  • No unnecessary database
  • No persistent storage of user data unless a future feature requires it

The project was intentionally kept relatively lightweight so it could coexist with other services running on the Raspberry Pi.

Architecture

Aesthetic King runs as a Node.js application on a Raspberry Pi.

Users interact with the bot through Discord slash commands.

Discord delivers those interactions to the bot application through the Discord API.

The bot processes the command, generates or selects the appropriate response, and sends the result back through Discord.

Some assets used by the bot are stored outside the application and delivered through Cloudflare-hosted storage.

PM2 supervises the bot process on the Raspberry Pi.

This keeps the application running independently of an interactive terminal session and allows the process to restart automatically when necessary.

Implementation

Discord Slash Commands

The bot uses Discord slash commands rather than relying on legacy text-prefix commands.

This gives users a discoverable interface directly inside Discord and allows commands to define structured options and parameters.

The bot currently includes multiple commands covering areas such as:

  • Themes
  • Profile-related output
  • Color utilities
  • Aesthetic content
  • Image-based interactions

The exact command set continues to evolve as older commands are revised and new functionality is added.

Command Structure

Commands are separated into individual pieces of functionality rather than placing all bot logic into a single file.

This makes it easier to:

  • Maintain individual commands
  • Add new commands
  • Troubleshoot failures
  • Update one feature without rewriting unrelated functionality

The command structure also makes the bot easier to expand over time.

Raspberry Pi Hosting

The bot runs continuously on a Raspberry Pi.

Using self-hosted hardware provides direct control over:

  • Runtime configuration
  • Deployment
  • Logging
  • Process management
  • Application updates

The Raspberry Pi also hosts other Etter Digital services, so Aesthetic King needs to remain reasonably lightweight.

PM2 Process Management

PM2 is used to supervise the running bot process.

PM2 provides:

  • Process status visibility
  • Automatic restart
  • Application logs
  • Startup integration
  • Easier process management from the command line

This allows the bot to continue running without requiring a terminal session to remain open.

Asset Hosting

Some bot assets are stored outside the application using Cloudflare-hosted storage.

This avoids packaging every asset directly into the bot application and provides a consistent external location for resources the bot needs to send or reference.

Asset URLs are currently managed by the application.

This approach works for the current scale of the project, although asset configuration could be improved as the bot grows.

Data Handling

Aesthetic King does not currently maintain persistent user profiles or other long-term user data.

Most commands process an interaction and return a result without storing information about the user afterward.

Avoiding unnecessary persistent data reduces the amount of state the application needs to manage and limits the amount of user information associated with the project.

If future features require persistent storage, that requirement can be evaluated separately rather than adding a database preemptively.

Challenges

Always-On Hosting

Running a Discord bot locally during development is straightforward, but keeping it available continuously requires additional infrastructure.

The application needed to remain running after terminal sessions ended and recover after system restarts or process failures.

Raspberry Pi Resource Sharing

Aesthetic King runs on hardware that also supports other Etter Digital services.

That means the bot cannot assume exclusive access to CPU or memory.

The application therefore needs to remain lightweight and avoid unnecessary background workloads.

Managing a Growing Command Set

As the number of slash commands increased, keeping command behavior organized became increasingly important.

A single large command handler would make the project more difficult to maintain and troubleshoot.

External Assets

Commands that depend on images or other assets require those resources to remain available independently of the local development environment.

Hardcoding or locally storing every resource can become difficult to manage as the asset collection grows.

Solutions

PM2 Supervision

PM2 was introduced to supervise the bot process.

This removed the need to manually keep a Node.js process running in an open terminal and provided a clearer way to inspect application status and logs.

Modular Commands

Command functionality is kept separate so individual features can be changed without affecting the entire bot.

This also makes future command development more manageable.

Lightweight Hosting Model

The bot avoids unnecessary infrastructure such as a database because its current functionality does not require persistent application data.

This reduces resource usage on the Raspberry Pi and keeps deployment simpler.

External Asset Storage

Assets used by the bot can be served from Cloudflare-hosted storage rather than relying entirely on files bundled with the running application.

This provides a more practical location for resources that may need to be reused across commands.

Security Considerations

The Discord bot token and other credentials must not be committed to the repository.

Secrets are kept outside source control and supplied to the running application through the deployment environment.

The bot also avoids storing unnecessary user data.

Because the application is public and receives interactions from Discord users, command input should be treated as untrusted.

Features that accept user-provided values need to validate those values before using them in image generation, external requests, or other application logic.

Administrative functionality should remain restricted rather than being exposed through general public commands.

Current Limitations

Aesthetic King is still actively maintained.

Current limitations include:

  • Some command groups are still being redesigned
  • Asset management relies on application-defined URLs
  • There is no persistent user configuration system
  • Monitoring is focused primarily on process availability
  • Administrative tooling can still be expanded
  • Documentation for the full command set is still being improved

These limitations are acceptable for the current stage of the project and provide clear areas for future work.

Results

Aesthetic King currently operates as a public Discord bot with a growing collection of slash commands.

The bot runs continuously on self-hosted Raspberry Pi infrastructure and is managed with PM2.

The project demonstrates a complete application lifecycle beyond local development:

  • Command development
  • Discord API integration
  • Deployment
  • Linux hosting
  • Process management
  • External asset delivery
  • Maintenance and updates

It also provides a software-focused project within the Etter Digital portfolio that complements the infrastructure-heavy Central Hub and Status Monitor projects.

Lessons Learned

Aesthetic King provided practical experience with the operational side of running a public application.

Important areas included:

  • Discord API integration
  • Slash-command design
  • Node.js application structure
  • Linux hosting
  • PM2
  • Process logging
  • Application restarts
  • External asset management
  • Secret handling
  • Maintaining a growing command set

One of the main lessons from the project was that application development does not end when a feature works locally.

A public bot also needs to remain available, recover from failures, protect credentials, and remain maintainable as the number of features increases.

Future Improvements

Planned improvements include:

  • Revising older color-related commands
  • Improving command consistency
  • Expanding command documentation
  • Improving asset management
  • Adding stronger operational monitoring
  • Refining administrative tooling
  • Reviewing command organization as the project grows
  • Continuing to improve deployment and maintenance procedures

Additional features will be documented as they are implemented rather than being represented as existing functionality.