Find out where a colleague is (if they’ve let you know).
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.”);