zajrik / discord-storage

Store simple key/value data in a Discord server text channel
15 stars 1 forks source link

subscribe to channel updates #1

Open nightpool opened 6 years ago

nightpool commented 6 years ago

Right now this library makes a lot of assumptions about the exclusivity of the channel and data store then—in my opinion—a true discord storage client doesn't need to. Simply by subscribing to post and update events in the channel, it would be easy to concurrent readers and writers to the datastore.

tbd: should we worry about key-level concurrency? could we use reactions to implement a low-overhead lock protocol?

zajrik commented 6 years ago

Your enthusiasm is appreciated but this was written in a very minimal timeframe with humor as the primary intention and motivator. I assure you have no intentions of taking this project into the realm of a serious storage solution.

I had actually intended at one point to rewrite this to utilize an entire guild, where channels would be akin to database tables, and utilize events for something or other but anything I had thought out further than that is long gone from my mind by now and even then it was only a bid to pass the time on some work shift I may find myself motivated to write something useless.