Skip to content

feat: add centralized configuration for server owners - #11

Open
Lacikika wants to merge 4 commits into
mainfrom
centralized-config-sellable-5063591214965960950
Open

feat: add centralized configuration for server owners#11
Lacikika wants to merge 4 commits into
mainfrom
centralized-config-sellable-5063591214965960950

Conversation

@Lacikika

Copy link
Copy Markdown
Owner

This PR introduces a centralized configuration system (config.json) tailored for server owners to easily customize the bot's visual identity and functionality before deployment.

Key changes include:

  • A new config.json file in the root directory for defining embed colors, footer text/icons, and toggling specific command categories (e.g., moderation, utility, entertainment).
  • Updates to src/config.js to securely load the JSON file and merge it with sensible default values, ensuring the bot remains functional even if the configuration is missing or incomplete.
  • Modifications to the command loader in src/index.js and the command registry in scripts/register-commands.js to honor the category toggles, allowing server owners to disable unwanted features globally.
  • Comprehensive updates across all 18 command files in src/commands/ to replace hardcoded colors and footers with the dynamic botConfig.customization settings, including necessary fallback logic for the iconURL to prevent Discord API errors on empty strings.

PR created automatically by Jules for task 5063591214965960950 started by @Lacikika

- Added `config.json` with embed colors, footer details, and command category toggles
- Updated `src/config.js` to parse `config.json` and merge with default fallbacks
- Updated `src/index.js` and `scripts/register-commands.js` to dynamically load and register command categories based on the config
- Modified all command files in `src/commands/` to use the dynamic embed colors and footer settings from the config, including a fallback for `iconURL`
- Reverted unintentional modifications to test files and `package.json`
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Lacikika added 3 commits June 16, 2026 20:34
…mmands.js

- Read `botToken` and `clientId` with fallback to `config.js` to ensure the script does not crash in CI where environment variables might not be directly set if they can be sourced via `dotenv` from `config.js`.
- Exit the command registration process gracefully if the dummy CI `clientId` is detected so the pipeline does not fail with a 401 Unauthorized error from the Discord API.
- The workflow will no longer fail if the `DISCORD_WEBHOOK_URL` secret is missing or empty by skipping the cURL step, preventing `Malformed input to a URL function` errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant