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:
parent
251d69194b
commit
e1a8360b27
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"dependencies": [ "command" ],
|
"dependencies": [ "command" ],
|
||||||
"ignorable": true,
|
"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"
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ var request = require('request'),
|
|||||||
var rain = function(dbot) {
|
var rain = function(dbot) {
|
||||||
var commands = {
|
var commands = {
|
||||||
'~rain': function(event) {
|
'~rain': function(event) {
|
||||||
|
var apikey = dbot.config.rain.apikey;
|
||||||
var precip = event.params[1];
|
var precip = event.params[1];
|
||||||
var score = 2 * Math.pow(precip,0.5);
|
var score = 2 * Math.pow(precip,0.5);
|
||||||
score = Math.ceil(score);
|
score = Math.ceil(score);
|
||||||
|
Loading…
Reference in New Issue
Block a user