RinZJ / better-discord-loot-logger

BSD 2-Clause "Simplified" License
0 stars 9 forks source link

Fix allows multiple webhooks, seperated by commas #20

Closed Waldxn closed 1 year ago

Waldxn commented 1 year ago

This pull request allows multiple discord webhooks to be used. Currently it is only possible to use 1 webhook at a time.

Fixes #10 and #19

Changes Made ArrayList<String> urls = new ArrayList<>(Arrays.asList(configUrl.split("\\s*,\\s*")));

This code splits the webhooks into an array The array of urls is then looped through, and sent to each webhook.

I've tested using between 1-3 webhooks separated by commas, and all function without error.

janne-kemppainen commented 1 year ago

If I put 2 webhooks separated by commas, it doest work at all. My example that DOES NOT work:

https://discord.com/api/webhooks/1111111111111/asd111asd111asd111, https://discord.com/api/webhooks/2222222222222/asd222asd222asd222

What I am doing wrong?

janne-kemppainen commented 1 year ago

nevermind its working now!