Technical Documentation

Complete guide to LoFi Girl's architecture, commands, and integration

Quick Start

1

Add to Group

Add @LofiBNBGirl_Bot to your Telegram group with admin permissions

/start
2

Configure Settings

Send /config to the bot privately to access configuration

/config
3

Start Engaging

Begin chatting and watch LoFi respond with personality

Hi LoFi!

Ranking & Gamification

LoFi uses a composite score to rank users and power leaderboards. The score is updated continuously and designed to reward sustained, high‑quality participation while avoiding spam.

📈 Rank Score Components

Activity (30d)

Total messages over the last 30 days (normalized by group size).

Recent Activity (7d)

Weighted 7‑day activity to reflect current momentum.

Engagement (30d)

Replies, mentions, reactions given/received to encourage interaction.

Achievements

Bronze/Silver/Gold badges award points; higher tiers earn more.

Consistency Streak

Consecutive active days add a small bonus to reward reliability.

🧮 Displayed Metrics (/myrank)

Rank #

Your position and percentile in the group.

Total

All‑time messages (group scoped).

30d

Messages in last 30 days (max of daily rollup vs direct count).

7d

Recent activity percentage.

Engage

30‑day engagement score (replies/mentions/reactions).

Achievements

Count, tiers, and points contributing to rank.

Streak

Consecutive active days.

To next

How far to the next rank; Behind shows gap to leader.

🏆 Achievement System (Stricter & Less Spammy)

Previous achievement announcement is deleted before posting a new one to reduce clutter (configurable).

Bronze/Silver/Gold thresholds significantly increased across categories to make badges more meaningful.

Series are progressive and non-overlapping (e.g., Popular starts above Reaction Starter gold).

XP & Points

Each badge awards points that contribute directly to your rank score.

Anti‑Spam

Badges are awarded once per exact badge/tier per user per group. Higher thresholds prevent spam; no cooldowns or re‑announce suppression are applied.

🗂️ Commands

/leaderboard

Sorted by composite rank_score.

/myrank

Compact view of all metrics that make up your rank.

/achievements

Show earned badges and tiers. First Steps now requires 25 messages with safety gates (min membership 24h).

Mention‑All Behavior

Telegram limits notification delivery for mass mentions. LoFi implements batching and stealth mentions to maximize delivery while avoiding errors.

🔧 How It Works

Batching

Default of 5 mentions per message for higher notification reliability.

Stealth Mentions

Emoji linked to tg://user?id=... to hide usernames but still notify.

Markdown Off

Markdown parse mode disabled for batches to avoid username parsing issues.

Cross‑Group

Single long‑lived Telethon client handles participant fetches across groups.

⚙️ Admin Options

/mentionall_config

Adjust batch size, include/exclude filters, cleanup behavior.

/mentionall_stats

Success rates and recent mention history.

System Architecture

Core Components

  • AI Personality Engine: Manages character consistency and response generation
  • Message Processing Pipeline: Handles incoming messages and context analysis
  • Moderation System: Smart content filtering and user management
  • Analytics Engine: Privacy-focused tracking and insights
  • Configuration Manager: Handles group-specific settings
  • External Integrations: Crypto APIs, CAS, and third-party services

Message Flow

📨 Message Received
🔍 Context Analysis
🧠 AI Processing
💬 Response Generated

Commands Reference

🔧 Admin Commands

/config

Access configuration dashboard (DM only)

/settings

View current group settings

/ban @user

Ban a user from the group

/unban @user

Unban a previously banned user

/mute @user [duration]

Temporarily mute a user

/unmute @user

Remove mute from a user

📊 Analytics Commands

/stats

View group activity statistics

/leaderboard

Show most active users

/achievements

View available achievements

/mystats

View your personal statistics

🎮 Entertainment Commands

/8ball [question]

Ask LoFi a yes/no question

/roast @user

Get a playful roast (with consent)

/compliment @user

Give someone a sweet compliment

/quote

Get an inspirational quote

💰 Crypto Commands

/price [token]

Get current token price from DexScreener

/chart [token]

View token chart and trading info

/trending

View trending tokens

/setca [address]

Set group's contract address

Configuration Guide

🤖 Personality Settings

Response Frequency

Control how often LoFi responds to regular messages

High (60%) Medium (30%) Low (10%)

Personality Mode

Adjust LoFi's personality intensity

Full Personality Balanced Professional

🛡️ Moderation Settings

