Prerequisites

Code Framework Database PyhtonAnywhere Chatbot

Very Initial Steps

  1. Install Telegram :)
  2. Create a telegram bot by talking to Bot Father
  3. Create ChatGPT API Token in Open AI
  4. Install python in your computer, if you are on windows follow this
  5. Install git, follow this
  6. Install editor of your choice, I preffer VSCode

Step 0:

  • Just git clone this repository and start working by editing the code
    git clone https://github.com/Elizraa/bot-telegram.git
    cd bot-telegram

Step 1:

  1. Create your virutalenv from terminal python3 -m venv venv
  2. Activate with venv\Scripts\activate
  3. Install library pip install -rrequirements.txt

Step 2:

  1. Change API Token and Other Variable:
     url = "YOUR_SUPABASE_URL"
     key = "YOUR_SUPABASE_KEY"
     secret = "YOUR_SECRET_TOKEN"
     bot = telepot.Bot("YOUR_TELEGRAM_BOT_TOKEN")
     bot.setWebhook("YOUR_WEBHOOK".format(secret), max_connections=1)
     openai.api_key = "YOUR_OPENAI_API_KEY"