Giter Club home page Giter Club logo

robot's Issues

thank sub gifters

Robot should thank people who gift her subs. Look for USERNOTICE with msg-id either "subgift" or "anonsubgift" and with msg-param-recipient-user-name equal to the bot's lowercase username or msg-param-recipient-id equal to the bot's userid if we get that at some point. Additional relevant docs: https://dev.twitch.tv/docs/irc/tags#usernotice-twitch-tags

Thank with a chat message, possibly a special set of emote options for doing so, maybe a big chunk of affection.

fixed chain responses

Extend respond to make the bot generate messages starting with a given chain. E.g. have AYAYA AYAYA @RobotIsBroken take (assuming prefix length 3) \x01 AYAYA AYAYA as the working chain to generate the rest of a message, or AYAYA AYAYA AYAYA AYAYA AYAYA @RobotIsBroken use AYAYA AYAYA AYAYA with AYAYA AYAYA as a fixed prefix. May require slightly reworking Walk.

better tokenization

Instead of splitting around spaces and having to reconstruct them, include the spaces in the tokens. That also allows us to do things like splitting around punctuation without introducing extra spaces.

Also, we probably don't need to keep the article rule anymore. Users very often try to generate with prompts ending with a/an/the and are surprised that it doesn't work.

add a send closure to channels

Channels should each record how to send to them. Add a field containing a closure that implements it, including with global rate limiting.

follow raids

Optionally follow raids issued by the broadcaster and allow copypasta detection to trigger to join in with the raid message, then leave after a few minutes.

Problems while trying to install

