bot icon indicating copy to clipboard operation
bot copied to clipboard

Keyword Alerts

Open HassanAbouelela opened this issue 3 years ago • 3 comments

What feature are you proposing?

Send a DM to members when the bot detects a certain keyword in the incoming messages.

What is your justification for the proposed feature?

This was something that was suggested before, but I was against it previously for the following reasons:

  1. It is easy to abuse this system to stalk/follow people. It's not something we should enable.
  2. It is possible to create alerts which fire on way too many messages (for instance just watching the letter e), which can create issues with ratelimits.

The ratelimits thing is probably not an issue, we have a pretty high cap. Both of these issues were addressed by the following suggestion in community meta:

I thought about this for a while and I believe most concerns would be alleviated if we hard-coded a list of keywords that could be monitored, and limited the monitoring to code blocks.

  • https://discord.com/channels/267624335836053506/429409067623251969/1030793506295386203

I think that's a valid compromise that could enable a nice feature. I still do have some reservations about the number of alerts, and would like to trial this feature out without sending alerts (just log statistics), but we can hash out implementation details later.

HassanAbouelela avatar Nov 07 '22 16:11 HassanAbouelela

I'm genuinely curious to see an implementation of it and learn about who used this and how often.

The ratelimits thing is probably not an issue, we have a pretty high cap.

I play devil's eggvocate here when I ask: What measure can be put in place to cap this limit? Imagining a doom's day situation of hundreds of accounts joining, subscribing, and proceeding to trigger the limited keyword list.

Preocts avatar Nov 07 '22 17:11 Preocts

We would need a way for people to automatically become unsubscribed if they go inactive, so that the bot doesn't waste API calls sending DMs to abandoned accounts. I think the easiest way would be for subscriptions to automatically unsubscribe after a fixed duration (say, a month), and people who still want to subscribe to that keyword can run the command again. (This would also have the effect of passively unsubscribing people from keywords that they've lost interest in, but for some reason couldn't be bothered to unsub from.)

swfarnsworth avatar Nov 20 '22 19:11 swfarnsworth

Transferred issue to bot pending implementation.

We likely don't need to worry about ratelimits, abandoned accounts get purged by Discord after a period of time and as mentioned our ratelimits are high enough for us not to worry.

We should not overengineer this and instead should add the ability to observe the feature and address ratelimits down the line should they become a problem (which is highly unlikely)

jb3 avatar Aug 26 '24 23:08 jb3