A slack slash command for logging availability time of team members.
/stb in: to tell the bot you are in.
/stb out: to tell the bot you are out.
/stb out since 30m2h1d: to tell the bot you are out since a certain tstbe in case you forgot to tell the bot about it at first.
/stb out for food: to attach a reason for why you are out.
/stb status [user]: show information about [user].
/stb status all: show information users who are in and the last ones out.
/stb status me: show information about you.
/stb status in: show currently in users.
/stb status out: show lastest out users.
/stb history me: show 20 lastest history for current user.
/stb history all: show 20 lastest history for all users.
/stb history [user]: show 20 lastest history for [user].
/stb history [me|all|user] full: show full saved log in current channel.
/stb history [me|all|user] [1i2h3w4h|5l]: full saved log in current channel from 1 minute, 2 hours, 3 weeks, 4 months ago OR lastest 5 connections.
/stb init [current_channel_name]: to initialize a channel for tstbe logging.
/stb set tstbezone +-x: set tstbezone for current to +-x GMT.
/stb enable: enable current channel.
/stb disable: disable current channel.
Clone this repo to an accessible folder in your server (example: https://example.com/slack-time-bot/).
Make a new
slacktimeBot.sql, change database information in:
Go to my.slack.com/services/new/slash-commands, add a new
slashcommand, point URL to ( https://example.com/slack-time-bot/slacktimebot.php ) and choose
timeBot.class.phpfrom step 3).
And that's it.