~williewillus/r16

Racket trick bot
7cd40a6e — Vincent Lee 22 hours ago
Update README
6d26fd3e — Vincent Lee 10 days ago
Redact custom-write implementing objects from being outputted
c7dada3d — Vincent Lee 10 days ago
Fix indentation

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~williewillus/r16
read/write
git@git.sr.ht:~williewillus/r16

You can also use your local clone with git send-email.

#r16

R16 is a "trick bot" for Discord. It saves snippets of code, which can then be recalled and executed on user-provided input.

#History

The concept of a "trick bot" is not new. The authors were introduced to it by K9, a similar Discord bot written in Clojure.

Despite the authors being avid Clojure fans, K9 had several known security problems due to leaky sandboxing in the libraries it used. On the other hand, Racket's sandboxing utilities are much more tightly integrated into the runtime environment. Additionally, the standard Racket installation comes with many more convenient libraries trick authors might want to use.

Thus, R16 was born.

#Name

The R16 name is simply the name "K9", but with "K" shifted to "R" (for "Racket") and the "9" shifted by the same number to "16".

#Usage

  1. Clone this repository
  2. raco pkg install --user --auto --type dir <clone directory>
  3. BOT_TOKEN=<your discord token> racket main.rkt <directory to save in>

Alternatively, you can raco pkg install r16 and run the bot from the install directory, using raco pkg update to update.

NOTE: Currently privilege checking is broken (racket-cord bug). Therefore, tricks will only be deletable by their creators (unless you edit the save data manually).