GithubHelp home page GithubHelp logo

freecodecamp / camper-gitter-bot Goto Github PK

View Code? Open in Web Editor NEW
95.0 95.0 65.0 13.26 MB

Finally, robotic beings rule the world.

License: BSD 3-Clause "New" or "Revised" License

JavaScript 94.81% Shell 5.19%

camper-gitter-bot's Issues

'help me' issue

words:

help me

trigger adding environment variables [wiki]
which is obvious error. please fix that, it's annoying how much time we have to see this window
help_me

Remove web interface

This is not currently used by FCC and I also don't think it's completely working. I propose removing this.

[Feature Request] Big Text Announcements

When there are known issues on FCC, we sometimes need to make "Big Text" announcements across channels. It would be nice if we could use the Camperbot to simplify this.

Command

!bigtext <Message>
We want it to be impossible to accidentally use. The output formatting might be pre-defined, or allow for the user to enter arbitrary text and formatting.

Broadcast Scope

We probably don't need it across every possible channel, more like just the "Core" help channels and main channel. We're need a list built in to the system.

Important Security

It would be critical that this command could only be used by designated admins. I'm thinking these would be hard-coded in to the codebase to prevent hijacking.

This could potentially also be limited to only being executed from a single room.

It might make sense to have a two stage process:

  1. Define what you want to say
  2. Camperbot echos it back in the current channel for review
  3. !bigtext confirm to broadcast or !bigtext cancel or just do a new bigtext to update the message.

Ask magic eightball questions

Right now it only responds with the command eightball. It be really cool to be able to
Oh magic eightball, Should I go to sleep?

I think we can scope it to lines starting with Oh magic Eightball. Thoughts?

Update relative links to absolute links in chatrooms

Recently, we have made a switch to relative links in the FCC wiki. The links to other wiki articles, or fragmented links within same articles - are now relative.

However, the content in the chatroom would require absolute links. We need to have camperbot parse the links before posting, and add a constant URL string ahead of all hyperlinks.

Camperbot commands behind a prefix

Too many times do users come into a channel and type 'help me' or something similar that generates a wall of text or any english word that happens to be a camperbot command.

Example:
!explain format
!help where art thou

Add Travis CI

Tests are passing and linting is good right now, so this should be a cinch to get set up. I'll play around with it tomorrow.

Camperbot quiet thresholds

When the chat channel has high traffic Camperbot should be silenced from spamming mass body of texts to commit a CoC violation of spamming either on purpose, accidental or informational.

This could be also resolved with a prefix but combining both will keep the chat from being overloaded by a rogue Camperbot command.

Ex: If the chat is moving at a high rate, do not allow camperbot to spam more than 3 lines of text, no images, no gifs.

Explain fails for staticReplies

Trying to explain items in the staticReplies array fails with tried to linkify an empty item because there is no dashedName property, so the bot sends this:

screen shot 2015-12-02 at 11 06 07 am

Regular wiki item explain js closures

topicData {
  displayName: 'js closures',
  fileName: 'js-closures.md',
  data: 'example',
  dashedName: 'js-closures' }
Utils.linkify> link [js closures  [wiki]](https://github.com/freecodecamp/freecodecamp/wiki/js-closures)
Utils.linkify> link [read more about js closures on the FCC Wiki](https://github.com/freecodecamp/freecodecamp/wiki/js-closures)
GBot> out|  ## :point_right: [js closures  [wiki]](https://github.com/freecodecamp/freecodecamp/wiki/js-closures)
Closures are functions that refer to independent (free) variables. In other words, the function defined in the closure 'remembers' the environment in which it was created.
> tags: closure, javascript, js
:pencil: [read more about js closures on the FCC Wiki](https://github.com/freecodecamp/freecodecamp/wiki/js-closures)

staticReplies wiki item explain link

topicData try this [guide](http://www.freecodecamp.com/field-guide/all-articles).

I can try to take this one, but need feedback on how to handle. Link to the wiki home page for these, change how these are handled and not link to anything, something else?

Explain Java

When you know someone bring up the subject of my worst enemy (java) and I "cleverly" think "hmmm if I type explain java surely I will get a page telling this nice person about the horridness of java" but instead I got a page on javascript!

This makes me very upset for two reasons:

  1. It made me look dumb (very bad time in my life).
  2. java != JavaScript

It would be nice if we could do something about this atrocity.

Love,
CEREBR4L

In-Chat Wiki (approach) Floods View

Camperbot's wiki invocation (via such commands as explain, help, etc.,) results in, potentially, large wiki pages that can contain: multiple lines, static (or dynamic gif) images and other media that disrupts the chat window (both on desktop/ and mobile platforms). Would it be possible to limit summary to 2-4 lines and provide the actual link to the wiki?

Remove/Improve "Add a Wiki" response

Right now if you search for something using the wiki command and it's not found you get a message like this:
image
The URL is no longer valid because we turned off the main Wiki commits. Now you need to go through the PR process on the main Wiki.

Maybe we need an article on how to add articles? Anyway, we need to remove this message for now.

Project Ban Hammer

Project Ban Hammer

In order to facilitate troll extermination we need a system to promote campers to admins in Gitter without giving them write access on Free Code Camp org. We can do this. We have the power.

This will come in three parts.

  • Promote CamperBot's github user to an owner on FCC org.
  • Create a command where camperbot will enter the text /ban @<someUser> in all our main chat rooms.
  • Checks if the user giving the command is a FCC admin (This will be a list on the server that will not be tracked here on the Repo)

Need to make bot recover from API errors

When camperbot hit the cloudflare DDoS protection it stopped accepting thanks and would not recover without a restart. camperbot should be able to recover from an error like that.

Tests shouldn't rely on live wiki data.

This makes some of the tests incredibly brittle. Our build is broken again because the wiki changed. Tests that rely on wiki type data should have data mocked for them.

Add per-camper "Thank You" rate limit

No more than X Thanks Yous per minute/hour/etc. Also, maybe no more than ?10? per thank you. Don't award any points at all if there are more than a certain number of @mentions in a message?

We had an issue where someone came into the main channel and spammed thank yous A LOT. It took a long time for Camperbot to process them all and could have acted like a DOS to the API and Camperbot.

Camperbot is down

Camperbot is down across all the chat rooms since today (09/20), that I know of. Just FYI.

Camper bot - Wiki Migration

As discussed earlier with @Rafase282 in the chat:

Camperbot will no longer be able to suggest any of the wiki articles including:

  1. Solution hints
  2. Rooms
  3. Articles
  4. Any other help topic

Hence the course of action is now to:

  • Close all the open issues are pull requests with after a thorough audit.
  • Fix any issues relevant to chat and clean up this repository of the wiki related logic.
  • If it receives any command for wiki, respond with a migration message.
  • Deploy the bot.

Note : Its functionality to thank people will remain as such.
But any relevant help links should be removed or changed to forum links if available

/cc @FreeCodeCamp/issue-moderators
Refer freeCodeCamp/freeCodeCamp#9731

User not found error message wording

The bot currently says "could not find receiver for user". It should provide a better worded error message when it can't find a user for brownie points.

screen shot 2015-12-04 at 2 23 15 pm

example.config.json breaking new features.

It looks like copying example.config.json to config.json is breaking Travis CI tests. See PR from @abhisekp here (scroll down)

It's an easy fix. Move the example to config.json and update the readme. The code itself relies on config.json which is why the test fails.

It makes sense for users who don't need a custom bot user not to need to alter a config.json anyway.

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.