Admin Overview

As an administrator of the Somnia Validator Monitor Bot, you have access to powerful management tools and features. This guide covers everything you need to effectively manage the bot and its users.

Admin Capabilities

User Management

  • View all registered users and their subscriptions
  • Ban/unban users
  • Send direct messages to users
  • Monitor user activity

System Control

  • View system statistics and performance metrics
  • Control monitoring services
  • Broadcast messages to all users
  • Access detailed logs

Monitoring

  • Real-time bot health status
  • Database statistics
  • Performance metrics
  • Error tracking

Admin Commands

/admin

Opens the main admin panel with quick access to all administrative functions.

👨‍💼 Admin Panel

Select an action:
[📊 Statistics] [👥 Users]
[📢 Broadcast] [🔧 System]
[📝 Logs] [⚙️ Settings]

/stats

Displays comprehensive bot statistics:

  • Total users
  • Active subscriptions
  • Validators monitored
  • Messages sent
  • System uptime
  • Database size

/broadcast <message>

Send a message to all bot users. Use with caution!

/broadcast 🔧 Maintenance scheduled for tonight at 00:00 UTC

/ban <user_id>

Ban a user from using the bot.

/ban 123456789

/unban <user_id>

Remove a ban and restore user access.

/unban 123456789

Admin Panel Navigation

📊 Statistics Section

  • Overview: Key metrics at a glance
  • Users: User growth and activity
  • Validators: Most monitored validators
  • Performance: Response times and resource usage

👥 Users Section

  • User List: Browse all users
  • Search: Find users by ID or username
  • Actions: Ban, unban, or message users
  • Subscriptions: View user's monitored validators

🔧 System Section

  • Monitoring Status: Start/stop monitoring
  • Cache Management: Clear caches
  • Database: Maintenance operations
  • Logs: View recent logs

Best Practices

Regular Monitoring

  1. Check /stats daily for anomalies
  2. Monitor error logs for issues
  3. Track user growth trends
  4. Watch for performance degradation

User Management

  1. Investigate before banning users
  2. Document reasons for bans
  3. Respond to user issues promptly
  4. Use broadcast sparingly

System Maintenance

  1. Schedule maintenance during low activity
  2. Announce maintenance in advance
  3. Backup database before major changes
  4. Monitor after updates

Security Considerations

Protecting Admin Access

  • Admin IDs are configured in environment variables
  • Only trusted team members should be admins
  • Regularly review admin list
  • Use strong Telegram account security

Handling Sensitive Data

  • User data is isolated by design
  • Don't share user subscription details publicly
  • Be careful with broadcast messages
  • Respect user privacy

Emergency Procedures

Bot Unresponsive

  1. Check server/hosting status
  2. Review error logs
  3. Restart bot service
  4. Check database connectivity

Mass Errors

  1. Stop monitoring temporarily
  2. Identify error source
  3. Fix issue
  4. Resume monitoring
  5. Notify affected users

Database Issues

  1. Stop bot to prevent corruption
  2. Backup current database
  3. Run database repairs
  4. Restore from backup if needed
  5. Restart bot

Getting Help

Documentation

Support Channels

  • Development team contact
  • GitHub issues (if applicable)
  • Internal team chat

Next Steps


Remember: With great power comes great responsibility. Use admin features wisely!

Built with ❤️ by htw.tech