Code Monkey home page Code Monkey logo

twubot's People

Contributors

mattwwarren avatar

Stargazers

 avatar

Watchers

 avatar  avatar

twubot's Issues

Giveaway plugin

Set number of credits required for entry.
Set number of entries per person.

Random chance of an individual winning the thing

Message rooms based on hubot adpater name

When we call robot.sendMessage directly, use discord rooms for discord, single twitch channel for twitch and leave room for youtube, however that will work (likely similar to Twitch).

Implement ranks

Admin only functionality

Dynamic addition of ranks with !addrank rank cost

Static addition of ranks on startup with loading a file. Use a timeout to ensure brain loading.

!buyrank user - subtract the appropriate amount from the user and give them that rank

How to create/enforce superseding ranks via command?

Finish viewership script

Record user follow times
Populate previous followers in robot brain
Detect live times (and save total live time in ms; grab based on "connected" event)
Handle viewers' total view time (process on user join and part)

Follow and join dates do not set on new users already in channel when bot starts

prattlr_1  |     at Viewership.exports.Viewership.Viewership.userEnter (/opt/prattlr/lib/viewership.coffee:31:38)
prattlr_1  |     at Listener.callback (/opt/prattlr/scripts/viewers.coffee:18:22)
prattlr_1  |     at /opt/prattlr/node_modules/hubot/src/listener.coffee:53:21
prattlr_1  |     at allDone (/opt/prattlr/node_modules/hubot/src/middleware.coffee:35:16)
prattlr_1  |     at /opt/prattlr/node_modules/hubot/node_modules/async/lib/async.js:274:13
prattlr_1  |     at Object.async.eachSeries (/opt/prattlr/node_modules/hubot/node_modules/async/lib/async.js:142:20)
prattlr_1  |     at Object.async.reduce (/opt/prattlr/node_modules/hubot/node_modules/async/lib/async.js:268:15)
prattlr_1  |     at /opt/prattlr/node_modules/hubot/src/middleware.coffee:39:24
prattlr_1  |     at nextTickCallbackWith0Args (node.js:436:9)
prattlr_1  |     at process._tickCallback (node.js:365:13)

This makes total sense because there is no check to see if the user exists. It is expected that the user will also be created on join.

Consider !live command

Could be a way to work around Twitch API integration for the time being. !live triggers a "we're going live" chat message, encouraging users to say hello for credits. Message can be configured with a file to HUBOT_TWITCH_LIVE

Rank/follower/subscriber only commands

Commands in the database can be for users with a particular rank, followers or subscribers only. Save this information alongside the existing commands.

Example for call-n-response
!learn [all,sub,follow,${rank}] command response

Reminder plugin

Set via a list of items in the brain, remind the chat on a rotation to do things like follow on Twitch/Twitter, join Discord or sub to YouTube.

Implement voting

!vote thing - default yes/no answers
!vote thing choice1 choice2 ... choicen

How do you differentiate between thing and choice1?

Add namespacing to all keys

In preparation for multi-tenancy, we should namespace everything to the channel so we don't get users and other information crossed.

Centralize moderator detection

Currently I have the same three lines of code all over the place. Let's put it in one place and that will allow the ability to switch it out for a more intelligent system.

HUBOT_TWITCH_ADMINS = process.env.HUBOT_TWITCH_ADMINS?.split "," || []
HUBOT_TWITCH_OWNERS = process.env.HUBOT_TWITCH_OWNERS?.split "," || []
moderators = HUBOT_TWITCH_ADMINS.concat HUBOT_TWITCH_OWNERS

Moderation plugin

This gets hairy pretty quickly but a listener should do the job.

Current idea: create a list of rules that match messages and filter.

Filters:
https://www.npmjs.com/package/swearjar
MESSAGES IN ALL CAPS
Emoticon spam
Copy and paste spam (a fun scaling challenge for sure)
Link spam (particularly untrustworthy sites)

For the spam things, it should operate on a three strikes and you're out philosophy

Create a battle royal system

From reddit:

Hello, I'm streaming a game that includes a battle royal system for me and 3 others to join in on. Currently the viewer pool is small enough for me to keep track of in my head, but it's still fairly hectic. I try to make it so that everyone has a fair chance to join in where last place in battle royal gets swapped out. While if multiple new viewers join, more people are swapped.

Discord channel/room madness

It has come to my attention that a bot using the same auth token will join all rooms it is authed to. This gets slightly complicated for hubot. We will need to experiment with how to detect the correct request/response across multiple guilds.

More docs

CONFIGURATION.md should be written from the pov of a new repo.

Link that to DEPLOYMENT.md and talk about npm install.

PLUGINS.md needs a list of plugins and what they do.

DEPLOYMENT.md to be fleshed out as we have more ways to deploy.

Create command -> english middleware

Each plugin should look up a string from the !command and use that as the regular expression (in addition to the !command)

This is the groundwork for internationalization so keep that in mind when creating a data file.

Update README

Take all the auto-generated junk out of the existing and move it into INSTALL. Write better docs about how to actually run the project and how to use my services to make it easier.

Create !time commands

!uptime - uptime of the stream (requires API integration)
!time - attendance time of the user (based on first watch value in user obj)
!checktime - check time of another user

Implement an inventory system

From reddit:

I am streaming Pokemon and me and my mods have come up with an Elite 4 challenge. The only reason why it's not working at this point in time is because we wanted players to have the ability to buy revives for their team. So basically you type in a command which then sends a message to my bot telling it to take earned credits from their total balance. In exchange they for example get 1 revive which they can spend by using another command.

So from this, mod commands to manage the "shop" inventory (should items be limited? Optionally?) and all access to buy from the shop

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.