This bot will allow members of the DAO to use /slash
commands in Discord to interact with our Airtable knowledge base.
-
Fork the
discord-resource-bot
repository into your GitHub account -
Clone the fork to your local system
git clone git@github.com:YOUR_USER_NAME/discord-resource-bot.git
- Install Node modules
npm install
- Create a
.env
file at the root of the project
touch .env
- Follow this tutorial to create a Discord bot. Then, update your
.env
with theDISCORD_TOKEN
andCLIENT_ID
values created during the tutorial.
# .env
DISCORD_TOKEN=abc
CLIENT_ID=123
- We also need to add our
GUILD_ID
to the.env
file. This can be found in your Discord server settings under Widget > Server ID.
# .env
GUILD_ID=xyz
- Deploy your commands to the bot created above
npm run deploy:commands
- Start the bot server
npm run dev
Now, you can test out the slash commands you've created in the Discord server where you installed the bot.
These are the current commands the bot supports:
/add-author
- Add an author to the knowledge base/add-blockchain
- Add a blockchain to the knowledge base/add-category
- Add a category to the knowledge base/add-contributor
- Add a category to the knowledge base/add-resource
- Add a new resource to the knowledge base/add-tag
- Add a tag to the knowledge base/add-glossary
- Add a glossary term and description to the knowledge base
To check if your code will compile and is linted appropriately, you can run:
npm run lint
The bot is deployed to Heroku
See Heroku for more information.
Please ping @NoahH
in the discord should you have any questions!