Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

riptl/xpbot-telegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram XP bot

Blocks pictures + videos from low XP users

Statistics

Keeps track of group statistics

Statistics

Configuration:

  • $REDIS_URL Redis host:port (optional)
  • $REDIS_PREFIX Redis ZSET key prefix (one key per group)
  • $TELEGRAM_TOKEN BotFather token
  • $MIN_XP Minimum XP before pics/vids allowed
  • $RATE_LIMIT User cooldown after earning XP (seconds)
  • $LESS_BOT_SPAM Delete /xp and /rank requests + responses after a while to reduce group chat clutter
  • $BOT_EXPIRATION Time to delete bot messages from the group (requires option above)

Commands:

  • /xp Get current XP
  • /ranks Get top XP users

Redis keys:

  • ${REDIS_PREFIX}_${GROUP_ID} Leaderboard
  • ${REDIS_PREFIX}_${GROUP_ID}_DELETED_COUNT Number of messages deleted