Drahcirius / crux_rest

A Discord API rest library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crux.Rest

Package providing rest functions and rate limiting for the Discord API.

Useful links

Installation

The package can be installed by adding crux_rest to your list of dependencies in mix.exs:

def deps do
  [
    {:crux_rest, "~> 0.1.5"}
  ]
end

Usage

After providing a token to use via either your config.exs, Application.put_env/3, or :application.set_env/3 freely use the functions provided by the Crux.Structs.Rest module.

For example:

  iex> Crux.Rest.create_message(445290716198076427, content: "Hello there!")
  %Crux.Structs.Message{
    content: "Hello there!",
    author: %Crux.Structs.User{...},
    ...
  }

About

A Discord API rest library

License:MIT License


Languages

Language:Elixir 99.9%Language:Shell 0.1%