PyBites-Open-Source / karmabot

A Python based Slack Chatbot for community interaction
MIT License
73 stars 47 forks source link

Feature: Send karma update messages to a dedicated slack channel #103

Open JnyJny opened 2 years ago

JnyJny commented 2 years ago

Premise: It's fun handing out karma but it tends to be "noisy" in a channel, which can drown out some of the signal and make it difficult to scroll back in a channel and find threads. Also the amount of alerting that occurs that isn't really important could cause people to "ignore" channel updates and miss important stuff.

Feature: Have karmabot send karma updates to a #karma channel instead of the channel it's listening in, maybe expand the update message to:

In <channel>, <giver> boosted <receiver>'s karma to <new karma value>
In <channel>, <taker> dropped <receiver>'s karma to <new karma value>

People who want to monitor karma can subscribe to the channel, or pop in on it whenever the fancy strikes.

This could be a global option, or maybe an option per channel? I'd prefer global but can see an argument for a per channel option.

bbelderbos commented 1 year ago

Love this idea and it's needed now I am read this feedback:

... it always bugged me seeing unreads, hoping for some quality content and then discover it's just another karmabot post...

That is indeed annoying and needs fixing!

I will try to take a look at it. I recently set up the test slack so I have a way to test it first.

It's also fun to dive into this code base again since @pogross + team has really taken it to the next level!

bbelderbos commented 1 year ago

@JnyJny should these also go to this dedicated channel? Or maybe we remove this altogether?

image
bbelderbos commented 1 year ago

Looking at say() statements in src/karmabot/bot.py the change is pretty limited:

So it seems the scope of the change really is only in karma_action

Old: say(reply)

New: say(text=text, channel=new_log_channel)

new_log_channel to be defined and ideally be loaded from a config variable (similar to KARMABOT_ID = get_env_var("KARMABOT_SLACK_USER")).

I thought it could be useful to also send a DM to the user that their karma has been increased, but given that the at ping already triggers a notification that seems redundant.

JnyJny commented 1 year ago

IMHO, I'd take out anything that triggers karmabot to output something when it's not being specifically addressed.

I don't think DMing the karma target is good idea, it could be used to spam a target with tons of karma and a pile of DMs that are just noise.

pmayd commented 1 year ago

will have a look...when I am able to spin up the dev env for this. Good that I am on Mac now

ajkerrigan commented 1 year ago

Avoiding channel or DM spam seems good, though I could see adding reactions instead? Like an up arrow for karma bumps or 🍻 to cheers.

... Although maybe that'd be a separate issue and pr 🤔