Javascript-Shimmer: A Gleam library for interacting with the Discord API

Shimmer

A Gleam library for interacting with the Discord API

Basic Example

import gleam/io
import shimmer
import shimmer.{on_message, on_ready}

pub fn main() {
  let handlers =
    shimmer.handlers_builder()
    |> on_ready(fn() { io.print("Ready") })
    |> on_message(fn(message) { io.print("Message Received!") })
    |> shimmer.handlers_from_builder

  let client =
    shimmer.new("TOKEN", 0, handlers)
    |> shimmer.connect

  erlang.sleep_forever()
}

Notes

  • Currently, we bundle nerf, this will be removed once this pull request is merged.

Comments

  • Return the correct state
    Return the correct state

    Jan 10, 2022

    Oops

                                                                                                                                                                                                           
    Reply
  • Erlang actor implementation
    Erlang actor implementation

    Jan 10, 2022

    Working around a compiler bug and the dreadful debug output from gleam_otp

    Reply