Skip to content
copygirl edited this page Apr 17, 2016 · 2 revisions

Welcome to the cord Wiki!

This page just gives a brief overview over the configuration files you need to create yourself and put next to the cord.js file. That is, just the general layout and fields that may be used across different sockets / plugs. For further information on how to configure individual sockets / plugs, please refer to the sidebar.

auth.json file

This file is used to define any number of sockets, each one representing a connection to some service. It might have made more sense to call this file sockets.json, but this way it actually looks important.

{
  "<socket-id>": {
    "socket": "<socket-type>",
    "enabled": true,
    "<socket-field>": value,
    // ...
  }, // ...
}
  • <socket-id>: The socket's ID. Can be anything you want, for example "irc" or "discord" Used by plugs to look up sockets and their users/channels using resolve strings such as irc:#obsidian.
  • socket: The socket's type, such as "IRC" or "Discord".
  • enabled: Optional (default: true). If false, prevents the socket from being created. Useful if you want to disable the socket but want to keep the information in the auth file.
  • <socket-field>: Additional fields depending on the type of the socket required to log in.

config.json file

This file is used to load and configure cord's plugs. Unlike sockets, there is only one instance active per plug type. If a plug is not specified in the config file, it will not be loaded. May have been more appropriate to call this plugs.json, but eh, *shrugs*.

{
  "<plug>": {
    "enabled": true,
    "debug": false,
    "<plug-option>": value,
    // ...
  }, // ...
}
  • <plug>: Type of the plug, such as "Logging" or "Bridge".
  • enabled: Optional (default: true). If false, prevents the plug from being created. Useful if you want to temporarily disable a plug but don't want to remove the configuration from the config file.
  • debug: Optional (default: false). If true, might log debug messages to the console.

Some plugs might not require any config options to work, in which case it would be perfectly fine to use an empty object ({ }) to load and enable the plug. This for example can be done with the Respawn plug: "Respawn": { }.

Clone this wiki locally