/telegram-hsbot

🤖 A simple Python Telegram bot for groups

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

telegram-hsbot

A silly Telegram bot for groups written in Python. This is an early WIP with only the most basic functions published.

Requirements

  • Python 3.6

Dependencies

Usage

  • Install required modules: sudo pip3 install -r requirements.txt
  • Install ImageMagick: sudo apt install imagemagick
  • Add your bot token to config.yml
  • Adjust the config to your needs
  • Add content to the /data/ folder
  • Make sure the current user has write access to the tmp_path locations with chown and/or chmod
  • Start the bot: python3 hsbot.py

Features:

  • count: parse all messages and listen for certain keywords, message on "milestones"
  • /describe: Use Microsoft's CaptionBot AI to describe images
  • dynamic_reply: Reply to certain keywords with randomly picked audio, video and images
  • rand_image: Reply with random images, using different subdirectories corresponding to the context
  • /rate: Get a random rating
  • /scale: Liquid-rescale image, optional strength parameter of 0 to 100
  • /say: Use Google TTS to read out replies or context
  • voice_reply: Listen for certain keywords and reply with a voice message

Todo:

  • scale - Context aware scaling of images - WIP, doesn't work with stickers yet
  • glitch - Glich jpg and png images
  • count - Listen for & count specific keywords, print out messages on certain milestones (currently using repdigits as milestones)