[GH-ISSUE #82] Cleanup WEBHOOK_URLs in Environment Variables #16

Closed
opened 2026-09-02 13:08:57 +02:00 by TheLovinator · 1 comment
Owner

Originally created by @EthanC on GitHub (Mar 31, 2023).
Original GitHub issue: https://github.com/TheLovinator1/discord-twitter-webhooks/issues/82

In addition to the recent .env improvements (github.com/TheLovinator1/discord-twitter-webhooks@370b30688a), perhaps RULE2-RULE5 could default to WEBHOOK_URL if WEBHOOK_URL2-WEBHOOK_URL5 are not set? This change would avoid the need to have the same webhook listed multiple times in config.

Example:

WEBHOOK_URL="https://discord.com/api/webhooks/1234567890/XXXXXXXXXX"
WEBHOOK_URL2="https://discord.com/api/webhooks/1234567890/XXXXXXXXXX"
WEBHOOK_URL3="https://discord.com/api/webhooks/1234567890/XXXXXXXXXX"
WEBHOOK_URL4="https://discord.com/api/webhooks/1234567890/XXXXXXXXXX"
WEBHOOK_URL5="https://discord.com/api/webhooks/1234567890/XXXXXXXXXX"
RULE="a rule at character limit"
RULE2="character limit forces a new rule"
RULE3="but we want all tweets to 1 webhook"
RULE4="so the webhook is listed 5 times"
RULE5="when it could just be 1 :)"

to

WEBHOOK_URL="https://discord.com/api/webhooks/1234567890/XXXXXXXXXX"
RULE="only 1 webhook is listed"
RULE2="but all rules will send tweets to it"
RULE3="this makes for"
RULE4="more maintainable config"
RULE5="thanks"

Related: #79

Originally created by @EthanC on GitHub (Mar 31, 2023). Original GitHub issue: https://github.com/TheLovinator1/discord-twitter-webhooks/issues/82 In addition to the recent `.env` improvements (https://github.com/TheLovinator1/discord-twitter-webhooks/commit/370b30688a8635dd0ecb4ec2428de66672b02643), perhaps `RULE2`-`RULE5` could default to `WEBHOOK_URL` if `WEBHOOK_URL2`-`WEBHOOK_URL5` are not set? This change would avoid the need to have the same webhook listed multiple times in config. Example: ```ini WEBHOOK_URL="https://discord.com/api/webhooks/1234567890/XXXXXXXXXX" WEBHOOK_URL2="https://discord.com/api/webhooks/1234567890/XXXXXXXXXX" WEBHOOK_URL3="https://discord.com/api/webhooks/1234567890/XXXXXXXXXX" WEBHOOK_URL4="https://discord.com/api/webhooks/1234567890/XXXXXXXXXX" WEBHOOK_URL5="https://discord.com/api/webhooks/1234567890/XXXXXXXXXX" RULE="a rule at character limit" RULE2="character limit forces a new rule" RULE3="but we want all tweets to 1 webhook" RULE4="so the webhook is listed 5 times" RULE5="when it could just be 1 :)" ``` to ```ini WEBHOOK_URL="https://discord.com/api/webhooks/1234567890/XXXXXXXXXX" RULE="only 1 webhook is listed" RULE2="but all rules will send tweets to it" RULE3="this makes for" RULE4="more maintainable config" RULE5="thanks" ``` Related: #79
Author
Owner

@TheLovinator1 commented on GitHub (Jul 16, 2023):

This is no longer relevant because of the rewrite, so closing.

Thanks <3

<!-- gh-comment-id:1636965721 --> @TheLovinator1 commented on GitHub (Jul 16, 2023): This is no longer relevant because of the rewrite, so closing. Thanks <3
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TheLovinator/discord-twitter-webhooks#16
No description provided.