Skip to content

feat: re-enable community creation via COMMUNITY_CREATION_ENABLED env…#811

Open
Matobi98 wants to merge 1 commit into
lnp2pBot:mainfrom
Matobi98:feature/community-creation-env-var
Open

feat: re-enable community creation via COMMUNITY_CREATION_ENABLED env…#811
Matobi98 wants to merge 1 commit into
lnp2pBot:mainfrom
Matobi98:feature/community-creation-env-var

Conversation

@Matobi98
Copy link
Copy Markdown
Contributor

@Matobi98 Matobi98 commented May 21, 2026

Summary

  • Introduces a COMMUNITY_CREATION_ENABLED environment variable (default: false) that controls whether the
    /community command is registered at bot startup
  • Replaces the commented-out /community command block in bot/modules/community/index.ts with a conditional
    registration guarded by the env var
  • Adds COMMUNITY_CREATION_ENABLED=false to .env-sample with an explanatory comment

Behavior

  • COMMUNITY_CREATION_ENABLED=false (default) — /community is not registered; community creation is disabled
  • COMMUNITY_CREATION_ENABLED=true/community is registered and users can create communities through the existing
    wizard flow

The wizard scene itself (COMMUNITY_WIZARD_SCENE_ID) is unchanged — it was already fully implemented.

Test plan

  • With COMMUNITY_CREATION_ENABLED unset or false, confirm /community returns no response / unknown command
  • With COMMUNITY_CREATION_ENABLED=true, confirm /community enters the community creation wizard correctly
    EOF

Summary by CodeRabbit

  • Chores
    • Community creation is now opt-in and can be enabled per instance through environment configuration.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

Walkthrough

This PR adds an opt-in feature flag for community creation. A new COMMUNITY_CREATION_ENABLED environment variable is declared in .env-sample (defaulting to false), and the community module now conditionally registers a /community bot command only when this flag is explicitly enabled, entering the community wizard scene with the current user context.

Changes

Community Creation Feature Flag

Layer / File(s) Summary
Community creation environment configuration
.env-sample
New COMMUNITY_CREATION_ENABLED environment variable added with default value false and documentation indicating the feature is opt-in per instance.
Conditional community command registration
bot/modules/community/index.ts
Community module now registers /community command only when COMMUNITY_CREATION_ENABLED is 'true', replacing prior commented-out code; command enters wizard scene with bot and user context.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

  • Community creation via environment variable #808: This PR directly implements the same feature-flag gating for community creation that was previously tracked — adding COMMUNITY_CREATION_ENABLED configuration and conditionally registering the /community command.

Poem

🐰 A flag springs to life, modest and bright,
Communities now gated, opt-in by right,
The wizard awaits where the toggle glows true,
One small, steady change—a choice made anew! 🌱

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: introducing an environment variable to control community creation functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Collaborator

@Luquitasjeffrey Luquitasjeffrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

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.

2 participants