hubot-archive / hubot-ingress Goto Github PK
View Code? Open in Web Editor NEWThis project forked from therealklanni/hubot-ingress
Ingress helper commands for Hubot
License: MIT License
This project forked from therealklanni/hubot-ingress
Ingress helper commands for Hubot
License: MIT License
When someone says "I have the black guardian badge" add the guardian5 badge, for example. Bonus: if someone says "I have the guardian badge" add the lowest rank (guardian1).
Adding badges causes failures
To reproduce:
hubot I have the founder badge
Result:
[Mon Aug 29 2016 22:34:55 GMT-0400 (EDT)] ERROR TypeError: Cannot read property 'U1G3C40F2' of undefined
at Object.badges.forUser (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:162:12, <js>:108:56)
at Object.badges.del (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:157:7, <js>:99:66)
at Object.badges.add (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:153:9, <js>:91:18)
at TextListener.callback (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:206:9, <js>:154:18)
at executeListener (/home/will/hubot/node_modules/hubot/src/listener.coffee:65:11, <js>:53:19)
at allDone (/home/will/hubot/node_modules/hubot/src/middleware.coffee:44:37, <js>:34:16)
at /home/will/hubot/node_modules/async/lib/async.js:274:13
at Object.async.eachSeries (/home/will/hubot/node_modules/async/lib/async.js:142:20)
at Object.async.reduce (/home/will/hubot/node_modules/async/lib/async.js:268:15)
at /home/will/hubot/node_modules/hubot/src/middleware.coffee:49:7, <js>:37:22
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)
Adding badges causes failures ::
Entering ::
herbert I have the founder badge
Causes ::
[Mon Aug 29 2016 22:34:55 GMT-0400 (EDT)] ERROR TypeError: Cannot read property 'U1G3C40F2' of undefined
at Object.badges.forUser (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:162:12, :108:56)
at Object.badges.del (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:157:7, :99:66)
at Object.badges.add (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:153:9, :91:18)
at TextListener.callback (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:206:9, :154:18)
at executeListener (/home/will/hubot/node_modules/hubot/src/listener.coffee:65:11, :53:19)
at allDone (/home/will/hubot/node_modules/hubot/src/middleware.coffee:44:37, :34:16)
at /home/will/hubot/node_modules/async/lib/async.js:274:13
at Object.async.eachSeries (/home/will/hubot/node_modules/async/lib/async.js:142:20)
at Object.async.reduce (/home/will/hubot/node_modules/async/lib/async.js:268:15)
at /home/will/hubot/node_modules/hubot/src/middleware.coffee:49:7, :37:22
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)
When using any of the badge commands on a string which isn't a slack user I see an exception in the log. I'd expect for the script to either succeed and allow storage with arbitrary strings or error with a invalid user error.
A discussion could be opened to add "you know nothing" meme
http://knowyourmeme.com/memes/you-know-nothing-jon-snow
The text on the gif would be the best, but different approaches are possible.
either
you know nothing,
or
you know nothing // you think you can restart server over lunchtime? you know nothing
or
you know nothing
As the subject indicates, I would be interested in helping with maintaining this package.
While testing the bot, we discovered that the badge commands will not respond if the user has a period in their name.
Any chance of a badge update to include the latest anomaly badge?
Thanks, as always for your work.
When someone says 'list badges' reply with a list of the badges types (no need to show each rank for ranked badges).
I think a link range command would be useful. Something like:
Hubot link range [level] [amps]
would return the portal distance it could link
Hubot link range [distance] [num agents] [amps]
would return the portal level needed and fewest, lowest level agents needed to build it without amps
if num agents is provided, then the same but with that number of agents
if amps is provided, then using those link amps
amps would probably need to be something more than just a number. Maybe syntax like 1R2V?
Initially I will only be able to assist with adding new badges and easy things but I should be able to move on to more advanced items as I become more familiar.
My bad. No redis ... all is well. Sorry for the bother!
When issuing badge commands i am getting the error below. I am using hubot-ingress 0.4.0 with all node and nom bits installed today at their current versions. Any guidance to where i should look? I saw another person with badge problems and it was mentioned that there could be a problem with reds configuration? It does say it is using default reds on localhost:6379, so it seems to be working.
Any help would be great!
Thanks
--Ryan
[Wed Dec 31 2014 20:47:55 GMT-0500 (EST)] ERROR TypeError: Cannot read property 'U030JFAM1' of undefined
at Object.badges.forUser (/home/corvock/fogbot/node_modules/hubot-ingress/src/badges.coffee:54:12, :39:56)
at Object.badges.del (/home/corvock/fogbot/node_modules/hubot-ingress/src/badges.coffee:49:7, :30:66)
at Object.badges.add (/home/corvock/fogbot/node_modules/hubot-ingress/src/badges.coffee:45:9, :22:18)
at TextListener.callback (/home/corvock/fogbot/node_modules/hubot-ingress/src/badges.coffee:78:9, :71:18)
at TextListener.Listener.call (/home/corvock/fogbot/node_modules/hubot/src/listener.coffee:27:7, :23:14)
at Robot.receive (/home/corvock/fogbot/node_modules/hubot/src/robot.coffee:197:9, :142:33)
at SlackBot.Adapter.receive (/home/corvock/fogbot/node_modules/hubot/src/adapter.coffee:66:5, :47:25)
at SlackBot.message (/home/corvock/fogbot/node_modules/hubot-slack/src/slack.coffee:135:7, :166:21)
at Client. (/home/corvock/fogbot/node_modules/hubot-slack/src/slack.coffee:1:1, :3:61)
at Client.emit (events.js:95:17)
at Client.onMessage (/home/corvock/fogbot/node_modules/hubot-slack/node_modules/slack-client/src/client.js:439:14)
at WebSocket. (/home/corvock/fogbot/node_modules/hubot-slack/node_modules/slack-client/src/client.js:142:24)
at WebSocket.emit (events.js:98:17)
at Receiver.self._receiver.ontext (/home/corvock/fogbot/node_modules/hubot-slack/node_modules/slack-client/node_modules/ws/lib/WebSocket.js:697:10)
at Receiver.opcodes.1.finish (/home/corvock/fogbot/node_modules/hubot-slack/node_modules/slack-client/node_modules/ws/lib/Receiver.js:397:14)
at Receiver.expectHandler (/home/corvock/fogbot/node_modules/hubot-slack/node_modules/slack-client/node_modules/ws/lib/Receiver.js:384:31)
at Receiver.add (/home/corvock/fogbot/node_modules/hubot-slack/node_modules/slack-client/node_modules/ws/lib/Receiver.js:93:24)
at CleartextStream.firstHandler (/home/corvock/fogbot/node_modules/hubot-slack/node_modules/slack-client/node_modules/ws/lib/WebSocket.js:678:22)
at CleartextStream.emit (events.js:95:17)
at CleartextStream. (stream_readable.js:765:14)
at CleartextStream.emit (events.js:92:17)
at emitReadable (_stream_readable.js:427:10)
at _stream_readable.js:420:7
at process._tickCallback (node.js:442:13)
Also the "I do not" variant.
the agent-stats api https://apidocs.agent-stats.com/ would allow the hubot to lookup an agents stats or information and report back after receiving a request for information. I would imagine a group would need to be setup for the community so that the bot can access the information.
examples
USER - Hubot, How much AP do I have? (alternate could be how much ap does @user have)
HUBOT - @user has 39,999,999 as of their last Agent-stats upload on 1-1-2016.
USER - Hubot, How long till I get level 16? (alternate could be how long till @user gets level 16)
HUBOT - @user has 39,999,999 as of their last agent-stats upload on 1-1-2016. Agent Stats Predicts them getting level 16 on 1-2-2016
USER - Hubot, who in our group has the most AP?
HUBOT - According to agent stats @user1 has 200,000,000 ap while @user2 is in second place at 69,00,000 ap.
USER- Hubot, how close to the next Purifier badge am I? (or is @agent)
HUBOT - @user needs to destroy 5000 more resonators to hit the next tier for :purifier:. agent-stats predicts this will occur on 1-1-2017 per the monthly stats. User last updated their stats on 1-1-2016
these are just some examples of possible things that could be asked. I am sure more people could think of additional items.
Attempting to query the cps on a given date is returning date -1
sambot cps on 8/14/2015
sambotBOT [2:03 PM]
The checkpoints on Thu, August 13th 2015 occur at: 1AM EDT, 6AM EDT, 11AM EDT, 4PM EDT, 9PM EDT.
Its possible that this is a configuration issue.
Also if you do a query on an invalid date it returns the CPs on invalid date
sambot cps on august 14th
sambotBOT [2:01 PM]
The checkpoints on Invalid date occur at: Invalid date,Invalid date,Invalid date,Invalid date,Invalid date.
I noticed that the bot has issues when interpreting some strings from users who don't fully understand a comma separated list when trying to add badges, would it be possible to change the method of split from .split(',')
to .split(/[ ,;]/)
to handle more delimiters that people could use? (i admit to most likely being the only one who would use the ;
but its easy to add)
Project looks a bit neglected, potentially interested in helping maintain it.
(Title reworded to shut up gitmagic-bot)
As the subject indicates, I would be interested in helping with maintaining this package.
Re-opening request from #58, which inadvertently used the wrong username to open the issue.
Seeing the badge color duplicated a dozen times is a bit excessive. Instead, print the badge color once followed by a multiplier.
so i am running this on windows and i have the hubot_google_geocode_key in my environment vars with the api key also, i know it works because when i echo %name% it the api key comes back. the problem is that when i am running the bot it will not find any locations, i have a normal google maps script that has no problem finding the location on the maps but when it comes to this script it will not return intel links. any help would be much appreciated
The frogs in my area are master glyph hackers and want their badges!
I have a feature request: The ability for admins to award special badges, whether for serious things like local ops or competitions, or just fun stuff like a bad linker or other fun poking.
It would be nice if the "hubot intelmap" listener would also respond to "hubot intel map". We have many users who use their phones exclusively, and autocorrect likes to add that space.
hubot I have the recharger3 badge
does not return anything. none of the badge-related commands return anything, unless when trying to add a badge to your profile you enter an invalid badge name (leading me to think the issue lies somewhere after line 75 of https://github.com/hubot-scripts/hubot-ingress/blob/master/src/badges.coffee)
I am not the administrator of the team, so if more information is needed I can get them to pop in here.
Love this script. 2 requests:
Thanks!
The output from cycle-times.coffee for MUs needed to win a cycle is incorrect when the Enlightened are losing. Since the difference is calculated using ENL - RES and then if the difference is < 1 it is cast to zero, and then regardless 1 is added to the difference, any time the ENL are losing the output will be 1 MU for them to win. This should be refactored slightly to use Math.abs() instead to always have a positive value returned.
To reproduce, issue the command "mu needed 506114 149875" (which is what I used to discover it, but as long as the RES score is higher than the ENL score, any values will work for this). Depending upon the number of checkpoints into the cycle you are, the value will vary, but you should see a value higher than 1 for the number of MUs needed.
Write a guide detailing the best practices for submitting PRs to this repository. Should we also include a section for maintainers as well, now that we have a couple?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.