Skip to content

This bot will allow users to use /commands in discord to add resources to our knowledge base on airtable.

Notifications You must be signed in to change notification settings

crondinini/discord-resource-bot

 
 

Repository files navigation

discord-resource-bot

TL;DR

This bot will allow members of the DAO to use /slash commands in Discord to interact with our Airtable knowledge base.

Development Setup

  1. Fork the discord-resource-bot repository into your GitHub account

  2. Clone the fork to your local system

git clone git@github.com:YOUR_USER_NAME/discord-resource-bot.git
  1. Install Node modules
npm install
  1. Create a .env file at the root of the project
touch .env
  1. Follow this tutorial to create a Discord bot. Then, update your .env with the DISCORD_TOKEN and CLIENT_ID values created during the tutorial.
# .env

DISCORD_TOKEN=abc
CLIENT_ID=123
  1. 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
  1. Deploy your commands to the bot created above
npm run deploy:commands
  1. 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.

Commands

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

Linting

To check if your code will compile and is linted appropriately, you can run:

npm run lint

Production deployment

The bot is deployed to Heroku

See Heroku for more information.

Support

Please ping @NoahH in the discord should you have any questions!

About

This bot will allow users to use /commands in discord to add resources to our knowledge base on airtable.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%