twitterbot-dadjokes

A novelty bot written in PHP to respond to @-mention "dad joke" requests.


Project maintained by zaskem Hosted on GitHub Pages — Theme by mattgraham

Twitter “Dad Joke” Bot

IMPORTANT NOTE: The Twitter “Dad Jokes” Bot was officially shut down in late June, 2023 due to Twitter’s API changes. As a result this repository has been archived and under no further development.

The dad joke bot was developed in an afternoon-and-a-half as a novelty bot/project by @zaskem on being inspired by the discovery of the fatherhood.gov Dad Joke API.

Technically this API isn’t documented; h/t to Matt Henry’s discovery.

The live bot’s data is sourced from the fatherhood.gov Dad Joke API on demand (the full joke list refreshes no more than once daily). The bot monitors for new @-mentions containing the text dad and/or joke on a five minute interval. Newly discovered and matching tweets each receive a randomly-selected dad joke response.

For example, the following @-mention:

Hey @dadjoke_genbot, tell me a dad joke!

Will result in a tweet response like such:

.@matt_zaske, Hear about the guy that stayed up all night wondering where the sun had gone?

It finally dawned on him. #DadJokes

The GitHub repo contains the basics for getting started with the bot in your own environment.

Final update July, 2023

In late June, 2023, Twitter’s new API access silently took effect, rendering the bot inactive by virtue of not allowing for Tweet searches. On June 28, 2023, the bot services were officially shut down and archived on the managing server. This repository has been archived and under no further development.

I have no intention of deleting the Twitter bot account itself, so past activity of the dad joke bot will live on as long as Twitter does (unless/until the account is deleted by Twitter).