Comments (12)
dupe of #35
from gitterbot.
from gitterbot.
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.
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.
@irinatag the code for roomMessages is now using regex pls check it out!
from gitterbot.
@dcsan sure!
from gitterbot.
I made some more changes to it, please pull from branch 28
from gitterbot.
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.
oops, this commit 0ec2592
quite a gnarly merge
from gitterbot.
@dcsan ok, thanks for doing that! I'll work on it.
from gitterbot.
@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.
not sure if you have a ticket for that yet. otherwise, seems to be working, but I'm also a regex noob.
from gitterbot.
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)
- crash on startup? HOT 9
- uptime monitor HOT 5
- Delete ignored files HOT 1
- nodemon install fails
- Broken wiki links HOT 4
- tighten regex on troll HOT 1
- GA tracking HOT 4
- Multiple thanks to a user with multiple mentions
- stagger room joins
- Bot crashes at startup if no file exists in wiki directory HOT 3
- Update and Explain commands conflict or clash
- Gitterbot's [ Check the map? ] functionality doesn't work properly - needs to be all lower case HOT 2
- Change "Falsey" to "Falsy" for Camperbot in HelpBonfires Section HOT 6
- Internal Wiki Links are not parsed/displayed properly HOT 2
- Remove Plug.dj commands and links HOT 1
- Bot is down in /HelpBonfires - 10/26 HOT 11
- Sort based on brownie points on thank
- Bot reports api offline HOT 2
- explain code command bug HOT 1
- [Feature Request] Big Text Announcements
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitterbot.