The /dadjoke command fetches a random dad joke from icanhazdadjoke.com and posts it publicly to the channel.
Usage
Parameters
This command has no parameters.
Behavior
When you run /dadjoke, the bot makes a request to the icanhazdadjoke.com API and posts the joke text as a public message in the current channel.
The response is not ephemeral — everyone in the channel can see the joke.
Retry logic
If the API request fails, the bot automatically retries up to 3 times using exponential backoff, starting with a 200ms delay between attempts. If all retries fail, the error is propagated and the command fails.
Effect.retry({
times: 3,
schedule: Schedule.exponential(200),
})
Permissions
No special permissions are required. Any server member can run /dadjoke.
Error cases
If the icanhazdadjoke.com API is unreachable and all 3 retry attempts fail, the command will fail with an error. No joke will be posted.