Okay, maybe not the simplest, but it's a good starting point.
This setup assumes that you know how to set up a node environment and clone this repository to your local machine.
- Install dependencies
npm install
-
Get your PaLM API key, following instructions on MakerSuite.
-
Follow wonderful instructions on discord.js to set up a bot and get your Discord token and application id.
-
Create a
.env
file in the root of this project and add your API keys and Discord tokens to it, like so:
API_KEY="your-palm-api-key"
DISCORD_TOKEN="your-discord-token"
APPLICATION_ID="your-discord-application-id"
- Register commands with Discord
node src/register.js
- Run the bot
node .
The code that comprises the bot sits in ./src
. Tests are in ./tests
.
The main entry point is ./src/index.js
.
Each file is documented well enough to figure it out what it does.