Skip to content

Shubhamrawat5/TeleNews

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tele-News !

To Create Your Own Telegram Tech-News Posting Bot


Screenshot in termux app

Instructions For Termux

  1. Install Termux from play store

  2. Install python on termux

$ pkg install python
  1. Install git on termux
$ pkg install git
  1. Give storage permission to termux
$ termux-setup-storage
  1. Copy the github repository
$ git clone https://github.com/Shubhamrawat5/TeleNews.git
  1. Open the TeleNews folder created on your phone
$ cd TeleNews
  1. Upgrade
$ pkg upgrade
  1. Install required libraries
$ pip install -r requirements.txt

Now the main 2 steps!

1) Get a bot token

You would need to create a telegram bot now by BotFather

Send /newbot message to BotFather telegram bot and create a bot then it would give you a bot token api, copy this token

Token looks like : XXXXXXXX:YYYYYYY-YYYYYYYYYYYYYYYYY_YY

2) Get chat id or chat tag

Now there are two different places to send news!

Do only one from 2.1 or 2.2 (any one, read heading of both)

2.1) You want to send Tech News to a group or channel

Create a channel/group (if you don't have) then add your bot to your group, to add your bot , you would need the username of bot that you gave to BotFather

Now create a link of your group by making group public then It'll ask to write a group unique link and then copy this group link and remove t.me/ and add @

Eg: Group link t.me/pvxtechnews tag is @pvxtechnews

[Note: You can use group id also, if you group/channel is private]

Now move to 9th step!

2.2) You want to send Tech News to your telegram account

Send a message to Get your telegram id

Save your telegram id

[Important Note: You need to send a message to your bot because Bot can't start a conversation first so you would need to send a message to your bot (This is a restrictions by telegram to avoid spams by bots)]


  1. Now you have token and your_id or group_tag , Execute Data file
$ python data.py

Now enter 1 and then enter token then enter your_id or group_tag or group_id

Now after saving send 0 to exit from the file

  1. Finally last step to post some awesome tech news!!!
$ python news.py

Now it'll ask you to choose a source then ask for confirmation then send :)

[Note: if you've followed all the instructions correctly then tech news will surely be posted! Otherwise check after 8th step and read everything carefully]

Now whenever you want to post tech news direct do 10th step only!

If you want to change bot or group then do 9th step


Issues

  • If you face any issue, feel free to contact on telegram -> Krypton

  • Join My PVX Telegram TechNews group -> TechNews

  • Join the PVX chat group -> PVX

Errors

If you face error TypeError: __init__() got an unexpected keyword argument 'token' then you've installed telebot library which isn't right! Now follow the steps!

  1. uninstall telebot by pip uninstall telebot
  2. uninstall pyTelegramBotAPI by pip uninstall pyTelegramBotAPI
  3. install pyTelegramBotAPI by pip install pyTelegramBotAPI

Now run python news.py

About

To Create Telegram bot to send Tech news !

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages