diff --git a/modules/poll.js b/modules/poll.js index 52beeab..31700ae 100644 --- a/modules/poll.js +++ b/modules/poll.js @@ -3,6 +3,9 @@ var poll = function(dbot) { var commands = { '~newpoll': function(event) { var name = event.input[1]; + var options = event.input[2].split(','); + var description = event.input[3]; + if(name === undefined || name === 'help') { event.reply(dbot.t('newpoll_usage')); } else { @@ -11,20 +14,40 @@ var poll = function(dbot) { } else { polls[name] = { 'name': name, + 'description': description, 'owner': event.user, - 'votes': {} + 'votes': {}, + 'votees': [] }; - var options = event.input[2].split(','); for(var i=0;i