jkomoros / flux-bot

Discord bot for GALE-x
3 stars 1 forks source link

a cream-skimmer bot #21

Open jkomoros opened 3 years ago

jkomoros commented 3 years ago

messages that have 💯 🤯 💎 get skimmed into the cream of crop channel

Originally captured in #19

Make it general, so there's a emoji combination --> thread skimming

jkomoros commented 3 years ago

Clippings

Maybe have a message from the bot that says the context of the message, and then a reply back that's a copy/paste of the message. (Or is there some other way to copy/paste with context)

jkomoros commented 3 years ago

An executioner bot

jkomoros commented 3 years ago

Creating a message can have a messageReference (that's how replies are done). Does the API allow referencing a message from another channel? If so, that's ideal

https://discord.com/developers/docs/resources/channel#message-types-replies mentions that the messagereference int hat case only requires message id, which implies they must be in the same channel...

And this part is even more explicit: https://discord.com/developers/docs/resources/channel#create-message-limitations

jkomoros commented 3 years ago

Yeah, you can't have a reply reference another channel. HTTP 400 Bad Request, {"code": 50035, "errors": {"message_reference": {"_errors": [{"code": "REPLIES_CANNOT_REFERENCE_OTHER_CHANNEL", "message": "Cannot reply to a message in a different channel"}]}}, "message": "Invalid Form Body"}

jkomoros commented 3 years ago

Now that #34 is done we can reuse that machinery very directly.

Ideally there would be a category called "Clippings". And then the names of those channels say the emoji combination required to clip. So 💯 would cllip all messages (from now on) that have at least one 💯 . And 💯 🎯 would clip messages that have BOTH of those.

Then also ideally if a message no longer has the conditions to be clipped it's unclipped from the other thing.

Ideally there would be a way to update all of the clippings in a channel when it's created or modified, so it could fetch all existing clippings. That would be expensive 😬

jkomoros commented 3 years ago

idf.go:IMPORTANT_REACTIONS constant could be set based on what emoji combinations are in the clippings folder. You wouldn't need to rebuild the IDF index each time, because that's only used when generating a TFIDF, and that is only done on demand and not "live"