Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    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:
    Brian
    @sludge256
    @abhisekp Is the crashing still an issue?
    Abhisek Pattnaik
    @abhisekp
    @sludge256 nope!
    @sludge256
    1. the bot is run by PM2 which restarts if crashed.
    2. the messages command was unwanted command so removed
    Brian
    @sludge256
    So it was fixed for your bot and CamperBot?
    Abhisek Pattnaik
    @abhisekp
    @sludge256 nope! The PR is not yet complete. It has some more things to be fixed. He has gone to sleep. I'm looking at it now.
    Brian
    @sludge256
    @abhisekp :+1:
    Abhisek Pattnaik
    @abhisekp
    thanks @someone
    GitterBotX
    @GitterBotX
    abhisekp sends brownie points to @someone :sparkles: :thumbsup: :sparkles:
    :warning: could not find receiver for someone
    Abhisek Pattnaik
    @abhisekp
    thanks @GitterBotX
    GitterBotX
    @GitterBotX
    abhisekp sends brownie points to @gitterbotx :sparkles: :thumbsup: :sparkles:
    :cookie: 18 | @gitterbotx | http://www.freecodecamp.com/gitterbotx
    Abhisek Pattnaik
    @abhisekp
    botstatus
    GitterBotX
    @GitterBotX
    All bot systems are go!
    botVersion: 0.0.12
    env: GitterBotX
    botname: GitterBotX
    Abhisek Pattnaik
    @abhisekp
    thanks @GitterBotX
    GitterBotX
    @GitterBotX
    abhisekp sends brownie points to @gitterbotx :sparkles: :thumbsup: :sparkles:
    :warning: abhisekp already gave gitterbotx points
    Abhisek Pattnaik
    @abhisekp
    thanks @GitterBotX
    GitterBotX
    @GitterBotX
    :cookie: 19 | @gitterbotx | http://www.freecodecamp.com/gitterbotx
    abhisekp sends brownie points to @gitterbotx :sparkles: :thumbsup: :sparkles:
    Abhisek Pattnaik
    @abhisekp
    thanks @GitterBotX
    GitterBotX
    @GitterBotX
    abhisekp sends brownie points to @gitterbotx :sparkles: :thumbsup: :sparkles:
    :warning: abhisekp already gave gitterbotx points
    Abhisek Pattnaik
    @abhisekp
    thanks @GitterBotX
    GitterBotX
    @GitterBotX
    abhisekp sends brownie points to @gitterbotx :sparkles: :thumbsup: :sparkles:
    abhisekp sends brownie points to @gitterbotx :sparkles: :thumbsup: :sparkles:
    :warning: abhisekp already gave gitterbotx points
    :warning: abhisekp already gave gitterbotx points
    Abhisek Pattnaik
    @abhisekp
    thanks @GitterBotX
    thanks @GitterBotX
    GitterBotX
    @GitterBotX
    abhisekp sends brownie points to @gitterbotx :sparkles: :thumbsup: :sparkles: