Skip to content

Discord bot built with Mermaid.js & Discord.js that can generate Mermaid diagrams.

License

Notifications You must be signed in to change notification settings

FutzMonitor/diagram-channel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Diagram Channel

A Discord bot that uses MermaidAPI to generate diagrams for users.

About The Project

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

Built With

This project is built with the following technologies, languages, and frameworks.

  • JavaScript
  • Node.js
  • env
  • vscode

Getting Started

There are two options available for running this bot. You could either run it locally or you can run it as a docker container.

Local Installation

Prerequisites

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.

Running the bot

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!

Docker Container

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!

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact

Christian - gonzalec@dickinson.edu

Project Link: https://github.com/FutzMonitor/diagram-channel

About

Discord bot built with Mermaid.js & Discord.js that can generate Mermaid diagrams.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published