Skip to content

Azkun/expresso

Repository files navigation

expresso

Discord Typescript Docker Node.js GitHub stars

designed to simplify academic communication inside Discord, expresso currently compiles typst and LaTeX. in the near future, i would love to extend the support of other useful tools.

security disclaimer

expresso uses LaTeX and Typst, turing-complete languages with compilers that will, by design, read files, execute macros, and can even sometimes run shell commands. the bot feeds user input directly into these compilers, which is why sandboxing (filesystem isolation, disabled shell escape or process timeouts) is critical and why using the provided Docker image is strongly recommended.

if you find any security issues, please open an issue or a pull request.

installation

obvious steps

you need to create a Discord bot using the Discord Developer Portal. you will need to retrieve the bot token and its client ID. you will also need to get the guild ID of the server you want to add the bot to. consider this server as your "test server".

using docker

please make sure to have docker and docker-compose installed. download the docker-compose.yml file, move it inside a folder you like and fill in your DISCORD_TOKEN, CLIENT_ID and GUILD_ID inside of it.

to deploy the slash commands, which is only needed for the first time, run:

docker compose run --rm expresso node dist/deploy-commands.js

then, to start the bot, run:

docker compose up -d

using git

this is not recommended if you don't know what you're doing. you will need to have a LaTeX distribution with dvipng, npm & node, and ImageMagick installed on your system. you will also need a .env file with your DISCORD_TOKEN, CLIENT_ID and GUILD_ID.

you will encounter security issues depending on your versions.

git clone https://github.com/Azkun/expresso.git
cd expresso
npm install
npm run build
npm run deploy
npm start

contributing

you can freely contribute to the bot if you want to. expresso need more commands and customisation options. if it's your first time, don't be shy, i'm here to help and we'll review the code together. please follow conventional commits.

sources

  • typst-raster : allows to compile typst code to an image. very useful because it doesn't need external dependencies and it works like a charm.

license

this project is licensed under the mit license. it is free to use, modify, and distribute as long as you give credit to the original author.

About

a discord bot that simplifies academic communication through LaTeX and Typst

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors