Skip to content

ferclager/python-quotes-telegrambot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Quotes Telegram Bot

This repository contains the code for building a Quote Telegram Bot using Python. The bot fetches quotes from the They Said So® API and sends them to a specified Telegram chat.

Prerequisites

Before you begin, make sure you have the following:

  • Telegram Bot: Create a Telegram bot by following the instructions here.

  • Telegram Chat ID: Obtain the chat ID from your bot. Refer to this guide for more information.

  • Quotes API from They Said So®: Sign up for the They Said So® API to get access to the quotes. You can make 10 free calls per hour. Visit here to get your API key.

  • Dependencies: Check the requirements.txt file for the required libraries: requests, urllib, and python-dotenv. Install these libraries before running the code.

  • Configuration: Configure your environment by creating a .env file and adding the following environment variables:

	API_KEY_THEYSAIDSO=YOUR_API_KEY_FROM_THEYSAIDSO
	TELEGRAM_BOT_TOKEN=YOUR_BOT_TOKEN
	TELEGRAM_CHAT_ID=YOUR_CHAT_ID

Usage

To use the Quote Telegram Bot, follow these steps:

  • Clone the repository:
	git clone https://github.com/your-username/python-quotes-telegrambot.git
  • Navigate to the project directory:
	cd python-quotes-telegrambot 
  • Run the quotes.py script
	python3 quotes.py

That's it! The bot will fetch quotes from the They Said So® API and send them to the specified Telegram chat.

Feel free to modify the code according to your requirements and enhance the functionality of the bot.

License

This project is licensed under the MIT License.

About

Building a weather bot in python using Telegram API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages