Code Monkey home page Code Monkey logo

telegram-bot--botty's Introduction

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.

telegram-bot--botty's People

Contributors

ktwillcode avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.