A program to post a random XKCD image to Slack or Slack-compatible webhooks (currently tested and verified: Mattermost, Discord).
Written for personal use and for learing Go.
Usage:
-help
print this help and exit
-message string
(optional) an additional message to post before the image
-webhook string
the URL of the webhook to post the image to
./xkcd-image-bot -webhook-url https://my.private-mattermost.xyz/hooks/{webhook-id}
./xkcd-image-bot -webhook-url https://my.private-mattermost.xyz/hooks/{webhook-id} -message "good morning!"
./xkcd-image-bot -webhook-url https://hooks.slack.com/services/{webhook-id}
./xkcd-image-bot -webhook-url https://discord.com/api/webhooks/{webhook.id}/{webhook.token}/slack -message "hello, world!"
If you find any bugs, please report them via Github.