Git Product home page Git Product logo

flux-bot's People

Contributors

dglazkov avatar jkomoros avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dglazkov

flux-bot's Issues

a cream-skimmer bot

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

Send messages to specific threads when certain emoji reactions are applied

Sometimes we'll be having a random conversation when we think, "hey, this message would be a good Lens of the Week" or "hey, that's a signpost". Copy-pasting the message over to the relevant thread where we catalog those items has a bit of friction, and so many of those valuable messages get lost. What if a simple emoji reaction to a message could send the message off to a specific channel for easier cataloging?

๐Ÿš can send the message to #signposts
๐Ÿ” to #lenses
๐Ÿ“š to #books
๐Ÿ—ž๏ธ to #worth-your-times
๐Ÿ“ to a yet-to-be-created #article-ideas (or similarly named) channel

This would be mostly a copy-and-paste operation, either copy-pasting the text of the message or (if possible) pasting a deep-link to the message into the new channel.

We may need to add some kind of guide to remind users which emojis do which things.

Hook up logging from production bot

The production bot just runs in a tmux session on a VM somewhere, printing log messages to stdout no one is watching. That also makes it hard to tell if it's working or not. (Although the 'Available' indicator in the Discord UI for the bot is an easy check that the binary is at least still running with a valid Discord session).

When running in production it should instead log to somewhere more visible, ideally visible in Google Cloud Engine logs of some form

Write smoke tests

Improve coverage by writing a few smoke tests that give us a bit of confidence about refactorings.

  • GuildCreate that triggers creation of "Archived Threads" category
  • MessageCreate smoke test(s)
  • ChannelCreate smoke test(s)
  • ChannelUpdate smoke test(s)

It should be possible to resurrect an old thread

Some old threads are archived but it would be good to be able to ping them againand resussicate them.

This would be kind of hard because you'd want all of the channels to cascade down through the previous archives as a new one in the active set is pushed down the edge.

Tweaks to threading bot

  • Note which user's emoji is the one who created the thread
  • The first message in the new thread should say "This is a new thread created by via emoji. If you don't like the title, you can change it!"
  • The link should say "original said in #channel"

Related to the original #34 issue

Archive threads above count n

Create a new archive, if necessary, to hold the thread.

Mark as read only.

Organize the archive category towards the bottom (but above previous archives for this group)

Bot Ideas

๐Ÿ’Ž๐Ÿ’ฏ๐Ÿคฏ -> Copy to "Best of" thread
Consolidate URLs in a channel
Consolidate book mentions by crawling for Amazon, Goodreads, etc

Deploy in production

A different bot ID for the dev one and the production one.

Document patterns to test and patterns to deploy in README

Smaller VM for bot

If not running rocketchat, can be smaller, less storage.

Better deployment options? Maybe a docker image for convenience?

Be more efficient about processing when channelUpdate

That happens ALL the time, every time a channel has its position changed.

One idea is to have the channel indexes have very large gaps, and when the channels are updated, only update the index if necessary to get it in the right order. And then skip channels whose position numbers don't need to be udpated.

Make sure the bot works OK when we hit the max number of channels

Discord only allows 500 (I think) channels. At some point we'll hit that limit. (Remember that categories also count as channels).

Ideally well in advance of hitting the limit (maybe 10?) we'd do some garbage collection and compaction.

One option is to just download a JSON dump of the old thread (we could just use discordgo's structs) and keep that around in some backup. That should work but it's offline backup--it wouldn't be possible to search the threads for example.

Another option would be to create an archive thread and then reply the conversations to them in some format. You'd ideally want to have similar numbers of emoji reactions to them, maintain reply-style structure, etc. It would be kind of hard to do presumably.

A better data cache

With #35, we're fetching all messages to do processing. Other features will need that index, too.

Currently it's just being done by saving out a JSON snapshot every so often, but for bigger guilds that won't work.

Perhaps Firestore? Keeping the index in sync will be a pain in the butt but is necessary for lots of things...

A bot command to fork a thread

If someone replies to any message in any channel and uses the magic command, then the bot should create a new thread starting with the message that it's in reply to.

At the beginning, it will be a slash command reply that is in reply to the message that should be the new OP.

The thread OP should be a copy/paste of the message, with a link back to the original (using a channel reference, an actual link, and an @mention of the user).

In the future (once #35) is supported, when we can rename threads by tfidf words, then it should be possible to fork a thread merely by hitting the ๐Ÿด emoji reaction on a post and have it auto named based on the contents of the OP.

Originally captured in #19

An `/archive` slash command

While working on #34, I was going to do a slash command for forking... but it turns out that it's not possible to issue a slash command in response to another message.

The machinery to do a slash command is something we'll definitely want again later, so might as well do a basic behavior with it. /archive is that behavior, I guess.

A bot to mark people as Lapsed Members

For any members who haven't written any messages within 3 (?) months, move them from Member to Lapsed Member, which removes their read/write privilges on all but the #ground-rules channel. To get reinstated they just have to do a simple action--ping the admin email group, or maybe ping the bot, and they'll be reinstated.

Perhaps just before you are switched to be a lapsed member, the bot @mentions you in a main channel, so that others who are participating can see you're about to become a lapsed member and maybe ping you to encourage you to particiapate?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.