Auto-Delete Settings

  • Spam detection and removal
  • NSFW content filtering
  • Excessive emoji/caps filtering
  • Link spam protection

Warning System

Progressive punishment system with customizable thresholds

Level 1: Friendly warning
Level 2: Firm warning + message deletion
Level 3: Temporary mute (1-24 hours)
Level 4: Kick from group

🎯 Engagement Settings

Dead Chat Revival

Automatically revive inactive groups with conversation starters

Enable after 2 hours of inactivity

Welcome Messages

Customize how LoFi greets new members

Flirty Welcome Standard Welcome Custom Message

Integration APIs

🔗 External Integrations

DexScreener API

Real-time cryptocurrency data integration

GET https://api.dexscreener.com/latest/dex/tokens/{address} # Used for price lookups and chart data

Combot Anti-Spam (CAS)

Advanced spam user detection

GET https://api.cas.chat/check?user_id={user_id} # Automatic spam user detection and blocking

📡 Webhook Support

LoFi Girl supports webhook integrations for advanced users who want to extend functionality.

Custom Event Triggers

  • New user join events
  • Message deletion events
  • Achievement unlock events
  • Moderation action events

Common Issues & Solutions

🤐 Bot Not Responding

Solution:

  • Check if bot has proper admin permissions
  • Verify bot is added to the group
  • Try mentioning the bot directly: @LofiBNBGirl_Bot
  • Use /start command to reinitialize

⚠️ Moderation Not Working

Solution:

  • Ensure bot has "Delete Messages" permission
  • Check if moderation is enabled in /config
  • Verify warning thresholds are properly set
  • Admin users are exempt from moderation

💰 Crypto Commands Failing

Solution:

  • Check if the token address is valid
  • Ensure token is listed on DexScreener
  • Try using the full contract address
  • Some new tokens may not be available yet

📊 Stats Not Updating

Solution:

  • Statistics update in real-time but may have slight delays
  • Private messages aren't counted in group stats
  • Bot needs to be active for at least 24 hours for full stats
  • Try /refresh command if available

Developer Resources

📚

Bot Framework

Built with Python using python-telegram-bot library

View Source
🔧

Contribution Guide

How to contribute to LoFi Girl development

Contribute
🐛

Issue Tracking

Report bugs and request features

Report Issues

Complete Bot Documentation

LoFi Girl is a comprehensive Telegram group management solution with 48 commands across 8 categories. This documentation covers every feature in detail.

Basic Commands

/start

Get started with LoFi Girl

Example: /start

/help

Show all available commands

Example: /help

Moderation Commands

/kick

Kick a user from the group

Example: /kick

/mute

Mute a user (supports /mute5, /mute10, /mute15, /mute30, /mute60)

Example: /mute

/unmute

Unmute a user

Example: /unmute

/warn

Warn a user (3 warnings = auto kick)

Example: /warn

/clearwarns

Clear all warnings for a user

Example: /clearwarns

/unban

Unban a user from the group

Example: /unban

/pin

Pin important messages

Example: /pin

Group Management

/config

Configure bot settings for this group

Example: /config

/welcome

Set welcome message for new members

Example: /welcome

/stickers

Manage sticker settings

Example: /stickers

/mentionall

Mention all active group members

Example: /mentionall

/mentionall_config

Configure @all mention settings

Example: /mentionall_config

/mentionall_stats

View mention statistics

Example: /mentionall_stats

Content Filtering

/save

Save custom responses and filters

Example: /save

/filterai

AI-powered content filtering

Example: /filterai

/filters

List all active filters

Example: /filters

/listfilters

Alternative to /filters command

Example: /listfilters

/delfilter

Delete a custom filter

Example: /delfilter

/deletefilter

Alternative to /delfilter command

Example: /deletefilter

/blacklist

Manage blacklisted words

Example: /blacklist

/blacklist_add

Add words to blacklist

Example: /blacklist_add

/blacklist_remove

Remove words from blacklist

Example: /blacklist_remove

/blacklist_clear

Clear entire blacklist

Example: /blacklist_clear

/antispam

Anti-spam protection settings

Example: /antispam

/nsfwfilter

NSFW content filtering

Example: /nsfwfilter

/report

Report issues to administrators

Example: /report

User Analytics

/leaderboard

View top active members

Example: /leaderboard

/myrank

Check your ranking in the group

Example: /myrank

/info

Get detailed user statistics

Example: /info

/achievements

View earned achievement badges

Example: /achievements

Group competition features

Example:

Crypto Features

/settoken

Set token for crypto features

Example: /settoken

/price

Get current token price

Example: /price

/mcap

Get market capitalization data

Example: /mcap

/marketcap

Alternative to /mcap command

Example: /marketcap

/volume

Get trading volume data

Example: /volume

/links

Get project links and socials

Example: /links

/summary

Get comprehensive token summary

Example: /summary

/socials

Display social media links

Example: /socials

Advanced Moderation

/protect_member

Protect VIP members from auto-moderation

Example: /protect_member

/unprotect_member

Remove VIP protection

Example: /unprotect_member

/bulk_protect

Protect multiple members at once

Example: /bulk_protect

/inactivity_check

Check inactive members

Example: /inactivity_check

/inactivity_status

View inactivity tracking status

Example: /inactivity_status

/inactivity_analytics

Advanced inactivity analytics

Example: /inactivity_analytics

Administration

/system_health

Check bot system status

Example: /system_health

/emergency_disable

Emergency disable all bot functions

Example: /emergency_disable

/restart_scheduler

Restart background scheduler

Example: /restart_scheduler

Complete Bot Documentation

LoFi Girl is a comprehensive Telegram group management solution with 48 commands across 8 categories. This documentation covers every feature in detail.

Basic Commands

/start

Get started with LoFi Girl

Example: /start

/help

Show all available commands

Example: /help

Moderation Commands

/kick

Kick a user from the group

Example: /kick

/mute

Mute a user (supports /mute5, /mute10, /mute15, /mute30, /mute60)

Example: /mute

/unmute

Unmute a user

Example: /unmute

/warn

Warn a user (3 warnings = auto kick)

Example: /warn

/clearwarns

Clear all warnings for a user

Example: /clearwarns

/unban

Unban a user from the group

Example: /unban

/pin

Pin important messages

Example: /pin

Group Management

/config

Configure bot settings for this group

Example: /config

/welcome

Set welcome message for new members

Example: /welcome

/stickers

Manage sticker settings

Example: /stickers

/mentionall

Mention all active group members

Example: /mentionall

/mentionall_config

Configure @all mention settings

Example: /mentionall_config

/mentionall_stats

View mention statistics

Example: /mentionall_stats

Content Filtering

/save

Save custom responses and filters

Example: /save

/filterai

AI-powered content filtering

Example: /filterai

/filters

List all active filters

Example: /filters

/listfilters

Alternative to /filters command

Example: /listfilters

/delfilter

Delete a custom filter

Example: /delfilter

/deletefilter

Alternative to /delfilter command

Example: /deletefilter

/blacklist

Manage blacklisted words

Example: /blacklist

/blacklist_add

Add words to blacklist

Example: /blacklist_add

/blacklist_remove

Remove words from blacklist

Example: /blacklist_remove

/blacklist_clear

Clear entire blacklist

Example: /blacklist_clear

/antispam

Anti-spam protection settings

Example: /antispam

/nsfwfilter

NSFW content filtering

Example: /nsfwfilter

/report

Report issues to administrators

Example: /report

User Analytics

/leaderboard

View top active members

Example: /leaderboard

/myrank

Check your ranking in the group

Example: /myrank

/info

Get detailed user statistics

Example: /info

/achievements

View earned achievement badges

Example: /achievements

Group competition features

Example:

Crypto Features

/settoken

Set token for crypto features

Example: /settoken

/price

Get current token price

Example: /price

/mcap

Get market capitalization data

Example: /mcap

/marketcap

Alternative to /mcap command

Example: /marketcap

/volume

Get trading volume data

Example: /volume

/links

Get project links and socials

Example: /links

/summary

Get comprehensive token summary

Example: /summary

/socials

Display social media links

Example: /socials

Advanced Moderation

/protect_member

Protect VIP members from auto-moderation

Example: /protect_member

/unprotect_member

Remove VIP protection

Example: /unprotect_member

/bulk_protect

Protect multiple members at once

Example: /bulk_protect

/inactivity_check

Check inactive members

Example: /inactivity_check

/inactivity_status

View inactivity tracking status

Example: /inactivity_status

/inactivity_analytics

Advanced inactivity analytics

Example: /inactivity_analytics

Administration

/system_health

Check bot system status

Example: /system_health

/emergency_disable

Emergency disable all bot functions

Example: /emergency_disable

/restart_scheduler

Restart background scheduler

Example: /restart_scheduler