Giter Club home page Giter Club logo

rem-bot's Introduction

Rem

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

Installation

Erlang and Elixir

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)>

Dependencies

# Install dependencies
$ mix deps.get
# Compile
$ mix

Environment

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

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

Tests can be run with:

$ mix test

License

Rem bot is released under the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.