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

# config.yml

In the `config.yml` you will find essentially two sections:

* `pre-made-broadcasts`;
* `auto-broadcaster`.

{% tabs %}
{% tab title="Pre-made broadcasts" %}
Here you can set all the pre-made broadcasts you can send by using the command `/wb broadcastpremade <ID>`.

## ID

The ID is *case-sensitive* and it **must** be different from the others in order to not have any kind of error.

## Message

Here you can write all the lines of the broadcast message; `!actionbar!` and `!title!` are supported.

A word or an entire sentence of a line can be replaced, for example, with a word using r[egular expressions (regex)](https://www.codesmith.io/blog/understanding-regex#:~:text=A%20Regex%2C%20or%20regular%20expression,any%20character%20combination%20in%20strings.) when using the command in order to have a sort of *custom placeholders*.

To do this you just have to add another argument at the end of the `/wb bcpremade` command.\
This argument will be divided in two parts by using a `:`, the regex and the replacement.\
Considering that the `:` is used to split the argument, you can't use it neither in the regex nor in the replacement; if you need to use it you can use the escape key `\:` instead if you need to put a space between two words use `\\`.

Then the command will be: `/wb broadcastpremade <ID> [regex:replacement]`.

If you need to do more than one replacement just add another argument following always the same format.

## Permissions

Here you can write a list of permissions where a player must have at least one in order to receive the broadcast.

## Worlds

Specify a list of worlds' names in which players can receive the broadcast.

## Players

Specify which players can receive the broadcast.
{% endtab %}

{% tab title="Auto-broadcaster" %}
In this section of the config you can set how the auto-broadcaster will work.

## Enabled

Decide if the auto-broadcaster is enabled (`true`) or not (`false`).\
You can do this also using the [autobroadcaster command](/worstbroadcaster/commands/autobroadcaster.md).

## Random

Whether or not the broadcasts sent will be in order as in the config or randomly.

## Period

Set how many seconds have to pass between each broadcast.

## Broadcasts

The ID list of the broadcasts you want to send.

### ID

The ID (*case-sensitive*) of the broadcast, each one **must** be different from the others.

### Message

The actual message which will be sent to the players.

### Date

Optional section where you can set various date-related requirements the broadcast must meet.

#### week-of-year

When set, the broadcast will be sent to players only if it is the specified week of the year.

#### week-of-month

When set (1-5), the broadcast will be sent to players only if it is the specified week of the month.

#### day-of-year

When set (1-365), the broadcast will be sent to players only if it is the specified day of the year.

#### day-of-week

When set (1-7), the broadcast will be sent to players only if it is the specified day of the week.

#### year

When set, the broadcast will be sent to players only if it is the specified year.

#### month

When set (1-12), the broadcast will be sent to players only if it is the specified month of the year.

#### day

When set (1-31), the broadcast will be sent to players only if it is the specified day of the month.

#### hour

When set (0-23), the broadcast will be sent to players only if it is the specified hour of the day.

#### minute

When set (0-59), the broadcast will be sent to players only if it is the specified minute of the hour.

### Permissions

Here you can write a list of permissions where a player must have at least one in order to receive the broadcast.

### Worlds

Specify a list of worlds' names in which players can receive the broadcast.

### Players

Specify which players can receive the broadcast.
{% endtab %}
{% endtabs %}

```yaml
##############################################
#                                            #
#       WorstBroadcaster Configuration       #
#        Plugin developed by Ceduz19         #
#                                            #
##############################################
#Wiki: https://worstplugins.gitbook.io/worstbroadcaster/
#All color codes are supported: &f, &0, &b.
#To use a hex color follow this format: &#000000
#To make a gradient follow this format: !#000000>!GRADIENT!#ffffff<!
#To send an actionbar or title message put !actionbar! or !title! at the beginning of the message.

pre-made-broadcasts: []
  ### The ID of the broadcast (each ID must be different from the others - IDs are case-sensitive).
  #example:
  ### Set the broadcast message which will be sent (can use !actionbar! or !title! to send correspondingly an actionbar
  #    or a title message).
  #  message:
  #    - "&7------"
  #    - "&bThis is an example of a"
  #    - "&dPre-made Broadcast&b!"
  #    - ""
  #    - "&7&oMade by %author%."
  #    - "&7------"
  ## Regex:Replacement feature explanation:
  # When using the pre-made broadcast command you can replace particular words (or characters) with others.
  # This gives the opportunity to make 'custom placeholders' that can be replaced, using regular expressions (regex),
  # with a word or a sentence depending on the situation.
  # ————
  # In the message above we can replace, for example, %author% to be the actual name of who is sending the broadcast.
  # To do this we have to do the following command: /wb bcpremade example %author%:Ceduz19
  # Doing that the broadcast sent will display 'Ceduz19' instead of '%author%'.
  # ————
  # You can do more than 1 replacement at time (/wb bcpremade <ID> [regex1:replacement1] [regex2:replacement2] ...), indeed
  # it is possible to make various regex-replacements, there is no limit.
  # To make more complex replacements you can use regular expressions which are very useful (tutorials on how to use them
  # can be found on the internet).
  #
  ### The message will be sent to the players who have at least one of these permissions.
  #  permissions:
  #    - "example.permission"
  ### Specify in which worlds the broadcast can be received.
  #  worlds:
  #    - "exampleWorld"
  ### Specify which player can receive the broadcast.
  #  players:
  #    - "Ceduz19"

auto-broadcaster:
  #Wheter or not the Auto-Broadcaster is active.
  enabled: false
  #Wheter or not the broadcasts will be sent randomly.
  random: false
  #How many seconds have to pass until another broadcast is sent.
  period: 60
  broadcasts: []
    #### The ID of the broadcast (each ID must be different from the others - IDs are case-sensitive).
    #example:
    #  message:
    #    - ""
    #    - "&bThis is an example of an automatic broadcast."
    #    - ""
    #### Section dedicated to all date-related requirements of the broadcast in order to be sent.
    #  date:
    #
    #### The 3 following options are generic time requirements useful if is needed a broadcast sent in a specific
    #### week/day of the month/year instead of specifying each day.
    #
    ### Specify in which week of the year the broadcast can be sent.
    #    week-of-year: <number>
    #
    ### Specify in which week of the month (1-5) the broadcast can be sent.
    #    week-of-month: <number>
    #
    ### Specify in which day of the year (1-365) the broadcast can be sent.
    #    day-of-year: <number>
    #
    ### Specify in which day of the week (1-7) the broadcast can be sent.
    #    day-of-week: <number>
    #
    #### The 5 following options are more specific and permit to send the broadcast only in a specific year, month, day,
    #### hour or minute (if you set all of these options the broadcast will be sent only in a specific date at a specific hour).
    #
    ### Specify in which year the broadcast can be sent.
    #    year: <number>
    #
    ### Specify in which month (1-12) the broadcast can be sent.
    #    month: <number>
    #
    ### Specify in which day (1-31) the broadcast can be sent.
    #    day: <number>
    #
    ### Specify in which hour (0-23) the broadcast can be sent.
    #    hour: <number>
    #
    ### Specify in which minute (0-59) the broadcast can be sent.
    #    minute: <number>
    #
    ### The message will be sent to the players who have at least one of these permissions.
    #  permissions:
    #    - "example.permission"
    ### Specify in which worlds the broadcast can be received.
    #  worlds:
    #    - "exampleWorld"
    ### Specify which player can receive the broadcast.
    #  players:
    #    - "Ceduz19"
```
