A Telegram bot written in python.

Overview

telegram_bot

This bot is currently a beta project.

Features

A telegram bot which can:

  • Send current COVID-19 cases/stats of Germany
  • Send current worth of major crypto currencies
  • Send a random meme

Important information

If you are using Windows, type 'python' instead of 'python3'. Otherwise it propably won't work.

Setup

First, you need to git clone this repository. On Windows you might have to install git but you can also just download this repo from the website.

git clone https://github.com/huhncares-cmd/telegram_bot

After that, you need to setup your virtual environment.

python3 -m venv venv

On Linux you might have to install python3-venv first. SImply type in this command:

sudo apt install python3-venv

On Windows you can jump into the environment like that on cmd:

venv\Scripts\activate.bat

And on Powershell:

venv\Scripts\Activate.ps1

On Linux it's a bit different because there are many shells out there. You can see what's right for you on the official website of Python (https://docs.python.org/3/library/venv.html), but for most users this command will work:

source venv/bin/activate

Install requirements

When you are in your virtual environment, you can simply install all dependencies using this command:

pip3 install -r requirements.txt

Generate API-Token

You need an API-Token to access the Telegram-API. You can get this API-Token by sending a message to @BotFather (https://t.me/BotFather). Just write /start and follow the instructions of the bot.

Setting up environment variables

After getting the API-Token you need to setup your environment variables. Create a .env file in your base directory and type in the following stuff.

TELEGRAM_API_KEY = 
   

   

Make Sure to exclude this file with .gitignore if you want to use Git later.

Run

You can run the bot by executing main.py.

python3 main.py

Finish

That's basicly it. You've just set up your own Telegram bot. Feedback on Twitter (https://twitter.com/huhncares) or GitHub (https://github.com/huhncares-cmd) is appreciated. Thanks for using huhncares-cmd/telegram_bot!

You might also like...
Lumberjack-bot - A game bot written for Lumberjack game at Telegram platform
Lumberjack-bot - A game bot written for Lumberjack game at Telegram platform

This is a game bot written for Lumberjack game at Telegram platform. It is devel

This is telegram bot to generate string session for using user bots. You can see live bot in https://telegram.dog/string_session_Nsbot

TG String Session Generate Pyrogram String Session Using this bot. Demo Bot: Configs: API_HASH Get from Here. API_ID Get from Here. BOT_TOKEN Telegram

A telegram bot which can show you the status of telegram bot

BotStatus-Ts-Bot An open source telegram Bot Status bot For demo you can check here The status is updated in every 1 hour About Bot This is a Bot stat

Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API.

Tg_PHub_Bot Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API. OS Support All linu

veez music bot is a telegram music bot project, allow you to play music on voice chat group telegram.
veez music bot is a telegram music bot project, allow you to play music on voice chat group telegram.

🎶 Veez Music Bot Music bot for playing music on telegram voice chat group. Requirements 📝 FFmpeg NodeJS nodesource.com Python 3.7+ PyTgCalls 🧪 Get

An Telegram Bot By @AsmSafone To Stream Videos in Telegram Voice Chat. This is Also The Source Code of The Bot Which is Being Used In @SafoTheBot Group! ❤️

Telegram Video Player Bot (Beta) An Telegram Bot By @AsmSafone To Stream Videos in Telegram Voice Chat. Special Features Supports Live Streaming From

A Telegram Filter Bot, Support Unlimited Filter. Also, The Bot can auto-filter telegram File | video

A Telegram Filter Bot, Support Unlimited Filter. Also, The Bot can auto-filter telegram File | video

Asad Alexa VC Bot Is A Telegram Bot Project That's Allow You To Play Audio And Video Music On Telegram Voice Chat Group.
Asad Alexa VC Bot Is A Telegram Bot Project That's Allow You To Play Audio And Video Music On Telegram Voice Chat Group.

Asad Alexa VC Bot Is A Telegram Bot Project That's Allow You To Play Audio And Video Music On Telegram Voice Chat Group.

A telegram bot script for generating session string using pyrogram and telethon on Telegram bot

String-session-Bot Telegram Bot to generate Pyrogram and Telethon String Session. A star ⭐ from you means a lot to us! Usage Deploy to Heroku Tap on a

Owner
HuhnCares
I'm a developer.
HuhnCares
A Telegram Bot written in Python for mirroring files on the Internet to your Google Drive or Telegram

Original Repo mirror-leech-telegram-bot This is a Telegram Bot written in Python for mirroring files on the Internet to your Google Drive or Telegram.

null 0 Jan 3, 2022
Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

Telegram VCVideoPlayBot An Telegram Bot By @ZauteKm To Stream Videos in Telegram Voice Chat. NOTE: Make sure you have started a VoiceChat in your Grou

Zaute 20 Oct 21, 2022
Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

SUBIN 449 Dec 27, 2022
Slam Mirror Bot is a multipurpose Telegram Bot written in Python for mirroring files on the Internet to our beloved Google Drive.

Slam Mirror Bot is a multipurpose Telegram Bot written in Python for mirroring files on the Internet to our beloved Google Drive.

Abinash939 1 Oct 10, 2021
A group management bot written in python3 using the python-telegram-bot library.

Chika Fujiwara A modular telegram Python bot running on python3 with an sqlalchemy database. Originally a Marie fork, Chika was created for personal u

Wahyusaputra 3 Feb 12, 2022
A simple telegram voting bot based on the python-telegram-bot api.

A simple telegram voting bot based on the python-telegram-bot api. *To make it more easy to use, I might make a C++ code in the future so you don't ha

null 3 Sep 13, 2021
Telegram bot implementing Lex Arcana using python-telegram-bot library.

Lex Arcana Telegram Bot ?? Telegram bot implementing Lex Arcana using python-telegram-bot library. This bot was evaluated for the course "Computer Eng

Nicolò Sonnino 6 Jun 22, 2022
A Powerful telegram giveawayz bot based on the python-telegram-bot API

GiveawayZ Bot A Powerful telegram giveawayz bot based on the python-telegram-bot API. Powered by Team Zyntax and Team DFX Developed by @Zycho-Dev A pr

Zycho #AFK 5 Jul 31, 2022
A simple Telegram bot that analyses a given word, built with python-telegram-bot

Telegram Word Bot A simple Telegram bot that analyses a given word, built with python-telegram-bot. The bot is fairly useless - unless you often need

Chris N 2 Jul 14, 2022