Coder Social home page Coder Social logo

logging reported questions about triviabot HOT 3 OPEN

andy5995 avatar andy5995 commented on August 12, 2024
logging reported questions

from triviabot.

Comments (3)

rawsonj avatar rawsonj commented on August 12, 2024

I'm kinda laughing to myself, because I was going to say "historically for this bot..." and that's just silly.

This bot is something like 4 years old now or so.

Anyway, the reason why the questions are not tagged in any way is because they've been shuffled around and reorganized several times due to scripted cleaning efforts in the past.

Also, due to the way the bot randomizes it's question grabbing, it basically necessitates shuffling the questions around to re-balance them since over time people clean up the questions by removing duplicates and such, making the files unbalanced and hence the randomness can get unbalanced. (This reminds me, they are likely out of balance and should be massaged.)

Due to this, I was kinda thinking we could just sha the question and put it at the beginning of the line, like Q [ 452feb ] which would likely do what is desired, essentially tagging each question with a unique number so it can be identified later. This would make adding new questions easier, because you wouldn't have to care what file you were adding them to or anything.

Really though, we've never had a problem with people reporting a question as being buggy. Everyone has scrollback on IRC, and you can just grep for the question through the files and find it.

We usually have problems with people caring enough to go through the trouble of doing it in the first place.

I think your logging you added is good enough, frankly. It identifies file name and question, which is enough. I think people having a ?report command to make identification of bad questions easier is likely all that's needed, and tagging each question unnecessary.

Hm, although... I think ?report should actually remove the question from the file, and place it into the reporting log.

So as the game goes on, people ?report, the questions files shrink, reducing the pool of questions to the good ones.

Bad questions get piled up into the reporting log, so they can be reviewed all at once and either fixed or discarded by an admin. Once the reporting file has been gone through by the admin, the admin can move it back into the questions folder, essentially re-adding them to the running game.

?report could also take a users message and log it, basically as the reason why the question was marked "bad".

Invocation would look like ?report bad question, doesn't make any sense. or ?report This one is just offensive... and we could log those too.

What do you think?

from triviabot.

andy5995 avatar andy5995 commented on August 12, 2024

Hm, although... I think ?report should actually remove the question from the file, and place it into the reporting log.

I thought about that, too, but not sure it should be automatic. Someone may misuse the report feature, and it's pretty uncertain how frequently the admins will be able to review the reported queue.

And right now, the code I added is a bit unpredictable and will have to be worked on more. Sometimes the wrong answer is reported. I don't know why yet.

That's one reason I thought about numbering the questions. Not so much for the ease of referencing them in a file, but so the player can specify the number of the question, allowing greater flexibility for reporting.

?report could also take a users message and log it, basically as the reason why the question was marked "bad".

I completely agree.

I think users will be more likely to use a ?report feature if they have some assurance that the errors will be fixed eventually. A ?stats or ?news option could be added, to show a brief ChangeLog, and statistics such as "Since the last release, 120 questions have been corrected, 43 removed, and 28 added." Along with version and date information, so they could see the bot is being worked on.

Anyway, the reason why the questions are not tagged in any way is because they've been shuffled around and reorganized several times due to scripted cleaning efforts in the past.

Hmmm... well, the numbering (or sha as you suggested) can be pretty arbitray. When I read your explanation, I understand that once they are numbered, it would be better not to re-number or re-tag them after they've been initially tagged.

One thing that may help is a method where admins can send copies of the logs to the main triviabot project. e.g. using pastebin and posting to an triviabot-dev channel on IRC, and/or attaching them to a ticket. Whichever methods are selected should be included in the docs.

But to conclude, regarding the numbering, if you decide not to go with that, I'll still be helping to fix and upgrade the new ?report feature.

On a related note, I added #53

from triviabot.

rawsonj avatar rawsonj commented on August 12, 2024

So I think a thing that could be worthwhile here is to concatenate the questions and gzip them, then just access the gzipped file and hold pointers to the lines in the file and edit as required.

I could actually see building a few commands into triviabot that would make this relatively easy to do.

Command list:

  • ?report (user command): Reports the last question asked as being buggy, puts it into a list of reported questions.
  • ?ls-rq (admin command): Lists the reported questions in a pm to the admin.
  • ?edit-rq ["question"] <"answer"> (admin command): In a pm, an admin could edit the question at a particular number by giving its list number as reported by ls-rq, an optional "question" rephrasing then the "answer" to change. Editing a question removes it from the reported list.
  • ?del-rq (admin command): Removes the question entirely from the game. You'll never see it again.
  • ?pop-rq (admin command): Removes the question from the reported question list, doing nothing else.

I suppose this doesn't require putting all of the questions in one file, there could just be a list of file descriptors open where the descriptor is pointing to the line in the file where the question was fetched from.

Someday, I may even get around to doing this. :)

from triviabot.

Related Issues (20)

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.