Git Product home page Git Product logo

anubot's People

Contributors

jasonkeene avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

anubot's Issues

Rework bot package

bot.Bot no longer manages connection state so there is a lot of code to rip out. It is now a long running process that runs concurrently alongside other instances. It receives messages from dispatch and writes messages out via stream.Manager. It needs to be able to be reconfigured on the fly to enable/disable features. Perhaps there needs to be some sort of bot.Manager that serves as bookkeeping so that the api can communicate directly with the bot.

  • Rip out connection related code.
  • Wire up sub socket.
  • Wire up message sending.
  • Add basic feature to demo bot.
  • Think through configuration.
  • Implement bot.Manager.

Move topic resolution to stream.Manager

I initially delegated topic resolution to the store. This can be statically set when creating a connection in the stream.Manager.

  • remove topic resolution from store
  • get echo feature working with twitch
  • figure out how topic resolution will work for discord
  • get echo feature working with discord

Flesh out dispatch package

dispatch needs to:

  • Accept messages
  • Do a somewhat decent job at deduping messages within a certain time frame
  • Allow subscribers to stream messages

Things to consider:

  • How will bots subscribe for their information?
  • How to prevent messages going to the wrong bot?

Remaining TODOs:

  • Dedupe messages
  • Figure out topic to publish messages by

All store methods need to return errors

A few of the store methods do not return errors. This was because with dummy implementation everything was done in memory. Now that there are actual backends errors need to be returned.

Version API

This can be done right before public release.

Support actions

I got this in my logging one stream, should probably look into it:

@badges=turbo/1;color=#B20AC2;display-name=Aeowynne;emotes=;mod=0;room-id=123750783;subscriber=0;turbo=1;user-id=36125726;user-type= :[email protected] PRIVMSG #postcrypt :ACTION has no idea wtf is going on. In purple

Store messages

Messages need to be stored. Just need something that pulls from dispatch and writes to store. There needs to be a query interface on the store to search through messages for a given user. Eventually this will be elastic search but for now just implement something naive.

  • Implement boltdb method for storing messages.
  • Implement boltdb method for querying.
  • Stub dummy method for storing messages.
  • Stub dummy method for querying.
  • Add dispatch reader that writes into store.
  • Order messages by timestamp
  • Limit recent messages to 500

Storyboard discord chat interface

This will take considerable thought. I was thinking about implementing some sort of filtering system so that you can have a single unified chat and simply filter in/out what you want. Discuss this more with thaithyme.

Reduce scopes for both twitch and discord

Twitch scopes:

  • ? user_read: Read access to non-public user information, such as email address.
  • Y user_blocks_edit: Ability to ignore or unignore on behalf of a user.
  • Y user_blocks_read: Read access to a user's list of ignored users.
  • ? user_follows_edit: Access to manage a user's followed channels.
  • ? channel_read: Read access to non-public channel information, including email address and stream key.
  • Y channel_editor: Write access to channel metadata (game, status, etc).
  • Y channel_commercial: Access to trigger commercials on channel.
  • ? channel_stream: Ability to reset a channel's stream key.
  • Y channel_subscriptions: Read access to all subscribers to your channel.
  • ? user_subscriptions: Read access to subscriptions of a user.
  • ? channel_check_subscription: Read access to check if a user is subscribed to your channel.
  • Y chat_login: Ability to log into chat and send messages.
  • Y channel_feed_read: Ability to view to a channel feed.
  • Y channel_feed_edit: Ability to add posts and reactions to a channel feed.

Setup concourse build pipeline

  • Get pipeline created and committed under /ci.
  • Move Dockerfiles under /ci
  • Job for running unit tests
  • Stub out job for building and pushing as a single github release:
    • Electron app:
      • Windows
      • MacOS
      • Linux
    • Binaries for linux amd_64.

Storyboard setup flow for discord

Basic ideas:

  • use oauth2 to tie discord user with our user
  • try to integrate with existing oauth2 flow from twitch
  • once discord user access is granted send the user to url to add anubot to their guild

Use expect vs testify

The output when assertions fail with testify is not detailed enough. Move tests to using a8m/expect.

Deploy concourse pipeline

  • Get AWS/github credentials needed for pipeline
  • Deploy concourse via terraform to DO
  • Set pipeline
  • Ensure entire pipeline works (if it doesn't make modifications and destroy/set pipeline again)

Rework api package

The api package needs to subscribe to messages from dispatch and send them down the connection when it is properly authenticated.

  • Rework authentication flow.
  • API should allow client to subscribe to messages for that user.
  • Rework marshaling of message events so that it works for both discord and twitch.
  • API should allow client to send messages for both streamer and bot.

Editing of Status and Game

User should be able to change their stream status and what game they are playing. The UI for selecting game needs to cache popular games but allow for manually typing in their game.

  • Add caching method to twitch.API
  • Add handler to websocket API
  • Have UI query for games
  • Create search box for games
  • Key down/key up should select game

Add URL linking

Discuss this with thaithyme to see if it would be useful.

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.