Skip to content

Tiltify/crux_rest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crux.Rest

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

Useful links

Installation

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

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

Usage

For example:

  iex> defmodule MyBot.Rest do
  ...>   use Crux.Rest
  ...> end
  {:module, MyBot.Rest, <<...>>, :ok}

  iex> {:ok, pid} = MyBot.Rest.start_link(token: "token")
  {:ok, #PID<0.100.0>}

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

About

A Discord API rest library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%