Giter Site home page Giter Site logo

pandfun / statsbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thieleju/statsbot

0.0 0.0 0.0 334 KB

Discord Bot to gather data from public APIs using node.js and discord.js! Hacktoberfest Event Project

License: MIT License

JavaScript 99.74% Dockerfile 0.26%

statsbot's Introduction

StatsBot - A Discord Bot to gather data from public APIs

CodeQL

Note
This project does participate in the Hacktoberfest 2022 event!

A Discord bot which provides various commands to get data from public APIs. This project is using the discord.js library and public APIs from this list or other ressources.

✨ How to contribute

Warning
For the duration of Hacktoberfest 2022, only one issue/pull request per person will be accepted. If you want to contribute more, please look for other repositories here and keep contributing ❤️

  • Navigate to an open issue and ask to be assigned to it (or create one yourself)
  • After you are assigned, fork the repository and create a new branch
  • Make your changes on the new branch and commit them
  • Create a pull request and wait for it to be reviewed
  • Thats it!

For more information check out the Contribution Guidelines

✅ Available commands

Command Description API
/invitelink Shows the invite link for the bot
/ping Pong!
/serverinfo Shows information about the server
/userinfo Shows information about the user
/excuse Sends a random excuse Excuser
/show-chess-leaderboard Shows information about the current chess.com leaderboard chess.com
/trivia Shows a random question, react with ✅ or ❌. opentdb.com
/numberfact Shows a random number fact numbersapi.com
/catfact Shows a random fact about cats. meowfacts
/dogfact Shows a random fact about dogs. Dog API
/dictionary Get definitions and synonyms of words. dictionaryapi
/foxpic Shows a random picture of a fox. RandomFox
/mathquestion Sends a random math question. xMath API
/uptime Shows how long Stats-Bot has been up. Countdown NPM Package
/crypto Provide detail about given crypto currency. coinstat
/motivation Shows a random motivation quote. motivation
/breakingbad Shows a random Breaking Bad quote. Breaking Bad Quotes Api
/dogpic Shows a random dog picture. Dog Pic API
/catpic Shows a random cat picture. Cat Pic API
/duckpic Shows a random duck picture. Duck Pic API
/joke Give you a random joke. Joke API
/chuck Shows a random joke about Chuck Norris Chuck Norris API
/animequote Shows a random anime quote. anime-chan
/bored Get something to do if you are bored. Bored API
/kanye Shows a random quote by Kanye West. Kanye Rest API
/websiteicon Shows the favicon of the requested sit. Icon Horse API
/guessage Guess the age of a specific or random name. Agify API, Random Data API
/npm Query the NPM registry for npm package details. NPM Registry
/stockimage Get a random 1920x1080p stock image. Lorem Picsum
/tecchy Shows a random tech-savvy phrase. TechyAPI
/affirmation Shows a random affirmation quote. Affirmation Dev API
/series Get any tv/web series information CatchTheShow
/meme Send Random Memes. Reddit Random Memes Api
/list-data-breaches Lists data breaches using the haveibeenpwned.com API haveibeenpwned.com
/onthisday Shows a random history event happended on this date. ZenQuotes
/fruit Get interesting information about fruit Fruityvice
/serverip Display server IP and location MyIP API
/guessnationality Guess the country of a specific or random name. Nationalize API, Random Data API
/countryinfo Display information about a specific country. REST Countries
/university Get the domain of a university. Hipo
/countryinfo Display information about a specific country. REST Countries
/breakingbaddeath Shows a random death reason of a Breaking Bad character Breaking Bad Death Api
/advice Shows a random advice. Advice Slip API
/shiba Show shiba inu picture. shibe.online
/yesno Get an answer to any question. yesno.wtf
/xkcd Shows a random xkcd comic. xkcd Swagger REST API
/roboavatar Create a Robotor Avatar by entering a string. Robo Avatar API
/inspiration Get Inspiration. goprogram API
/horoscope Get Horscope. Aztro Api
/whatshouldieat Get a random recipe from themealdb. themealdb API
/ayah Get a verse of Quran. AlQuran Cloud
/encryption Encrypt/decrypt a message using a key. Classify API
/earthevent Return a natural event that occurred in the last 30 days. EONET API
/apod Return an astronomy picture of the day. NASA APOD API
/truefact Get a true fact. Random Useless Facts API
/createloripsum Shows random lorem ipsum text. Loripsum
/urban Shows the definition of a term from Urban Dictionary. Urban Dictionary API
/guessgender Get the gender of a name. Genderize
/shortenlink Shorten the URL. GoTiny
/locateiss locate the International Space Station. open-notify
/password-gen Generate a random password. Random Password Generator

🔧 Installation

Prerequisites

  • Node.js (v16.14.0 or higher)
  • Discord Account

Project Setup

  1. Fork or Clone the repository to your local machine
  2. Navigate to the project root directory (location of package.json)
  3. Run the command npm install to install all dependencies
  4. Setting up a discord bot application
    • Follow this guide on how to set up a new discord application and add a bot
    • Save the Bot Token, Client ID and Client Secret to a new file named .env in the project root directory

Example .env file content:

DC_BOT_TOKEN=<your bot token>
DC_BOT_CLIENT_ID=<your application client id>
DC_BOT_CLIENT_SECRET=<your application client secret>
DC_BOT_PERMISSIONS=274878131264

🚀 How to run the bot

npm run dev

This runs the application with nodemon which automatically restarts the application when changes are made.

🔗 How to invite the bot

  • Option 1: Follow this guide on discordjs.guide
  • Option 2: Use the base Url https://discord.com/api/oauth2/authorize and add following url parameters:
    • client_id: Your application client id (DC_BOT_CLIENT_ID)
    • permissions: All permissions the bot should have when invited as a string (274878131264)
    • scope: bot%20applications.commands

❓ What is Hacktoberfest?

A month-long celebration from October 1st - 31st sponsored by Digital Ocean and GitHub to get people involved in Open Source.

Create your very first pull request to any public repository on GitHub and contribute to the open source developer community.

statsbot's People

Contributors

thieleju avatar christianpachecolopez avatar ky-y0 avatar freemrl avatar moazfarrukh avatar flexx7 avatar relby avatar maxiwolleb avatar jurikae avatar appledora avatar neupanedipen avatar maestrodagan avatar aakashgarg-19 avatar nktech-official avatar siddharth9890 avatar satyamrs00 avatar mantevian avatar aloybrancheung avatar serpent03 avatar komen205 avatar maruthiko avatar jeremiaaxel avatar iqrar99 avatar alexandrosyiangou avatar abhishekpatil4 avatar johngerome avatar itznesbrodev avatar deepakgohil9 avatar zboutchyard avatar pandfun avatar

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.