3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-30 16:09:27 +01:00

add api key to config

This commit is contained in:
Douglas Gardner 2013-01-30 12:27:08 +00:00
parent 251d69194b
commit e1a8360b27
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
{
"dependencies": [ "command" ],
"ignorable": true,
"help": "http://github.com/reality/depressionbot/blob/master/modules/rain/README.md"
"help": "http://github.com/reality/depressionbot/blob/master/modules/rain/README.md",
"apikey": "1234567890abcdef"
}

View File

@ -8,6 +8,7 @@ var request = require('request'),
var rain = function(dbot) {
var commands = {
'~rain': function(event) {
var apikey = dbot.config.rain.apikey;
var precip = event.params[1];
var score = 2 * Math.pow(precip,0.5);
score = Math.ceil(score);