[GH-ISSUE #85] Embed Customization Options Are Ignored #19

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

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

Following the recent .env rewrite (github.com/TheLovinator1/discord-twitter-webhooks@370b30688a), the following options are not properly set in their respective get_settings.py functions. The returned values will always be "", and I'm not sure truncation is needed for URLs?

  • EMBED_FOOTER_TEXT
  • EMBED_FOOTER_ICON
  • EMBED_IMAGE
  • EMBED_THUMBNAIL

Additionally, I noticed logging for EMBED_FOOTER_TEXT and EMBED_FOOTER_ICON is malformed as it does not make sense.

INFO  Twitter set to Twitter
INFO  https://i.imgur.com/6BAmj0I.png set to https://i.imgur.com/6BAmj0I.png

Lastly, I'd like to suggest defaults for two of these options, based on what the Discord client uses for Twitter link embeds.

  • EMBED_FOOTER_TEXT = Twitter
  • EMBED_FOOTER_ICON = https://abs.twimg.com/icons/apple-touch-icon-192x192.png
Originally created by @EthanC on GitHub (Apr 1, 2023). Original GitHub issue: https://github.com/TheLovinator1/discord-twitter-webhooks/issues/85 Following the recent `.env` rewrite (https://github.com/TheLovinator1/discord-twitter-webhooks/commit/370b30688a8635dd0ecb4ec2428de66672b02643), the following options are not properly set in their respective [`get_settings.py`](https://github.com/TheLovinator1/discord-twitter-webhooks/blob/master/discord_twitter_webhooks/get_settings.py) functions. The returned values will always be `""`, and I'm not sure truncation is needed for URLs? - `EMBED_FOOTER_TEXT` - `EMBED_FOOTER_ICON` - `EMBED_IMAGE` - `EMBED_THUMBNAIL` Additionally, I noticed logging for `EMBED_FOOTER_TEXT` and `EMBED_FOOTER_ICON` is malformed as it does not make sense. ``` INFO Twitter set to Twitter INFO https://i.imgur.com/6BAmj0I.png set to https://i.imgur.com/6BAmj0I.png ``` Lastly, I'd like to suggest defaults for two of these options, based on what the Discord client uses for Twitter link embeds. - `EMBED_FOOTER_TEXT` = `Twitter` - `EMBED_FOOTER_ICON` = `https://abs.twimg.com/icons/apple-touch-icon-192x192.png`
Author
Owner

@TheLovinator1 commented on GitHub (Apr 1, 2023):

Oops, I rewrote some parts of the code and forgot to readd that it sets the setting from the environment variable. I really need to add more tests that checks this.

I removed truncation completely and changed it so it shuts down the bot if footer text and author name is longer than the allowed amount. So it won't truncate URLs any more.

The default footer is now Twitter and the bird.

I also changed so that the bot uses the old environment variable if both are used instead of using the new one.

Thanks for all the help btw

<!-- gh-comment-id:1492816697 --> @TheLovinator1 commented on GitHub (Apr 1, 2023): Oops, I rewrote some parts of the code and forgot to readd that it sets the setting from the environment variable. I really need to add more tests that checks this. I removed truncation completely and changed it so it shuts down the bot if footer text and author name is longer than the allowed amount. So it won't truncate URLs any more. The default footer is now Twitter and the bird. I also changed so that the bot uses the old environment variable if both are used instead of using the new one. Thanks for all the help btw
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#19
No description provided.