Package providing rest functions and rate limiting for the Discord API.
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
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{...},
...
}