Skip to content

Download Link (If the bot is not online when downloaded then I'm not paying for a server at the moment). You can still run it locally to try it; instructions are in the readme

Notifications You must be signed in to change notification settings

Soor1/StockInfoBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stock Info Discord Bot

StockBot is a Discord bot designed to fetch various stock data based on user input commands. It uses Discord.js for development and Polygon.io to fetch the stock info.

Usage

Adding the Bot to Your Discord Server

To add StockBot to your Discord server go to this link (if the commands don't work when you add it that means I'm not paying for a server to host the bot at the moment):

  1. Go to this link: https://discord.com/oauth2/authorize?client_id=1241418921014464512

Running Locally

To run the bot locally on your machine and make custom changes follow these steps:

  1. Go to the Discord Developer Portal and create a new bot with a name of your choice.
  2. Navigate to the Bot tab and enable all three Privileged Gateway Intents.
  3. Go to the OAuth2 section and, under the OAuth2 URL Generator, check application.commands and bot. Under BOT PERMISSIONS, grant Administrator privileges.
  4. Return to the Bot tab, click on Token, and then click Reset Token. Save the generated token. Remember to reset the token each time the code is compromised or lost.
  5. Invite the bot to your server using the OAuth2 URL generated.
  6. Go to Polygon and create a free account
  7. Create a folder on your computer.
  8. Clone this repository into the folder.
  9. Open a terminal inside the folder and execute the following commands:
    • npm init -y (sets up project info) (in the package.json under main change it to src/index.js instead of index.js)
    • npm install discord.js (installs the package required to interact with Discord)
    • npm install -g nodemon (installs nodemon, a utility that monitors for changes and automatically restarts the server)
    • npm install dotenv (allows you to store your API keys in an environment var)
  10. Create a .env file at the same directory level as your package.json and inside add two things
  • DISCORD_BOT_TOKEN=Your Discord Token I said to copy earlier
  • POLY_API_KEY=Your Polygon Api key from your Polygon Dashboard
  1. After everything above is complete, you can start the bot by running nodemon in the terminal.

Author

StockBot was created by Soor Hansalia.

About

Download Link (If the bot is not online when downloaded then I'm not paying for a server at the moment). You can still run it locally to try it; instructions are in the readme

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published