Giter Site home page Giter Site logo

Comments (12)

dcsan avatar dcsan commented on August 13, 2024

dupe of #35

from gitterbot.

dcsan avatar dcsan commented on August 13, 2024

7e7f678e-3856-11e5-9b39-55ca8c861034

from gitterbot.

dcsan avatar dcsan commented on August 13, 2024

write a GBot.scanInput function, similar to the parseInput
search for thanks anywhere inside a message.
get the @mention people in that message
send karma to them

from gitterbot.

dcsan avatar dcsan commented on August 13, 2024

ok bit more thoughts on how to do this.

the scanInput method gets called on every message currently:
https://github.com/dcsan/gitterbot/blob/master/nap/data/rooms/RoomMessages.js#L105-L112

however, the "thanks" response is not just static text - its a function.
so we could modify the entries in the

 var SharedMessages = {

to also return functions, as well as just static text. its a bit meta but i think this would be a really versatile way to implement this and allow us to have keywords trigger functions.

from gitterbot.

dcsan avatar dcsan commented on August 13, 2024

@irinatag the code for roomMessages is now using regex pls check it out!

from gitterbot.

irinatag avatar irinatag commented on August 13, 2024

@dcsan sure!

from gitterbot.

dcsan avatar dcsan commented on August 13, 2024

I made some more changes to it, please pull from branch 28

image

from gitterbot.

dcsan avatar dcsan commented on August 13, 2024

so this works now with for example the 'txtx' and a @username but can you add a better regex to find the format above on @username thanks and maybe some other options people may type in.

i had to merge in master which included some other changes. this area needs refactoring i think.
@oab00 FYI on this above commit.

from gitterbot.

dcsan avatar dcsan commented on August 13, 2024

oops, this commit 0ec2592

quite a gnarly merge

from gitterbot.

irinatag avatar irinatag commented on August 13, 2024

@dcsan ok, thanks for doing that! I'll work on it.

from gitterbot.

irinatag avatar irinatag commented on August 13, 2024

@dcsan pushed my regex. one issue that's now popping up: the warning that I already gave you points gets logged, but doesn't display to the user.

nap_ irinatag_irinas-macbook-air____dev_gitterbot_nap zsh _51x57
demobot_test-_gitter

not sure if you have a ticket for that yet. otherwise, seems to be working, but I'm also a regex noob.

from gitterbot.

dcsan avatar dcsan commented on August 13, 2024

if you see problems like that it should definitely be a separate issue, or its too hard to track lots of things on one ticket.

from gitterbot.

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.