> For the complete documentation index, see [llms.txt](https://foresttech.gitbook.io/discordsender/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://foresttech.gitbook.io/discordsender/setup/config.yml.md).

# config.yml

### Language

You can edit the messages file using this setting in your config file. Plugin supports english by default, but you can add your custom language by adding `messages_<tag>.yml` file.

```yaml
lang: en
```

### Special Placeholders (Space & New Line)

Because the plugin works command-based, some of the feartures are limited due to commands' behaviour. If you want to parse multi-word arguments to command, you need to replace space with placeholder. You can set the placeholders' values here.

```yaml
# In case you want to pass multi-word arguments, you need to use this placeholder instead of regular space
# This is because plugin cannot differ between more arguments or one multi-word argument.
# Example: Instead of 'This is test text' you need to use 'This#is#test#text'
spacePlaceholder: "#"
# In case you want to split the line, you can use this placeholder.
# Example: 'Line1:n:Line2'. You can combine it with spaces (see above).
newLinePlaceholder: ":n:"
```

### Default Webhook URL

If you don't define webhook, it will use this instead.

{% hint style="info" %}
You can use `NONE` if you want to remove defaultWebhook feature!
{% endhint %}

```yaml
# Default webhook used when no-one is defined. Can be set to "NONE", if you don't want default webhook.
defaultWebhook: "https://discord.com/api/webhooks/XXX/YYY"
```

### Default Color (RGB)

If no color is defined for the message, this color will be used.

```yaml
# Here you can define default color, if no-one is defined.
defaultColor:
  red: 255
  green: 0
  blue: 0
```

### Webhooks

Here you can define your webhooks. You can put there as many as you want. Names are then used in the `messages` section.

```yaml
# List of your webhooks. You can add as many as you want. Names are then used in messages section below.
webhooks:
  global_chat: "https://discord.com/api/webhooks/XXX/YYY"
  staff_chat: "https://discord.com/api/webhooks/XXX/YYY"
```

### Messages

The point of this plugin is to let servers' administrators to pre-define their own messages and then send them using simple command.

This is the place, where your messages belongs.

{% hint style="info" %}
Player can use the messages only if they have permission:\
\- `discordsender.use.<name>`
{% endhint %}

{% hint style="warning" %}
If you don't know how embed looks like, you can prepare it using this online tool: <https://autocode.com/tools/discord/embed-builder/>
{% endhint %}

{% tabs %}
{% tab title="webhookName" %}
Name of the webhook defined in `webhooks` list.
{% endtab %}

{% tab title="basicMessage" %}
If you do **not want to use embeds** and **you just need to send regular-looking message**, use this option. Please note that other variables except webhookName won't be used!
{% endtab %}

{% tab title="color" %}
Color of the message's embed in RGB format.
{% endtab %}

{% tab title="description" %}
Description of the message's embed.
{% endtab %}

{% tab title="imageUrl" %}
URL to the image shown below the embed.
{% endtab %}

{% tab title="thumbnailUrl" %}
URL to small thumbnail placed into the embed.
{% endtab %}

{% tab title="author" %}
Information about author.
{% endtab %}

{% tab title="title & footer" %}
Title and footer of the embed message.
{% endtab %}

{% tab title="fields" %}
**inline**: whether the field shall be inline

**title**: title of the field

**text**: text of the field
{% endtab %}
{% endtabs %}

{% hint style="danger" %}
You can remove most of the lines if you don't want them! Look at the **short\_example** message!&#x20;
{% endhint %}

```yaml
# List of your messages. In 'full_example' you can see every feature it contains.
# Placeholders %arg_<number>% and %all_args% can be used. These are replaced by the plugin when using command.
#
# INGAME USAGE:
#
# Syntax:     /dsend send <message_name> <arg_1> <arg_2> ... <arg_x>
# Permission: discordsender.use.<message_name>
#
# NOTE! Use 'NONE' if you don't want to set the option, or just remove the line!
#
# Every line below is removable except message_name!!! But be careful, see examples before.
messages:
  # This is an example of short message with only basic content. No embeds.
  # If you want to try this example: /dsend send basic_example <banned_user> <banned_user>
  basic_example:
    basicMessage: "Player %arg_1% was banned! This will look like normal message - no embeds."
  # This is an example of short message with only basic features. For explanation of individual
  # fields, check full example below or our wiki page: https://foresttech.gitbook.io/discordsender
  # If you want to try this example: /dsend send short_example <banned_user> <banned_user>
  short_example:
    description: "Player %arg_1% was banned for %arg_2%!"
    title:
      text: "Banned! [**%arg_1%**]"
    footer:
      text: "Do NOT break the rules! It's not worth it!"
  # This is an example of full feature usage. You can see every possible options. You can remove any option you want.
  # But be careful with what are you doing.
  # If you want to try this: /dsend send full_example <player> <event_name> <starting_in>
  full_example:
    # If you remove this line or set it to 'NONE', default webhook will be used.
    webhookName: "global_chat"
    # Color of the embed (RGB)
    color:
      red: 20
      green: 200
      blue: 20
    # Description of the embed
    description: "Event was announced! It is held by **%arg_1%**!"
    # URL to image under the embed
    imageUrl: "NONE"
    # URL to small image displayed inside the embed
    thumbnailUrl: "https://minotar.net/avatar/%arg_1%/100.png"
    # Set properties of author. You can remove this section if you don't want to display author.
    author:
      text: "*Held by: %arg_1%*"
      iconUrl: "NONE"
      url: "NONE"
    # Set the title. You can remove 'url' line, or set it to NONE if you want.
    title:
      text: "Event starting soon!"
      url: "https://google.com"
    # Self explaining.
    footer:
      text: "Be careful and join as soon as you can!"
      iconUrl: "NONE"
    # List of fields. You can add as many as you want.
    # If you don't want to use fields, remove this section completely.
    fields:
      my_field:
        # Shall the field be inline?
        inline: false
        title: "Event Type:"
        text: "%arg_2%"
      my_field_2:
        inline: false
        title: "It will start:"
        text: "in %arg_3%"
```
