Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application: XKCD #9

Open
lcox74 opened this issue Apr 9, 2024 · 0 comments
Open

Application: XKCD #9

lcox74 opened this issue Apr 9, 2024 · 0 comments
Labels
application An application request good first issue Good for newcomers

Comments

@lcox74
Copy link
Contributor

lcox74 commented Apr 9, 2024

XKCD comics have been a long-standing favorite among tech enthusiasts, developers, and other tragics in the community for their humor, insight, and commentary on technology and science. So lets bring the XKCD back to our community by adding the XKCD comic fetch command for our Discord bot. This feature would enable users to retrieve and share XKCD comics directly within the chat, either at random or by specifying a particular comic number.

Feature Requirements:

  • Random Comic Retrieval: By default, executing the command without any parameters should fetch a random XKCD comic. This allows for spontaneous sharing and discovery of comics, adding an element of surprise and engagement within the community.

  • Specific Comic Selection: Users should have the option to specify a comic number to retrieve a particular XKCD comic. This feature is crucial for sharing favorite comics or referencing specific topics discussed within the community.

  • Command Syntax Example: /xkcd [number]. When no number is specified, the bot fetches a random comic. If a number is given, the bot retrieves the comic corresponding to that number.

  • Embed Comic Display: The comics should be displayed directly in the chat through Discord's embed functionality, ensuring that users can easily view the comic without needing to follow a link. The embed should include the comic title, the image, and optionally, the alt text as a footer.

Implementation Considerations:

  • API Usage and Rate Limiting: Utilise the official XKCD API to retrieve comic data. Be mindful of potential rate limits and implement some form of caching to reduce the number of requests and enhance response times for frequently requested comics.

  • Error Handling: Implement robust error handling to manage cases where the specified comic number does not exist or when the XKCD API is unreachable. Provide informative feedback to users in such scenarios.

@lcox74 lcox74 added good first issue Good for newcomers application An application request labels Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application An application request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant