Skip to content

If you ever in a situation that some important messages you have to send to your closeones, but your whole system is offline and you want to schecdule message.

Notifications You must be signed in to change notification settings

ktwillcode/Telegram-Bot--Botty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Telegram Bot Project

Overview

This repository contains the code for a Telegram bot developed using the python-telegram-bot library. The bot serves messaging at scheduled times, even if you are offline.


Prerequisites

Ensure the following are installed or available before setting up the bot:

  • Python 3.8 or 10 installed
  • Telegram account
  • PythonAnywhere account

Installation

  1. Clone Repository:

    git clonehttps://github.com/ktwillcode/Telegram-Bot--Botty.git
    cd Telegram-Bot--Botty
  2. Install Dependencies:

    pip install python-telegram-bot

Setting up the Telegram Bot

  1. Create a Bot via BotFather:

    • Open Telegram and search for BotFather.
    • Follow the steps to create a new bot and obtain the API token.
  2. Configure the Bot:

    • Open the botty.py file.
    • Replace 'YOUR_API_TOKEN' with the obtained API token.

Running the Bot Locally

  1. Run the Bot:

    python your_bot_script.py
  2. Interacting with the Bot:

    • Open Telegram and search for your bot by its username.
    • Start interacting with the bot by sending messages or commands.

Deploying the Bot on PythonAnywhere

  1. Upload the Bot Script:

    • Upload the bot script (botty.py) to PythonAnywhere.
  2. Install Dependencies on PythonAnywhere:

    • Open a Bash console on PythonAnywhere.
    • Install the python-telegram-bot library:
    pip3.8 install --user python-telegram-bot
  3. Schedule the Bot:

    • Use the PythonAnywhere interface to create a scheduled task.
    • Set the task command:
    /usr/bin/python3.8 /path/to/your/bot_script.py

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

About

If you ever in a situation that some important messages you have to send to your closeones, but your whole system is offline and you want to schecdule message.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages