Well, just to not be cryptic, here's what I was kicking around this weekend.
I'm trying to make a system that will allow anyone to easily code up a Slack or Discord bot, in MiniScript, by hosting the code wherever they like, such as at PasteBin or GitHub or whatever. For example:
You have to add MiniScript Bots to your server, but then you can create new specific commands using the !addbot command. In the example above, !addbot spam https://pastebin.com/raw/6q9EfR5B
adds a new !spam command, which links to this code:
print "Spam, spam, spam, " + message + ", and spam."
And thereafter, you (or anyone in that Slack/Discord server) can just say !spam baked beans
or whatever to run the code.
Here's an example of essentially the same functionality (but using different MiniScript code) in Discord:
There are a few other tricks under consideration, like a built-in !eval
command that evaluates a MiniScript expression, and prints the result... handy for quick computations or whatever:
(Sorry for the giant images... that's what happens when you screen-capture from a Retina display.)
I got inspired on this idea by a gaming session I'm doing with some out-of-state friends. We have a Slack server set up for the game, and we need to roll a lot of dice in various combinations (yes, it's D&D!). We found a dice-bot that does an OK job, but not a great job for our needs — and I started dreaming about how if we could easily access MiniScript in our Slack chat, we could make our own game tools that are perfect for us.
Usually to create a custom Slack or a Discord bot, you have to have your own server, and jump through a fair number of hoops to install the necessary Python (or whatever) libraries, keep the process running, etc. I want to eliminate all that by providing this generic "MiniScript Bots" bot, that can run whatever code you give it, and let you easily update that code on the fly, as often as you like.
So that's the big idea. Feedback (and intrepid alpha-testers) are very welcome, as always!