Code Monkey home page Code Monkey logo

mentorbot's People

Contributors

peterkos avatar sjmiller7 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mentorbot's Issues

Role name method in Topic model

Topics are stored in the server's role list in the format Topic | <Topic.name>. This Topic | prefix has to be prepended (PREFIX + Topic.getName()) everywhere that mentorbot interacts with the server's role list. It would be better to create a new method, Topic.getRoleName(), that handles this within the model itself, so that the controller layer does not have to worry about this concatenation.

User-facing messages should be stored in a static class

Frameworks like the Android app development system tend to store all user-facing text in a key-value store. This makes it easier to implement translations and to quickly update messages. @peterkos suggested a similar system: generate the $help embed and error messages from a static class to keep most/all of the user-facing text in one place.

Tasks

  • Create a BotResponses static class that contains a static getter for each message. Look at authbot's BotRepsonses.java for reference.
  • Replace all existing message strings and embed builders calls to BotResponses static getters

Allow each server to restrict commands to a specific channel

Certain commands, such as $showqueue, contain information that should be kept somewhat private. Restricting sensitive commands like these to a specific channel would allow server administrators to ensure that the privacy of their users will not be violated.

Perhaps create a custom role that stores a channel ID (e.g. MentorChannel:<base64 channel ID>)? This allows us to keep on our trend of storing all persistent per-server data in the server's role list itself, thus not requiring a separate database solution.

Users should be notified of invalid input

Most user input is validated, but in several places, if invalid input is received, the command functions simply return without displaying an error message to the user. Users should instead receive a warning when they provide invalid input, format a command incorrectly, etc.

This is strongly related to #9, so we should probably resolve that issue first.

Queue messages

Allow users to add a message when entering the queue. This will show up in $showqueue and will allow mentors to prune the queue more easily (#21).

Set up Heroku hosting

We need this to be hosted permanently for Brickhack 7. @Madrugaur had good success hosting authbot on Heroku; we should be able to do the same for this project.

Automate placing participants into topic channels

Current user flow (discussed at Jan 30 meeting):

  • User runs $queue <topic>
  • Mentor runs $ready <topic>
  • <topic> text/voice channels are created in Mentoring category
  • Channels are deleted after user and mentor leave voice channel

Issues with flow:

  • "user and mentor leave voice channel" assume voice channel use, which isn't very accessibility-friendly
    • Ask deaf/HoH users to join and leave voice channel?
    • Mentor runs $finish command inside text channel to end interaction?

Help command should hide inaccessible commands

@peterkos suggested that users that call $help should not be able to see commands that they do not have permission to run. For example, a regular user should not see help info for $ready, and a mentor should not see help info for $maketopic.

Building via Gradle fails: "no main manifest attribute"

I am currently working on documentation, and while trying to compile from the command line, the generated .jar file fails to run:

...\mentorbot>java -jar build\libs\mentorbot-1.0-SNAPSHOT.jar
no main manifest attribute, in build\libs\mentorbot-1.0-SNAPSHOT.jar

It appears that the main class isn't specified in the .jar file because jar.manifest.Class-Path isn't set in build.gradle (source).

Restrict mentor commands to roles instead of admin

Currently, only administrators are allowed to use mentor commands like $ready. However, this is insecure in production, especially considering the large number of (unvetted) mentors that could be participating in BrickHack. Checking for the existing topic roles instead of administrator status would alleviate this issue.

Group topics into categories

@peterkos's suggestion:

[It] might be cool to have separate categories of topics: a set for langs, a set for frameworks, a set for design help, a set for "how to build X" (where to start building backend, app, etc.)

This could be implemented by adding another layer to the tree structure:

Server
 |_ Category
    |_ Topic
        |_ LinkedList<Member> queue

Document bot/server setup, commands in GitHub Wiki

BrickHack and other hackathon servers will likely be setup by people without intimate knowledge of this bot's inner workings. Proper documentation is needed to explain how to correctly setup these servers so that the bot may function effectively.

We should also take time to add internal (read: in the code) documentation, especially for things like the per-command methods.

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.