stormbot/modules/joke/joke.sh

6 lines
247 B
Bash
Raw Normal View History

2017-04-06 21:18:52 -04:00
[ -f functions.sh ] && source functions.sh
2017-05-20 11:10:07 -04:00
joke="$(curl -s --connect-timeout 5 'https://thatsagooden.tk/?api=txt&type=all&exclude=sex,little_johnny')"
joke="${joke//[[:space:]]/ }"
2017-05-20 11:10:07 -04:00
[ -n "$joke" ] && msg "$2" "$joke" || msg "$2" "No jokes found."