Skip to content

sademban/teligram-bot-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Bot with Schedule and Spam Control

This repository contains a Python script for a Telegram bot that sends scheduled messages to users. The bot allows users to start or stop the spam messages using inline buttons.

Features

  • Start and Stop Spam: Users can control whether they want to receive spam messages using "yes" and "no" buttons.
  • Threading: The script uses threading to run the message schedule in the background without blocking the bot's other functionalities.
  • Environment Variables: The bot token is securely managed using an .env file, ensuring that sensitive information is not hardcoded in the script.

Prerequisites

  • Python 3.7 or higher
  • Telegram bot token (you can create a bot and obtain a token using BotFather)

Installation

  1. Clone the Repository:

    git clone https://github.com/sademban/teligram-bot-test.git
    cd telegram-bot-test
    

Setting Up and Running the Bot

  1. Create venv, activate venv, Install requriremnts.txt
    #after you cd to elegram-bot-test
    
    python -m venv venv
    
    source venv/bin/activate
    
    pip install -r requirements.txt
    
  2. Create .env file, set teligram token and run the bot
    touch .env
    #set your TELEGRAM_TOKEN=xxxxxxxxxxxxxxx in .env file and save it
    
    python teli.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages