Skip to content

feat: xckd #3

@prdrj

Description

@prdrj

When user triggers xkcd with a comic id, the bot should reply with an embed of the title, image and possibly alt text.

This can be achieved by simply fetching metadata already provided as a json interface by xkcd.

Sample json:

{
   "month":"5",
   "num":3242,
   "link":"",
   "year":"2026",
   "news":"",
   "safe_title":"Aperiodic Table",
   "transcript":"",
   "alt":"Scientists occasionally invent alternative periodic table layouts, which is usually a sign that they don't have enough enrichment in their enclosures.",
   "img":"https://imgs.xkcd.com/comics/aperiodic_table.png",
   "title":"Aperiodic Table",
   "day":"
}

Sample Usage:

User:

$xkcd 3242

Bot:

"Aperiodic Table"
[embed image]
Alt: "Scientists occasionally invent alternative periodic table layouts, which is usually a sign that they don't have enough enrichment in their enclosures."

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions