This project serves as the BSF (Build-something-fun) aspect of my senior capestone project at Dickinson College. Discord is a large instant messaging and social playform (wiki). Many tech savy users build bot applications to automate essential and nonessential functionality for management of large servers, entertainment, or other peersonal reasons. As an avid Discord user, and with the relative support and size of MermaidJS, I would have thought that a bot application for MermaidJS would have already been built by someone by now. However, I could only find two bots: Yash-Singh1's mermaidjs-discord and ttakami-42's Mermaider. Since both don't quite reach the desired functionality I seek, this project seeks to bridge that personal gap.
Goals:
-
Create a
generate.js
slash command that uses MermaidJS API to generate diagrams for the user. -
Host the bot someplace to have permanent presence on Discord (instead of solely being online when I run it locally).
Demo
This project is built with the following technologies, languages, and frameworks.
There are two options available for running this bot. You could either run it locally or you can run it as a docker container.
There are some JavaScript dependencies that need to be installed before running the bot. Running the following command should install all of the dependencies:
npm install
Make sure that the Node.js is installed and running the previously listed command in the discord-bot
directory.
Ensure that you're inside of the src
directory. Run the following commands:
node deploy-commands.js
node index.js
The first command will register all slash application commands inside of the commands/utility
directory and the second command will run the bot. The bot should now be online!
Make sure you have Docker installed on your machine. Run the following command to build the docker image
docker build . -t diagram-channel
And to run your bot simply run the image from Docker Hub or execute the command below
docker run diagram-channel
Your bot should now be running!
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Christian - gonzalec@dickinson.edu
Project Link: https://github.com/FutzMonitor/diagram-channel