GithubHelp home page GithubHelp logo

anks321 / statsbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thieleju/statsbot

0.0 0.0 0.0 256 KB

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

License: MIT License

JavaScript 100.00%

statsbot's Introduction

StatsBot - A Discord Bot to gather data from public APIs

CodeQL Prettier Check

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
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
/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
/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

🔧 Installation

Prerequisites

  • Node.js (v16.6.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 freemrl avatar relby avatar neupanedipen avatar maestrodagan avatar nktech-official avatar jurikae avatar alexandrosyiangou avatar jeremiaaxel avatar maruthiko avatar maxiwolleb avatar komen205 avatar aloybrancheung avatar abhishekpatil4 avatar mantevian avatar satyamrs00 avatar johngerome avatar zboutchyard avatar pranjalagni avatar muditmahajan21 avatar moncefme avatar biswajitsahoo-tech avatar androlover98 avatar dashroshan avatar ch1nru5t 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.