https://github.com/jojiiofficial/telegramnewsbot
A bot for telegram which sends news for a given country into a channel
https://github.com/jojiiofficial/telegramnewsbot
articles information news summary telegram telegram-bot
Last synced: 9 months ago
JSON representation
A bot for telegram which sends news for a given country into a channel
- Host: GitHub
- URL: https://github.com/jojiiofficial/telegramnewsbot
- Owner: JojiiOfficial
- License: mit
- Created: 2020-04-24T00:14:13.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-24T14:24:00.000Z (about 6 years ago)
- Last Synced: 2025-06-07T14:45:31.857Z (about 1 year ago)
- Topics: articles, information, news, summary, telegram, telegram-bot
- Language: Go
- Size: 10.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: newsSource.go
- License: LICENSE
Awesome Lists containing this project
README
# TelegramNewsbot
A bot for telegram which sends news for a given country into a channel
# Demo
Germany news: [@germany_news_channel](https://t.me/germany_news_channel)
# Get started
Compile it yourself or use the [docker image](https://hub.docker.com/r/jojii/newsbot)
Configure the bot
Add the bot to your channel and give him rights to send messages
### Compile
```bash
go mod download &&
go build -o newsbot
```
### Docker setup
```bash
export TAG=$(curl -s -S "https://registry.hub.docker.com/v2/repositories/jojii/newsbot/tags/" | jq '.results[]["name"]' -r | sed -n 1p)
docker pull jojii/newsbot:$TAG
docker run -d --name newsBot --restart=unless-stopped -v `pwd`/data:/app/data -v /etc/localtime:/etc/localtime:ro jojii/newsbot:$TAG
```
## Config
`TelegramToken` the telegram bot token. If you don't have one, create a new bot with @BotFather
`NewsAPIToken` The API token for the [newsAPI](https://newsapi.org/)
`ChannelID` The ID of the channel
`StoreFile` A file containing some data needed for the bot to run correctly
`Country` Selector for the news (by country)