dominik-korsa / discord-integration

Spigot plugin that allows to sync messages in a Discord server and Minecraft chat
https://www.spigotmc.org/resources/discord-integration.91088/
MIT License
18 stars 3 forks source link

Handle channels and webhooks set by users as strings instead of string lists and the null default value #42

Closed dominik-korsa closed 9 months ago

dominik-korsa commented 2 years ago

While the config.yml in resources.yml looks like this:

chat:
  channels:
  # - 0123456789
  # - 01248163264128256
  webhooks:
  # - https://discord.com/api/webhooks/...

The one generated by Boosted YAML is actually (notice the null):

chat:
  channels: null
  # - 0123456789
  # - 01248163264128256
  webhooks: null
  # - https://discord.com/api/webhooks/...

Users often incorrectly place the string values in place of null, like this:

chat:
  channels: 43219876

  webhooks: discord.com/api/webhooks/...
RzFitz commented 2 years ago

What Would Be The Correct Way To Format It

dominik-korsa commented 2 years ago

It should instead look like this:

chat:
  channels: 
  - 43219876

  webhooks:
  - discord.com/api/webhooks/...
dominik-korsa commented 2 years ago

Converting strings to string lists has been fixed in 1e8179b67beca376a816e9245549d2d2c3d43b75, but the default values still appear as null and also the comments are stripped