move poll whatsit

This commit is contained in:
Luke Slater 2012-06-22 19:27:59 +01:00
parent 321ffb83c5
commit 17bbccbe98
2 changed files with 3 additions and 4 deletions

View File

@ -1,8 +1,4 @@
var poll = function(dbot) { var poll = function(dbot) {
if(!dbot.db.hasOwnProperty('polls')) {
dbot.db.polls = {};
}
var polls = dbot.db.polls; var polls = dbot.db.polls;
var commands = { var commands = {
'~newpoll': function(event) { '~newpoll': function(event) {

3
run.js
View File

@ -42,6 +42,9 @@ var DBot = function(timers) {
if(!this.db.hasOwnProperty("ignores")) { if(!this.db.hasOwnProperty("ignores")) {
this.db.ignores = {}; this.db.ignores = {};
} }
if(!this.db.hasOwnProperty('polls')) {
this.db.polls = {};
}
// Load Strings file // Load Strings file
this.strings = JSON.parse(fs.readFileSync('strings.json', 'utf-8')); this.strings = JSON.parse(fs.readFileSync('strings.json', 'utf-8'));