Skip to content

Configuration File

TheFloatingPixel edited this page Sep 24, 2022 · 1 revision

This page explains all entries in DiscordLog's config.yml file.

webhooks

A list of all webhooks that the messages should be sent to.

Example:

webhooks:
 - https://discord.com/api/webhooks/0123456789/ABCDEFGHIJKLMNOPRSTUWXYZ
 - https://discord.com/api/webhooks/ABCDEFGHIJ/012345678901234567890123

logged-events

A list of all the event types to log. The list of all available events can be found below.

Event Name Event description
player-command-execution When a player runs a command in-game
console-command-execution When a command is run through a server console
player-join When a player joins
player-disconnect When a player disconnects
player-kick When a player is kicked using /kick
player-death When a player dies
player-respawn When a player presses Respawn on death screen
player-kill-entity When a player kills an entity
player-kill-named-entity When a player kills an entity with a name tag. Useful for catching the person that kills your pets.

Example

logged-events:
  - player-command-execution
  - console-command-execution
  - player-join
  - player-disconnect
  - player-kick
  - player-death
  - player-kill-named-entity
#    The following events are commented out, so they won't be logged
#  - player-respawn
#  - player-kill-entity

messages

A thing containing all the messages for the events.

Messages can contain arguments. Argument syntax is #{<argument name>} (eg. a name argument would be #{name}).

Note

The backtick ` is an escape character and can be used to escape arguments `#{name}. When using it in text, it must be escaped using a double backtick ``

Message Arguments
player-command player - the player executing the command
command - the command being executed
console-command command - the command being executed
player-join player - the player that joined
player-disconnect player - the player that disconnected
player-kick player - the player that was kicked from the server
player-death player - the player that died
player-respawn player - the player that respawned
player-kill-entity player - the player killing an entity
type - the type of the entity in UPPERCASE SNAKE_CASE
player-kill-named-entity player - the player killing an entity
type - the type of the entity in UPPERCASE SNAKE_CASE
name - the name of the dead entity

Example

messages:
  player-command: "Player **#{player}** executed the command ``#{command}``"
  console-command: "CONSOLE executed the command ``#{command}``"
  player-join: "Player **#{player}** joined the server!"
  player-disconnect: "Player **#{player}** disconnected from the server."
  player-kick: "Player **#{player}** was kicked from the server!"
  player-death: "Player **#{player}** died!"
  player-respawn: "Player **#{player}** respawned."
  player-kill-entity: "Player **#{player}** killed entity of type **#{type}**"
  player-kill-named-entity: "Player **#{player}** killed entity of type **#{type}**, named **#{name}**"