TunahanGezer / Telegram_Bot

Simple Telegram Bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sure, here's a README for your Telegram bot code:


Telegram Bot - Financial Data and Polling

This Telegram bot is designed to provide users with financial data and polling functionality. It retrieves real-time cryptocurrency and currency exchange rates and sends them to users upon request. Additionally, it supports interactive polling within Telegram groups.

Features

  • Start Command: Welcomes users and provides a brief introduction to the bot.
  • Help Command: Offers guidance on available commands and their functionalities.
  • Coin Command: Fetches the current values of Bitcoin (BTC) and Ethereum (ETH) in USD.
  • Doviz Command: Retrieves the current exchange rates for USD to TRY (Turkish Lira) and EUR to TRY.
  • Zar Command: Rolls a six-sided die and sends the result to the user.
  • Komutlar Command: Lists all available commands along with their descriptions.
  • Custom Command: Demonstrates how to implement a custom command.
  • Anket Command: Initiates a poll with a predefined question and options.
  • Error Handling: Logs errors and provides appropriate responses to users.

Dependencies

  • Python 3.x
  • python-telegram-bot library
  • beautifulsoup4 library
  • requests library

Usage

  1. Run the Python script to start the bot.
  2. Interact with the bot using the following commands:
    • /start: Start the bot and receive a welcome message.
    • /help: Get information about available commands.
    • /coin: Check the current values of Bitcoin and Ethereum.
    • /doviz: View the current exchange rates for USD to TRY and EUR to TRY.
    • /zar: Roll a six-sided die and receive the result.
    • /komut: See a list of available commands and their descriptions.
    • /anket: Participate in a poll by answering the predefined question.
  3. Enjoy the bot's functionalities and explore its features!

Notes

  • Ensure that all dependencies are installed before running the script.
  • This bot can be extended further to include additional commands, integrate with more APIs, or enhance the polling functionality.
  • Make sure to replace the placeholder API key with your actual Telegram bot API key.

Feel free to customize the README further based on your preferences and additional details you'd like to include.

About

Simple Telegram Bot


Languages

Language:Python 100.0%