Added the stock command to retrieve data about a specific stock
- More Coming Soon!
- Create a discord bot application at the discord developer portal
- Copy discord bot secret key (token)
- Get the bot's ID (You might need to turn on developer mode on Discord for this)
- Get yourself a free API Key ID and Secret Key for the Alpaca Trade API. You can use this for a step-by-step tutorial on getting started with Alpaca
- You need to create a
.env
(Mandatory or the bot will not work) file insrc
- It should be structured like so:
TOKEN=1234567890 BOTID=12345679087 MONGOPASS=123456 APCA_API_KEY_ID=AKFZXJH121U18SHHDRFO APCA_API_SECRET_KEY=pnq4YHlpMF3LhfLyOvmdfLmlz6BnASrTPQIASeiU PREFIX=! BULLETPOINTEMOJI=<:bulletpoint:821446907871494154>
- Or you can set up environment variables in the same way if your hosting the bot on a server (I use Heroku). Otherwise, if your service doesnt support built in environment variables or you are hosting on a personal machine, you MUST set up
.env
. - Note: BULLETPOINTEMOJI is an emoji for bullet points for embed formatting. It is a required environment variable and you have to provide the emoji in custom emoji format (I would make a separate server that contains the emoji and Kali bot so the bot can reference it.):
<:emoji_name:emoji_id>
- Or you can set up environment variables in the same way if your hosting the bot on a server (I use Heroku). Otherwise, if your service doesnt support built in environment variables or you are hosting on a personal machine, you MUST set up
- The bot uses MongoDB so you must create a MongoDB collection (with a user that uses password authentication) yourself and use the application string provided by MongoDB in
src/mongo.js
. Use this video to find out how to set up a Mongo Data Base and get your connection string.- In
mongo.js
replace the string assigned to `mongoPath with your connection stringconst mongoPath = "mongodb+srv://<user>:<password>@cluster0.jx4hq.mongodb.net/myFirstDatabase?retryWrites=true&w=majority"
- In
- It should be structured like so:
- You need to npm install the following packages for the bot to work. Incase I forget to include any packages here, you can check the package.json file for all the dependencies needed for this. (You may skip this step if running on a server like Heroku; all you need is the package.json to let the web service provider know what the project dependencies are)
-
npm install dotenv
-
npm install discord.js
-
npm install [email protected]
-
npm install puppeteer
-
npm install request
-
npm install @alpacahq/alpaca-trade-api
-