http image links in trivia #944
Labels
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
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot#944
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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)withhttps.If trivia questions are going to be just removed from the repo (as suggested in #917), this can maybe be ignored.
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
Another thing: The cars list works just fine using http and not https
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
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):
Direct link used in the trivia file. Works when opened in a browser as a link, but has no preview in discord.
Removing only the filetype extension gives a 404 (this seems to be the reason for the missing preview in discord).
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.
Oh interesting. Nice catch. I'll go patch that one in. Thanks a lot!
Fixed in #973, expecting merge. Closing this prematurely.