Git Product home page Git Product logo

datbot's People

Contributors

drfrankenstein avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

datbot's Issues

Set up CI

Probably through GitHub actions. We'll need to spike that.

Subscribe to specific IRC messages

Who: Library users
What: Create observables that emit on specific IRC messages
Why: So that we don't always have to subscribe to messages() | filter([](m) { return m.command == "COMMAND"; }). Running those filters on every message can become heavy quickly (O(n); n: amount of subscribers).
Points: 5

This is not on a milestone yet, as performance impact hasn't yet been asserted.

Acceptance Criteria

  • I can subscribe to something like session.messagesOfType("PRIVMSG").
  • That observable would emit whenever a PRIVMSG is received.
  • Those observables are kept track of somewhere and get purged when no one's subscribed to a message anymore
  • Support for both commands and numerics.

Ability to join channels

Who: Library users
What: Join channels on an active IRC session
Why: To join channels
Points: 2

Acceptance Criteria

  • An API to join a channel is implemented

Technical Discussion

This might go on Irc::IrcSession.

Implement a command handler

Who: Bot users.
When: A command is posted in chat.
What: Parses the command and finds a suitable handler for it.
Why: So that the bot can accept commands from users.
Points: 5

Acceptance Criteria

  • Detects all messages starting with the trigger.
    • That trigger is configured under the "trigger" key of the config file.
  • Allows modules to register commands with names and hanglers.
  • Looks for and calls that handler when the command is posted in chat.

Example

  • Config file contains: trigger: "!".
  • A user posts !roll d6.
    The bot should find a command handler for roll and call it with argument d6.

Technical discussion

A command record should contain:

  • The command name
  • The number of arguments
  • A pointer to the handler to call.

When parsing the command, arguments would be split on whitespace until the argument count is reached. If more whitespace is found, it becomes part of the last argument. For example, if command addquote takes 2 arguments, then !addquote somedude My password is hunter2 would be parsed as

command: "addquote"
arguments: ["somedude", "My password is hunter2"]

Join configured channels

Depends on: #3
Who: Bot owners.
When: On startup, after logging into the IRC server.
What: Join the channels list in the "channels" key from the config file.
Why: So that the bot can do its job.
Points: 2

Acceptance Criteria

  • Automatically joins the channels upon startup

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.