rmcafee / discord_ex

Discord Elixir Library
MIT License
47 stars 13 forks source link

REST client start_link accepts optional GenServer parameters #36

Closed jussih closed 6 years ago

jussih commented 7 years ago

Add optional GenServer parameters to DiscordEx.RestClient.start_link(). This is convenient if a user wants to run the client inside a supervisor, since the process can then be registered to a name by the supervisor:

children = [
  worker(DiscordEx.RestClient, [%{token: "Bot " <> discord_token}, [name: DiscordRESTClient]])
]