GroupMe Bots

From Pabut
Jump to navigation Jump to search

First you need to login to the GroupMe developer site and create a bot ID, The URL is:

  • Click the "Bots" link. (login with your normal GroupMe credentials)
  • Click the "Create Bot" button.
  • Select the group you want to use the bot in, give it a name, optionally give it a URL for an avatar (graphic). You can ignore "Callback URL".

You'll be presented with a page for your new bot. Make note of the "Bot ID" At this point you're done setting up GroupMe for your bot.

Now you need to run you're bot somewhere. I run my bots on a linux box in may basement. If you're looking to do this with Windows ... go away kid kid you're bothering me ...

I created this script to make using bots as easy as possible. You can set it up in cron or trigger it on some sort of external event.

You simply pass it the message you want to send in quotes along with the bot id:

./post-group-me.bash "Hello, World!" 12345671234567

you can easily call this from a cron job like this:

15 18 3,10,17 9 * /home/user/post-group-me.bash "KC2WCQ Robert time to renew your license" 12345671234567

A more complicated bot is the "countdown bot" that you can pass a time of an event to and get the number of days, or as the event gets close hours, till the event. That bot is called this way:

/home/user/generic-group-me.bash "2019-07-14 12:00:00" "Sussex Hamfest (a.k.a. K2FN's Birthday Extravaganza)" 12345671234567

The date must be in the format above. It is passed to the UNIX date command unedited.