Skip to content

Add Random Joke Generator Feature to WhatsApp ChatGPT #386

Description

@zparie96-afk

Feature: Random Joke Generator Integration

Integrate a random joke generator feature into the WhatsApp ChatGPT bot that fetches and displays random jokes via an external API when users request them.

Overview

Users should be able to request random jokes from the WhatsApp ChatGPT bot, which will fetch jokes from a public joke API (e.g., JokeAPI or Official Joke API) and deliver them through WhatsApp messages.

Requirements

  • Integrate external joke API (JokeAPI or similar)
  • Add command handler for joke requests (e.g., /joke or similar)
  • Parse and format joke responses for WhatsApp messages
  • Handle API errors gracefully
  • Support multiple joke categories if available
  • Add proper error logging

Implementation Details

  • Use JavaScript's fetch() API or appropriate HTTP client for the bot framework
  • Ensure jokes are formatted clearly for WhatsApp display
  • Consider rate limiting for API calls
  • Test with various joke types and edge cases

Testing

  • Test joke fetching functionality
  • Test error handling (API down, rate limits)
  • Test WhatsApp message formatting
  • Verify bot responsiveness

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions