devie-bot
devie-bot copied to clipboard
This bot will allow users to use /commands in discord to add resources to our knowledge base on airtable.
DEVIE Bot 🤖
it's probably nothing
TL;DR
Devie is a discord bot by the devs for the devs. Currently acts as an aggregator of content for the #newsletter team. Also, this bot will allow members of the DAO to use /slash
commands in Discord to interact with our Airtable knowledgebase. Will be expanded on greatly in the future. ✨
How it Works
- Upvote posts in either
#🔮-probably-nothing
or#learning-resources
by reacting with a 📰 (:newspaper:) - Five 📰 will trigger the bot to post into the
#newsletter
channel (might be updated) - The team will use these votes to further curate the newsletter 🤙
Development Setup
-
Fork the
devie-bot
repository into your GitHub account -
Clone the fork to your local system
git clone [email protected]:YOUR_USER_NAME/devie-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
,CLIENT_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. We also needPOST_TO
,CURATE_FROM
andPOST_THRESHOLD
for the curation portion. In discord, with developer mode enabled, right clicking any avatar or channel name will present aCopy ID
option.
# .env
GUILD_ID=xyz
POST_TO=id
CURATE_FROM=id,id,id
POST_THRESHOLD=5
- 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 reach out in the bot channel for support: DAO PROJECTS > discord-bot