Find out where a colleague is (if they’ve let you know).
About Abbot
Abbot is a programmable bot that turns your team chat into a shared command center. We handle all the boilerplate of building and running these conmmands so that you can focus on making tools that help you ship faster.
We built Abbot because we saw the power of this style of work (called ChatOps), when we worked at GitHub. ChatOps made it possible for GitHub to work productively without meetings, while globally distributed. We think it’s a pretty great way to work, so we made it easy to use in Slack, Discord, and Microsoft Teams.
You can read more about Abbot here, check out our blog, or take a look at some of the other cool packages available as a one-click install from Abbot’s Package Directory.
README
Where are your colleagues? Abbot can tell you! This skill tells you where your peers are if your peers allow it by telling Abbot their location.
Usage Examples
@abbot where am I
– tells you where Abbot thinks you are.
@abbot where is @haacked
– tells you where @haacked is, if @haacked set their location.
To set your location, use the built-in my
skill like so: @abbot my location is {zip or address}
Usage
@abbot where am I
– tells you where Abbot thinks you are. Set your location via @abbot my location is {zip or address}
@abbot where is @haacked
– tells you where @haacked is, if @haacked set their location.
Code
if (mention is IMissingArgument) {
mention = verb; // Assume user omitted verb.
}
if (mention is IMentionArgument mentionArg) {
var person = mentionArg.Mentioned;
if (person.Location is null) {
var message = $”I do not know where {person} is. They can set their location by telling me: `{Bot} my location is {{Address or zip}}.”;
return;
}
await Bot.ReplyAsync($”{person} is at {person.Location.FormattedAddress}.”);
return;
};
if (mention.Value is “I” or “I?”) {
if (Bot.From.Location is null) {
await Bot.ReplyAsync($”I do not know your location. You can tell me with `{Bot} my location is {{zip or address}}`.”);
return;
}
await Bot.ReplyAsync($”You are at {Bot.From.Location.FormattedAddress}. Use `{Bot} my location is {{Address or Zip}}` to update your location.”);
return;
}
await Bot.ReplyAsync($”Try `{Bot} help where` to learn how to use where.”);