- Install Telegram :)
- Create a telegram bot by talking to Bot Father
- Create ChatGPT API Token in Open AI
- Install python in your computer, if you are on windows follow this
- Install git, follow this
- Install editor of your choice, I preffer VSCode
- Just git clone this repository and start working by editing the code
git clone https://github.com/Elizraa/bot-telegram.git cd bot-telegram
- Create your virutalenv from terminal
python3 -m venv venv
- Activate with
venv\Scripts\activate
- Install library
pip install -rrequirements.txt
- 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"