Skip to content

Small bot that gets news from Google News and sends to a Discord channel

Notifications You must be signed in to change notification settings

Bruck1701/NewsDiscordBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

News Discord Bot

This is a Google news client bot. It fetches the headlines from Google News using pygooglenews library, parses the news into embeds and sends to a discord channel.

Installation instruction

To run the bot locally, I recommend installing a python virtual environment:

python3.x -m venv <virtual env name>

then install the requirements

pip install -r requirements.txt

Execution

the bot has currently two methods:

to get the server response time:

!ping

to fetch the top news from Google News:

!new <2-letter language> <2-letter country> <number of headlines>
i.e
!news en US 10 
returns top 10 english news from the US.

#TO DO Set a schedule in the bot to fetch the news every so hours, but the current version still needs to set the channel_id, the language and the country in-code to use the background task.

About

Small bot that gets news from Google News and sends to a Discord channel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages