bugkrusha / camille Goto Github PK
View Code? Open in Web Editor NEWA dope bot for iOS Folks
A dope bot for iOS Folks
As per this conversation, it would be good to let users issue a command like @camille dupe delete
(or a better name) to delete the duplicate link warning when they've been asked to move a message to another channel.
Ideally there should be some logic to detect that it's about a duplicate link, and not other messages Camille sends.
Even when users are simply referring to a URL as a URL rather than the content it may load, Camille still detects and deduplicates the usage. It would be great if it could separate actual links (can that be determined from Slack's parsing?) from URLs referred to as code (e.g. apple.com
).
Some query parameters don't make a difference in the page being linked to and should be ignored when Camille when checking if the link had already been posted.
Of course other query parameters could make the link point to a different article so we should not ignore them all, just a select few.
Typical cases we should ignore:
?s=21
in links to Twitter postsutm_
parametersSimilarly, common URL shorteners, like youtu.be/xyz
for youtube.com/watch?v=xyz
point to the same video and should be considered the same link.
One way to do that would be to look at the canonical URL of the link instead of what the link looked like when posted, and use that canonical URL as the base for comparison.
Currently Camille will direct users to old conversations. Seeing this being used in practice for a bit, it's nice to have Camille redirect you to a recent conversation that's taken place but not that practical when the conversation is a week old, a month old, or even longer.
I recommend a 2-3 day cache eviction policy, but am open to other suggestions. In practice more days doesn't seem useful though.
There are a couple of positives to this.
The first is unification, and having one place to look for all of our handlers.
The second is that we can choose to have Camille respond in threads.
It'd be cool if Camille could announce the creation of new emoji: https://api.slack.com/events/emoji_changed
You might want to do some sort of coalescing in case an emoji is being edited (like, wait a couple of minutes just in case someone is doing a delete + add to fix a transparency issue or something), but listening for an emoji_changed
event should be pretty straight-forward.
From there, it'd be a matter of posting in the proper channel that:
Rejoice! @some_user has created the
:whatever:
emoji! :whatever:
If I type $AAPL
or $GOOG
or something, Camille should be able to recognize that as a stock symbol and produce a link to its details page, such as https://finance.yahoo.com/quote/AAPL?p=AAPL
Camille stores all points that have been earned through the entire history of the Slack. This is nice for people with a lot of points (myself included), but it can feel a bit unfair to people who are helpful but isn't particularly helpful for people who haven't been around the Slack for that long.
I'd like to throw out some ideas that could be used to create a more novel and fun points experience, and also solicit ideas from other people in the community.
Please leave your thoughts and submit your own ideas!
It'd be nice to be able to do @user ==
and have Camille respond with "@user has n points"
When you paste a piece of code that includes a link like apple.com
Camille warns you about a previous message that includes apple.com
.
Is it possible to not check for links if they're inside of a code snippet block?
Sometimes we'll want to ++ someone and say @user++ for being awesome
, and our bot will respond with @user has 32 points, 5 of which are for being awesome, 3 are because he's helpful, and 1 is just because
. These are aggregated based on the phrase added after the ++
. It would be neat if Camille supported this too.
When Jazbo requested top 10, Camille responded with:
We only have 10
- @bugKrusha : 1
- @IanKeen : 1
It’s also possible she was triggered by Soroush’s request for top users - it’s unclear.
Ignoring the second message should be easy via checking the message type for thread_broadcast
. The blocker on this is that message type is not currently supported by Chameleon.
The number 10 is arbitrary, but I'd like to introduce a max cap for how many points ++ can give a person to prevent people from inflating scores. It's not really a big deal, but the act of giving someone ++ is more about goodwill and charity than it is about the points themselves, so we should prevent it outrageous increments.
Camille will check for links in all the channels Camille is a member of, such as here. We should limit that functionality by checking if the channel Camille wants to reference is a private one before threading a message informing others that a link is being shared.
Camille already gives a friendly nudge if you say "hey guys" or "thanks guys." This feature could be expanded to include ableist terms, especially regarding mental health. Some examples include:
I'm not sure what kind of word stemming or searching would need to happen in order to avoid too many false positives 🤔
Camille should announce ... somewhere when new public channels are created, and include the channel purpose (if one has been set).
An admin should be able to "lock" a channel from new participation, after which new things that show up in the channel get auto-deleted by camille until the admin unlocks the channel
The link service is about coalescing conversations around recent topics. Documentation links are often shared repeatedly, and often shared by the same user who may be a subject matter expert over and over again. Generally, we think the users are aware they're sharing these kinds of links multiple times and it doesn't go against the general conversation goals.
So, we should update the link service to not chime in if the historical link reference is by the same user posting the current link.
note: This may be less of an issue once #26 is implemented. Though, it'll still be relevant but it could affect prioritization.
This is the message we've been using currently on Glitch.
SLACK_CODE_OF_CONDUCT_MESSAGE="<http://bit.ly/iosdevslack|To ensure we create and harbor a safe and considerate environment, please read over and accept our code of conduct before getting started.>"
SLACK_WELCOME_MESSAGE="*Welcome to the iOS Folks Slack*"
SLACK_CHANNELS_MESSAGE="We've got plenty of interesting channels, I recommend you take a look around <#C031NHW9G> for the complete list. Just for starters, there are channels on specific topics like <#C03FWU59B>, <#C0G0MMJ69>, <#C0AET0JQ5>, <#C035CBKML>, <#C031NHW9L>, <#C0JCNCX9Q>, and dozens more I haven't mentioned, including platforms like <#C0ACXUQ8L>, <#C035KA57R>, specific tools like <#C0HME659V> or <#C1SLCHYJJ>, and even locations like <#C031TFJL6>, <#C031X1P9Y>, and <#C2YNS1V88>."
SLACK_META_MESSAGE="Discussion about the Slack happens in <#C04CKSRK1>, so if you have any ideas or even think there's a good channel to add, post in there and we'll be happy to further the discussion."
SLACK_OUTRO_MESSAGE="Most importantly, be nice, have fun, and welcome! 👋🏼:"
Sending the messages in this order.
send_intro_message(event, SLACK_WELCOME_MESSAGE);
send_intro_message(event, SLACK_CHANNELS_MESSAGE);
send_intro_message(event, SLACK_META_MESSAGE);
send_intro_message(event, SLACK_OUTRO_MESSAGE);
send_code_of_conduct_message(event);
When Camille is triggered for an adjustment, the code in here makes her respond with name + positiveComment + count
Could be nice to have a way to make more flexible sentences, like "Congrats \(name), you have \(count) points now!"
. Maybe transforming the [String]
into [(String, Int) -> String]
to handle that?
Pluralization is the hardest problem in computer science, but since everyone's first point will look like this (or some variation thereof, see #9), we should take care to pluralize. I don't know if there's a good way to do proper localized pluralization, and I don't know if there's localization support in any of the toolchain right now, so a simple count == 1
check might do for now.
It'd be neat if Camille made it easy to do things like "Ask an Admin" or "Anonymously post a question in a channel"
I just did "@someuser++ https://example.com".
Camille got the initial karma+1 from me posting the message, but then did another one when example.com
was unfurled and the preview shown.
It would be nice to provide an API to Camille so that any client (outside of Slack) can send a request to Camille with a link in query, and get as reply if the link was already posted (and if so provide info about it like channel and link to message).
The main use case I can think of for that is to integrate Camille with iOS shortcuts. One could develop a shortcut to share a link from anywhere in iOS, and that shortcut could use that new API to check if the link was already posted before actually posting it.
This isn't a definitive list, but the current list of links I've come across which are unnecessary in Slack.
developer.apple.com/*
*.slack.com
github.com/*
youtube.com/*
If you post a link and then delete the message, the link remains cached and so Camille will respond by directing you to a deleted message.
Test case:
Post a link.
Delete the message.
Re-post the link.
See Camille respond.
People in #lost-hours often update the count in the channel topic whenever they're adding hours they spent that were wasted on something. It'd be nice to just say something like
@camille hours += 2.5
or something along those lines (the less typing required the better), so that camille could keep track of hours lost. It might not even need any serverside tracking if camille could just read the current total from the topic, make the numeric change and write the new topic back.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.