I've trying for a few days by now to install the bot on my computer but as for now i've been unsuccesful, i downloaded the master file and installed go (version: 1.15.2) and gcc (tdm64-1 10.3.0) but as soon as i get to the ''go get github.com/zephyrtronium/robot/'' step i have an issue, it gives a prompt that the ''go get'' function is depreciated and i should use the ''go install'' function instead, so i tried that and after numerous tries and even visiting their site to see what could've been going wrong i simply can't install it because it says it need the version of the repository and nothing that i tried works, i even tried to download an older version of go to see if i could use the go get command (hence why i'm using 1.15.2 rn), so having said that i would like to ask for some kind of help on how to properly install robot, sorry if this sounds awkwardly amateur but i would really appreciate if you could give me an answer.
Thanks for your attention, Diogo.

robot-init not recognized

I'm getting the following error when I try to initialize the database for my bot:
image

robot -help works, so I'm wondering what I might be doing wrong here?

bad word filter

The bot produced a slur by combining inputs typed out like t h i s that were individually fine. Passing fully generated messages through a bad word filter would be a good step to prevent things like this. A straightforward place to add it would be in func badmatch.

describe self

Add a command to describe the bot's mechanism in chat. Should respond to:

  • who are you?
  • how do you work?

use strings for message ids

TMI uses UUIDs for message IDs, but Discord doesn't. We don't depend on any of the semantics of UUIDs, so just use strings instead. This blocks #44.

handle USERSTATE tags

Use USERSTATE tags to find the bot's own badges in a channel and determine whether it can send 20 or 100 PRIVMSGs per thirty seconds.

Installation instructions out of date?

I am attempting to install this bot on my own personal server but I'm a bit lost on the instructions. I did some searching and saw that I needed to run go install github.com/zephyrtronium/robot/...@latest instead of the existing command in the readme - that all works fine as it appears that the installation goes well (no errors in the logs). My issue happens when I try to execute robot -help. For some reason

I'm only able to execute said function if I go deep into the go/bin directory and run ./robot -help that way - the problem here is that my config file is in the cloned robot repo - am I going to have to run things from inside the pkg directory every time? That seems like it's a bit counterintuitive, am I just missing something or are the instructions out of date?

Running the bot as a background process?

I did a bit of research on my own and couldn't find an answer that seemed to make sense to my brain - is there a way a person could run the bot as a background process at all? I have it set up on a VPS and I would like to simply turn it on and let it run, is this at all possible via a flag or something similar?

Dashboards

Make web interfaces for bot management, separate for admin and owner. Both will eventually require Twitch OIDC, implying a redirect URI, but can be implemented without auth for LAN for now.

Owner dashboard: An owner connects to e.g. /o. Webpage displays:

  • Messages in history, generated messages (on tabs)
  • SQL result pane & query entry
  • Command output & entry (behaves as current terminal command entry)

On mobile breakpoints, SQL and commands are also tabs.

Admin dashboard: An admin in #channel connects to e.g. /m/channel. Webpage displays a menu of options corresponding to admin commands which modify the database: forget, silence, set-prob, &c. when others are added. Selecting one displays a page appropriate to the command.

Discord

Robot should be able to connect to Discord servers and channels within them. This might involve making fake IRC messages out of Discord messages and vice-versa, or making an interface to capture both kinds. It might be possible to add Discord info directly into the chans table, or it might be necessary to add a new table.

refresh storage stops loading

After a couple refreshes:

couldn't obtain access token for TMI login: couldn't retrieve current token: couldn't load saved token: chacha20poly1305: message authentication failed

kvbrain forgets wrongly

We need to be able to effectively forget a message before we actually record tuples from that message. #41 lays out that we should do this by recording deletes in bbolt. Don't forget to actually implement that.

channel config

This probably doesn't need to go into a database, as long as it's possible to update configs and particularly the list of channels while the bot is running.

Also be careful to avoid making this IRC-centric. What do we need for e.g. Discord?

trace messages used to speak

Instead of deleting arbitrary tuples, record a trace of which message IDs actually produced a result, then delete all the messages in such a trace when needed.

change ForgetUserSince to just ForgetUser

The caller is the one who needs to arrange the "since" part because message times are encoded in user hashes. The time parameter doesn't add anything except possibly limiting result sets on the SQL brain, which we almost certainly aren't going to use anyway.

expand tuples info

Some additional info about tuples will not only improve the suitability of Robot's data for research if that direction is pursued, but will also improve maintainability and consistency of the data.

  • timestamp
  • userhash
  • forgotten, or forget reason
  • msgid (maybe use this to relate tuples to this other data instead of recording those for every message)

move off sqlite

While trying to reproduce #39, it came to light that the new SQL approach is overwhelmingly slow. We could revert to the old algorithm, but we switched off it for many reasons, especially that it's way too memory-hungry. I want to try a NoSQL/KV solution anyway, so let's just go for it.

The design is roughly as follows:

  • Keys are the list of entropy-reduced tokens in reverse order. That allows us to match prefixes of arbitrary length by prefix scan. Keys are prepended with the tenant tag.
  • Values include lists of suffixes at each position along the key after the first or second. We need all suffixes so that we can match chains shorter than the full message without entropy reduction.
  • Each suffix tracks the list of message IDs that produced that suffix. Then we can check for deletions in a separate table/DB. (Alternatively, we could put message ID in the key, so that every learn is an insert rather than some being inserts and others being updates.)
  • Every prefix of a message is saved this way. In particular, this lets us easily search for new prompts by looking for just an end-of-message sentinel.
  • Out of consideration for storage, we keep a lexicography to map tokens to integer IDs. uint32 will suffice for these; after about four years in operation, RobotIsBroken has only 1418123 distinct words, or 1141243 post entropy reduction.

Based on past investigation into this idea, we probably want Badger for knowledge and bbolt for message deletes and lexicography.

improve user privacy

  • Add a "privacy" privilege level. Users of this level can trigger commands, but the bot does not record any information from them, in history or in tuples.
  • Add a "priv" channel config option, setting the default privilege level for each channel. Usually this will be null or "privacy", depending on the broadcaster's wishes.
  • Add a "privacy" command. Responds with a link to a summary of the information Robot collects (like in the current top-level README) and mentions commands to manage a user's own privacy.
  • Add "ignore me" and "unignore me" commands. The former sets a user's privileges to "privacy", or to "bot" if they're currently an admin. The latter sets a user's privileges to regular, or to "admin" if they're currently "bot".
  • Save hashes of usernames in history instead of full usernames.
  • Remove mentions of users with "privacy" privileges when learning chains. Replace with self, triggering user, broadcaster?

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.