Packages

An elixir library for creating discord bots.

Current section

Files

Jump to
discord_elixir lib discord gateway.ex
Raw

lib/discord/gateway.ex

defmodule DiscordElixir.Gateway do
@url "https://discordapp.com/api/gateway"
def start(token) do
{:ok, wss_url}
end
def wss_url do
HTTPotion.get(@url).body |> Poison.Parser.parse! |> Map.get("url")
end
end