Getting Started
This guide is an introduction to DiscoLog. It will guide you through the setup of DiscoLog and how to use it.
Install DiscoLog
The first step is to add DiscoLog to your applicaiton is to declare the package as a dependency in your mix.exs
file.
defp deps do
[
{:disco_log, "~> 0.1.0"}
]
end
Then run the following command to fetch the dependencies.
mix deps.get
Setup the Discord Server
You need to register a Discord Account
Create a community Discord Server
A Discord community server needs to have a forum-type channel, which we use for error tracking.



Edit the Discord Server settings
Right-click on the server and select Server Settings
> Community Settings





Copy the server ID, it will be needed later

Create a Discord Bot
Go to the developers portal


Disable User Install and add the scope bot
and the permissions Attach Files
, Manage Channels
, Manage Threads
, Send Messages
, Send Messages in Threads

Generate and copy the bot token, it will be needed later

Add Bot to your Server
Go to the installation menu and open the installation link

Follow the steps



Create DiscoLog channels
Edit your config/dev.exs
and add the following configuration with the bot token and the server ID you copied earlier.
config :disco_log,
otp_app: :app_name,
token: "YOUR_BOT.TOKEN",
guild_id: "YOUR_SERVER_ID",
Run the mix task
mix disco_log.create
It will create and output the rest of the necessary configuration for you. Use this configuration for your production environment or add it to your dev config if you just want to test.