Giter VIP home page Giter VIP logo

hbot's People

Contributors

ljsc avatar stephenbaldwin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

stephenbaldwin

hbot's Issues

Update Plugin Types

The Plugin type we have is simple and easy to implement, but it leaves a bit to be desired feature-wise. Right now, you can only print out grey text messages, when it would be a lot better to allow different values for color and messageFormat fields in ChatNotification. At the same time it's a little awkward passing in a tuple for the input when the BotCommand can be directly extracted from the event. I've added the help text in a recent commit, but we might want additional fields for plugins to use as well.

One thing to keep in mind is that these things should be easy to implement. Right now if you have any function from Text->Text you can trivially lift it to a plugin via textPlugin. It should continue to be that easy in the simple case.

Right now I'm thinking of having a typeclass somewhere so we can have the simple case continue to have a really straightforward type, and then possibly have a different concrete version for stuff that does html messages and the like via blaze-html.

Create plugin architecture

So the whole idea behind creating this bot is so we can get something that makes it easy to add custom commands. In order to have a something that is maintainable and extensible, we're going to want some sort of plugin system. I think the best way to go about this is to have monoidal plugin data that we can compose into the running program. Something along the lines of the Plugin type found in Equational reasoning at scale.

Since we're hosting hbot as a scotty application we're probably going to want something that does actions in the Scotty's action monad. I'm thinking something along the lines of:

type Plugin = IO (Text -> ActionM ())

So when the plugins are installed they will return an action that takes every chat message in the group and does some action based on it. I'm not sure yet how we should be filtering the incomming messages--rather by at-mentions or by some other prefix--but the plugins shouldn't have to worry about that sort of stuff if it's done correctly.

Chipotle Order System

We need to integrate Hbot with my upcoming Chiptole CLI so that he can order us burritos on the fly.

Create search plugin

I want to be able to type : google some query and have Hbot post the first 1-3 links in the chat.

Integrate with Econify/roller

It would be cool to have a hbot plugin that allowed dice rolls. Since this is already implemented in Haskell as example code for the roller blog series, we should see if we can just reuse/integrate with that. So it would be something like:

: roll 1d20+3
20+3 = 23

Crit!

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.