hurryhx / welcomebot

Telegram Python Bot. Welcomes everyone that enters a group chat that it's part of.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome Bot

A Python Telegram Bot that greets everyone who joins a group chat

It uses the python-telegram-bot library and pickledb for basic persistence.

Please also check out my other bots, TexBot and GitBot.

The file is prepared to be run by anyone by filling out the blanks in the configuration. The bot currently runs on @jh0ker_welcomebot

Required

  • Python 3.4 (may work with earlier versions, untested)
  • python-telegram-bot module (tested with version 3.1.0)

How to use

  • Clone the repo
  • Edit BOTNAME and TOKEN in bot.py
  • If you want to use webhooks, fill out BASE_URL, HOST and PORT as well
    • If you also want to handle SSL with python-telegram-bot, fill out the CERT and CERT_KEY fields and check the section about SSL.
  • Follow Bot instructions

SSL

You can start the server without an SSL context, if this is handled by another programm, like Apache or haproxy. You can leave out the SSL Information in the header and select the appropriate start line in main.

Please note that you need a valid ssl certificate or a self-signed one. Use openssl req -new -x509 -nodes -newkey rsa:1024 -keyout server.key -out server.crt -days 3650 to generate your own key and certificate.

About

Telegram Python Bot. Welcomes everyone that enters a group chat that it's part of.

License:GNU General Public License v2.0


Languages

Language:Python 100.0%