GithubHelp home page GithubHelp logo

broken-news-bot's Introduction

Broken-News-Bot

Broken News is a Discord Bot that delivers relevant, breaking news to discord servers. Broken News is an easy to use bot that reads text commands from users to report news that broke less than 24 hours ago. Users can also specify their requests by requesting news from a certain category, or searching for a key word in articles.

Note

When adding the bot to your server, you will be prompted with a message saying the bot should be granted administrator privileges in your server. Broken News has no malicious intent and will not alter any server settings, server roles, or server users. The bot simply sends messages to the server channel it receives a request from. If you are still unsure, you can read the full source code in the src folder.

Files

  • src: Contains are source code for Broken News
  • src/index.js: Contains bot client code, which is where all the bot actions take place
  • src/news.js: Contains newapi code, allowing the bot to make HTTP requests to receive news articles
  • src/server.js: Contains express code, which creates a web server for Broken News to be hosted on

Installation

  1. You must first have a Discord account and create a Discord server or be a privileged member in one.
  2. Add the Broken News Bot to your server using this link
  3. Interact with the bot.

Usage

Broken News aims to deliver a personalized news experience to all Discord users by allowing them to specify their news requests. Users can query for news from a certain category or even search for news articles with keywords contained in them. Users simply need to type in one of the following commands below, and Broken News will reply. Below are all the commands:

General

  • $help: Broken News will provide users with some guidance

Categories

  • $news: Broken News responds with general U.S. news (same as $general)
  • $general: Broken News responds with general U.S. news (same as $news)
  • $business: Broken News responds with U.S. news relating to the business field
  • $entertainment: Broken News responds with U.S. new relating to the entertainment industry
  • $health: Broken News delivers health related news from U.S. sources
  • $science: Broken News displays U.S. science based news
  • $sports: Broken News delivers the latest sports news
  • $tech: Broken News responds with all the breaking news for technology in the U.S.

Keyword

Broken News also allows users to search for news articles containing a key word that they specify:

  • $q[keyword]: Broken news delivers news containing a key word

About

Front End:

  • Broken News utilizes the Discord.js node client library to make calls to the Discord API. This allows users to interface with the Broken News Bot in their own Discord servers.

Back End:

  • Broken News uses the NewsAPI node client library to make HTTP requests to fetch relevant News articles. The NewsAPI node client library simplifies the process of taking user input and fetching news articles specified by the user.

  • Broken News is hosted on a web server using express.js. This server is run on Replit's cloud environment, allowing several users to use Broken News concurrently. Additionally, to keep the Replit web server running, UptimeRobot is used to ping the server every 5 minutes to keep it up and running.

broken-news-bot's People

Contributors

aneerati avatar

Watchers

 avatar

Forkers

daine71

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.