Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    noncentz
    @noncentz
    Doesn't need to get accept, the other commits would be nice though
    up to you guys
    I liked the idea u had for using camperbot to send someone love @abhisekp , its thanks without the brownies
    GitterBotX
    @GitterBotX
    noncentz sends brownie points to @abhisekp :sparkles: :thumbsup: :sparkles:
    :cookie: 2430 | @abhisekp | http://www.freecodecamp.com/abhisekp
    Abhisek Pattnaik
    @abhisekp
    love u cbot
    GitterBotX
    @GitterBotX
    @abhisekp, :sparkles: :heart_eyes: :sparkles:
    Abhisek Pattnaik
    @abhisekp
    @SaintPeter like this :D :point_up:
    love @camperbot
    GitterBotX
    @GitterBotX
    @abhisekp, :sparkles: :heart_eyes: :sparkles:
    Rex Schrader
    @SaintPeter
    love camperbot
    GitterBotX
    @GitterBotX
    @SaintPeter, :sparkles: :heart_eyes: :sparkles:
    SaintPeter @SaintPeter laughs
    Rex Schrader
    @SaintPeter
    I love you camperbot!
    SaintPeter @SaintPeter cries
    GitterBotX
    @GitterBotX
    @SaintPeter, :sparkles: :heart_eyes: :sparkles:
    Abhisek Pattnaik
    @abhisekp
    Rex Schrader
    @SaintPeter
    Oh, it just took a bit
    Abhisek Pattnaik
    @abhisekp
    my net is slow :/
    Rex Schrader
    @SaintPeter
    Feed the hampsters
    noncentz
    @noncentz
    how about a slots function > > [ :lemon: :bell: :apple: :cherries: :gem: ] maybe pick 3 and return :moneybag: 50$
    Rex Schrader
    @SaintPeter
    Heh
    Abhisek Pattnaik
    @abhisekp
    @noncentz that one was in our casual room :D
    pbot
    Rex Schrader
    @SaintPeter
    Well, I'd like to get the important fixes in first.
    The \@all fix
    Abhisek Pattnaik
    @abhisekp
    thanks @/all fixed
    GitterBotX
    @GitterBotX
    sorry abhisekp, you can't send brownie points to yourself! :sparkles: :sparkles:
    Abhisek Pattnaik
    @abhisekp
    lol
    noncentz
    @noncentz
    it's hacky because of @all
    Abhisek Pattnaik
    @abhisekp
    but it doesn't hit the API
    Rex Schrader
    @SaintPeter
    Humm - can we just break that out into a seperate if statement that returns something more appropriate?
    Or simply omits the message entirely?
    noncentz
    @noncentz
    the / is getting stripped before it winds up as a mention
    Rex Schrader
    @SaintPeter
    I'd prefer that it ignored them completely
    The \@mentions are an array, right? Can we just filter it?
    noncentz
    @noncentz
    you're already looping mentions for thanks, filtering is probably taxing... maybe we add an else if and get rid of the 'you can't send brownie points to yourself!' ?
    Abhisek Pattnaik
    @abhisekp
    @noncentz i think we just refactor this
      const namesList = mentions.reduce((userList, mention) => {
          const toUser = mention.screenName.toLowerCase();
    
          if (toUser !== fromUser && toUser !== 'all'  && userList.indexOf(toUser) === -1) {
            const apiPath = '/api/users/give-brownie-points?receiver=' + toUser +
                            '&giver=' + fromUser;
            HttpWrap.callApi(apiPath, options, thanksCommands.showInfoCallback);
            userList.push(toUser);
          }
          return userList;
        }, []);
    
        if (namesList.length > 0) {
          const toUserMessage = namesList.join(' and @');
          return '> ' + fromUser + ' sends brownie points to @' + toUserMessage +
            ' :sparkles: :thumbsup: :sparkles: ';
        } else {
          return '> sorry ' + fromUser + ', you can\'t send brownie points to ' +
            'yourself! :sparkles: :sparkles: ';
        }
    noncentz
    @noncentz
    @abhisekp :zzz:
    Abhisek Pattnaik
    @abhisekp
    @noncentz :(
    noncentz
    @noncentz
    didn't test
        if (namesList.length == 1 && namesList[0] == 'all') {
          return;
        }
        else if (namesList.length > 0) {
    Abhisek Pattnaik
    @abhisekp
    hmmm
    @noncentz what's ur time?
    and timezone?
    noncentz
    @noncentz
    12:34pm , but I was up all night
    Abhisek Pattnaik
    @abhisekp
    oh! very sory! i made u up all nite?
    thanks for PR tho. @noncentz i'll see to it. :+1:
    GitterBotX
    @GitterBotX
    abhisekp sends brownie points to @noncentz :sparkles: :thumbsup: :sparkles:
    :cookie: 454 | @noncentz | http://www.freecodecamp.com/noncentz
    noncentz
    @noncentz
    my fault... I'm off to sleep for a bit. :wave: