Skip to content
Open
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
3 changes: 3 additions & 0 deletions .env-sample
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ COMMUNITY_TTL=31
# nostr bot private key
NOSTR_SK=''

# Enable community creation via the /community command (default: false, opt-in per instance)
COMMUNITY_CREATION_ENABLED=false

# Number of currencies allowed in a community
COMMUNITY_CURRENCIES=20

Expand Down
13 changes: 8 additions & 5 deletions bot/modules/community/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ 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 => {
await ctx.scene.enter('COMMUNITY_WIZARD_SCENE_ID', {
bot,
user: ctx.user,
});
});
}
bot.command('setcomm', userMiddleware, commands.setComm);

bot.action(
Expand Down
Loading