Scratchpad for simplifying writing/deploying bots #1
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Current problem:
A bunch of Varia people are working with this stuff and its really fun and interesting. So, I think some tooling could be good to work on to make this process simpler. I had some ideas about how to make this easier.
writing
Simply write a wrapper around certain types of bots like "PersonalBot" which is a wrapper around a bot which can be privately messaged. In the wrapper you would just write code to respond to direct messages not have to manage all the other stuff. Another one might be "GroupBot" which can join group chats and respond to them. These bots should be composable. So if you want PersonalBot + GroupBot, you can just do
class MyBot(PersonalBot, GroupBot): ...
and you're on the move. The wrapper shouldn't be too smart or do too much, just make it simpler to work with.deployment
Once you have your bot, how the heck do you run it? Currently, we do some sort of weird ad-hoc deployment from a hook which does a pip install, supervisor restart and all sorts of stuff. I was thinking that something like Dokku could resolve a lot of the issues we'd have here: http://dokku.viewdocs.io/dokku/. Too long to explain how but basically, with Dokku, it would be possible to write a
bot.py
and then justgit push
and your bot would come up or fall down but the process would be automatic and you'd see the deployment on your terminal.I think work on a small library + dokku deployment might be quite nice! Not sure if I will have time to do this but I wanted to just brain dump some thoughts since things are fresh.
I've got something workable for this over at https://git.autonomic.zone/decentral1se/xbotlib. Gonna close this off and keep efforts focused on that other issue tracker.