Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env-sample
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ COMMUNITY_CURRENCIES=20
# Max number of payment methods that can be configured in a community for wizzard selection
MAX_COMMUNITY_PAYMENT_METHODS=10

# Set to 'true' to enable the /community command (community creation wizard).
# Default is 'false' — bot operators opt in to expose community creation.
COMMUNITY_CREATION_ENABLED=false

# List of relays to connect to
RELAYS='ws://localhost:7000,ws://localhost:8000,ws://localhost:9000'

Expand Down
11 changes: 6 additions & 5 deletions bot/modules/community/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ import * as Scenes from './scenes';
export const configure = (bot: Telegraf<CommunityContext>) => {
bot.command('mycomm', userMiddleware, commands.communityAdmin);
bot.command('mycomms', userMiddleware, commands.myComms);
// TODO: Uncomment when the community wizard is ready
// bot.command('community', userMiddleware, async ctx => {
// const { user } = ctx;
// await ctx.scene.enter('COMMUNITY_WIZARD_SCENE_ID', { bot, user });
// });
if (process.env.COMMUNITY_CREATION_ENABLED === 'true') {
bot.command('community', userMiddleware, async ctx => {
const { user } = ctx;
await ctx.scene.enter('COMMUNITY_WIZARD_SCENE_ID', { bot, user });
});
}
bot.command('setcomm', userMiddleware, commands.setComm);

bot.action(
Expand Down