http image links in trivia #944

Closed
opened 2017-08-23 08:36:19 +02:00 by petzku · 7 comments
petzku commented 2017-08-23 08:36:19 +02:00 (Migrated from github.com)

Some trivia question sets (such as dota2abilities and dota2items) use http to link to images, not https. This means embeds aren't shown in Discord.

Should be easy to fix by just bulk replacing http(?!s) with https.

Some trivia question sets (such as dota2abilities and dota2items) use http to link to images, not https. This means embeds aren't shown in Discord. Should be easy to fix by just bulk replacing `http(?!s)` with `https`.
petzku commented 2017-08-23 08:39:51 +02:00 (Migrated from github.com)

If trivia questions are going to be just removed from the repo (as suggested in #917), this can maybe be ignored.

If trivia questions are going to be just removed from the repo (as suggested in #917), this can maybe be ignored.
palmtree5 commented 2017-08-24 22:23:20 +02:00 (Migrated from github.com)

Just checked, with one image selected from one of those lists, the image still doesn't show up even if one uses https instead of http

Just checked, with one image selected from one of those lists, the image still doesn't show up even if one uses https instead of http
palmtree5 commented 2017-08-24 22:25:15 +02:00 (Migrated from github.com)

Another thing: The cars list works just fine using http and not https

Another thing: The cars list works just fine using http and not https
MiniJennJenn commented 2017-08-24 22:37:46 +02:00 (Migrated from github.com)

Well the problem seems to be only in dota2abilities and dota2items which means it's not simply an https issue. For example, the cars trivia. Will look more into it though. All the other image based trivias don't seem to have any issues.

Awk: didn't refresh page and see palm's responses. oops

Well the problem seems to be only in dota2abilities and dota2items which means it's not simply an https issue. For example, the cars trivia. Will look more into it though. All the other image based trivias don't seem to have any issues. Awk: didn't refresh page and see palm's responses. oops
sverit commented 2017-09-11 12:38:13 +02:00 (Migrated from github.com)

tl;dr: Remove the "h" right before the ".png" in the imgur links from the dota2abilities.txt and dota2items.txt and the image previews should work fine in discord. (Search/replace "h.png" with ".png").

Explanation:
The problem is actually a combination of the imgur links and discord, as it affects only those imgur links which do not work when the filetype extension is left out.

Example (from the dota trivia):

Every imagelink in the two dota files has the smallcaps "h" at the end. I don't know why, but this small change should fix it. HTH.

**tl;dr:** Remove the "h" right before the ".png" in the imgur links from the dota2abilities.txt and dota2items.txt and the image previews should work fine in discord. (Search/replace "h.png" with ".png"). **Explanation:** The problem is actually a combination of the imgur links and discord, as it affects only those imgur links which do not work when the filetype extension is left out. Example (from the dota trivia): - https://i.imgur.com/ZUB9LCIh.png <br/>Direct link used in the trivia file. Works when opened in a browser as a link, but has no preview in discord. - https://i.imgur.com/ZUB9LCIh <br/>Removing only the filetype extension gives a 404 (this seems to be the reason for the missing preview in discord). - https://i.imgur.com/ZUB9LCI and https://i.imgur.com/ZUB9LCI.png <br/>Removing the "h" at the end of the filename actually works (with filetype extension and without). This is the normal behaviour for imgur links. Every imagelink in the two dota files has the smallcaps "h" at the end. I don't know why, but this small change should fix it. HTH.
MiniJennJenn commented 2017-09-11 23:52:48 +02:00 (Migrated from github.com)

Oh interesting. Nice catch. I'll go patch that one in. Thanks a lot!

Oh interesting. Nice catch. I'll go patch that one in. Thanks a lot!
Kowlin commented 2017-09-19 13:15:11 +02:00 (Migrated from github.com)

Fixed in #973, expecting merge. Closing this prematurely.

Fixed in #973, expecting merge. Closing this prematurely.
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
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
Mrcoolgamer11/Red-DiscordBot#944
No description provided.