Rem is a Discord bot written in elixir.
It was written simply because I was bored and I really wanted to write my own Discord bot in Elixir.
This is the second iteration as the previous one was using another discord bot library (Alchemy)
which I dropped since it seemed to be less maintained and a bit more rough around the edges.
My previous attempt can be found here: pyzlnar/discord-bot
It's recommended to install through asdf
$ asdf plugin-add elixir
$ asdf plugin-add erlang
$ asdf install
โ ๏ธ asdf automatically uses the versions of Elixir, Erlang specified in.tool-versions
.
If you choose not to use asdf, and encounter errors, ensure that the dependencies you are using match the versions specified in.tool-versions
.
You can verify the installation by running:
(And you can exit it by pressing CTRL+C twice. yeah...)
$ iex
Erlang/OTP 25 [erts-13.1.2] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1]
Interactive Elixir (1.14.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)>
# Install dependencies
$ mix deps.get
# Compile
$ mix
The project requires some environment variables to be set. (secrets!)
The recomended method is through direnv, but as long you setup
all variables in .env.example
you should be good.
$ cp .env.example .env
$ direnv allow .
Now just modify .env
with the needed values.
Running in dev mode:
$ mix run --no-halt
With an interactive shell:
$ iex -S mix
In detached mode for prod
$ MIX_ENV=prod elixir --erl "-detached" -S mix run --no-halt
# You can stop it by killing the process
$ ps aux | grep elixir
pyzlnar 14381 (. . .) elixir -S mix run --no-halt
$ kill -9 14381
Tests can be run with:
$ mix test
Rem bot is released under the MIT License.