This is a skill for giving your friends and colleagues ✨!
Give people :sparkles:
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.
This is a skill for giving your friends and colleagues ✨!
if (userArg is not IMentionArgument and {Value: “leaders”} or {Value: “leaderboard”}) {
// @abbot sparkle leaders
var allSparkles = await Bot.Brain.GetAllAsync();
var leaders = allSparkles.ToDictionary(
item => item.Key,
item => (item.Value as List<Sparkle>).Count)
.OrderByDescending(kvp => kvp.Value)
.Take(10)
.Select(kvp => $”{kvp.Key} with {kvp.Value} :sparkles:s”)
.ToMarkdownList();
await Bot.ReplyAsync(leaders);
return;
}
if (userArg is IMentionArgument mention) {
// @abbot sparkle @pmn
if (reasonArg is IMissingArgument) {
await SparkleAsync(mention.Mentioned, Bot.From, Bot.Room);
await Bot.ReplyAsync($”{mention.Mentioned} gets a :sparkles:!”);
return;
}
else {
// @abbot sparkle @pmn for being swell
if (reasonArg is IArguments reasonWords) {
if (reasonWords[0] is {Value: “for”}) {
(_, reasonWords) = reasonWords.Pop();
}
reasonArg = reasonWords;
}
await SparkleAsync(mention.Mentioned, Bot.From, Bot.Room, reasonArg.Value);
await Bot.ReplyAsync($”{mention.Mentioned} gets a :sparkles: for {reasonArg.Value}!”);
return;
}
}
if (userArg is {Value: “for”}) {
var sparklee = reasonArg is IMentionArgument user
? user.Mentioned
: reasonArg is {Value: “me”}
? Bot.From
: null;
if (sparklee is not null) {
var sparkles = await GetSparklesAsync(sparklee);
var sparkleList = sparkles.Select(FormatSparkle).ToMarkdownList();
await Bot.ReplyAsync($”:sparkles: Here’s who sparkled {sparklee} :sparkles:\n{sparkleList}”);
return;
}
}
// If we get here, Abbot didn’t understand what the user is trying to do.
await Bot.ReplyAsync($”Sorry, I didn’t understand that. `{Bot} help sparkle` to learn how to sparkle.”);
public class Sparkle {
// The one who sparkes
public string Sparkler { get; set; }
// The reason for which one is sparkled.
public string Reason { get; set; }
// The room in which one is sparkled.
public string Room { get; set; }
// The date (more or less) at which one is sparkled
public DateTime When { get; set; }
}
async Task SparkleAsync(
IChatUser sparklee,
IChatUser sparkler,
IRoom room,
string reason = null)
{
var sparkles = await GetSparklesAsync(sparklee);
var sparkle = new Sparkle {
Sparkler = sparkler.ToString(),
Reason = reason,
Room = room.Name,
When = DateTime.Now
};
sparkles.Add(sparkle);
await Bot.Brain.WriteAsync(sparklee.ToString(), sparkles);
}
async Task<List<Sparkle>> GetSparklesAsync(IChatUser sparklee) {
return await Bot.Brain.GetAsAsync<List<Sparkle>>(sparklee.ToString())
?? new List<Sparkle>();
}
string FormatSparkle(Sparkle sparkle) {
var reason = sparkle.Reason is {Length: > 0}
? sparkle.Reason
: “no reason in particular”;
return $”:sparkles: from {sparkle.Sparkler} for {reason}”;
}
Version | Created | Author | Release Notes | Installs |
---|---|---|---|---|
1.0.2 | 9/24/2021 |
![]() phil |
Fix a bug caused by a breaking change introduced to Abbot. The author of this skill apologizes for any inconvenience. |
10 |
1.0.1 | 8/17/2021 |
![]() Phil Haack |
Fixed a bug when creating a multi-word reason without prefacing it with the “for” preposition. |
4 |
1.0.0 | 2/19/2021 |
![]() phil |
This is the initial version as seen on Youtube! |
3 |
Not using Slack? No worries! Abbot works in Slack, Discord, and Microsoft Teams.
It’s free to get started!
ab.bot is a web platform serves as a comprehensive guide for Irish residents exploring online casinos and sportsbooks. We provide detailed insights and reviews to help you make informed decisions about online gambling. Your safety and well-being are our top priorities, which is why we emphasize thorough research and responsible gaming practices before you begin your online casino journey.
Gambling can be addictive, please play responsibly.
If gambling is negatively impacting your life, please contact Gamblingcare.ie from the phone number below
ab.bot is managed by Merri Media Agency. Unless declared otherwise, all of the visible content on this site, such as texts and images, including the brand name and logo, belongs to Beggie Labs (a Merri Media Agency company) - Company Registration Number C44120, VAT ID: MT1891432, @GIG Beach Triq id-Pragunafa, St. Martin, STJ1488, Malta.
Copyright © 2025 ab.bot