forked from GitHub/dbot
fix profile
This commit is contained in:
parent
80b76c9325
commit
1e995d7bba
@ -2,7 +2,7 @@ var _ = require('underscore')._;
|
|||||||
|
|
||||||
var commands = function(dbot){
|
var commands = function(dbot){
|
||||||
var commands = {
|
var commands = {
|
||||||
'~getprop': function(event){
|
'~get': function(event){
|
||||||
if(event.params[1]){
|
if(event.params[1]){
|
||||||
if(_.has(this.config.schema.profile, event.params[1])){
|
if(_.has(this.config.schema.profile, event.params[1])){
|
||||||
this.api.getProperty(event.server, event.user, event.params[1], function(reply){
|
this.api.getProperty(event.server, event.user, event.params[1], function(reply){
|
||||||
@ -14,7 +14,7 @@ var commands = function(dbot){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
'~setprop': function(event){
|
'~set': function(event){
|
||||||
if(event.input[1] && event.input[2]){
|
if(event.input[1] && event.input[2]){
|
||||||
if(_.has(this.config.schema.profile, event.input[1])){
|
if(_.has(this.config.schema.profile, event.input[1])){
|
||||||
this.api.setProperty(event.server, event.user, event.input[1], event.input[2], function(reply){
|
this.api.setProperty(event.server, event.user, event.input[1], event.input[2], function(reply){
|
||||||
@ -31,7 +31,7 @@ var commands = function(dbot){
|
|||||||
event.reply(dbot.api.web.getUrl('profile/' + event.server + '/' + user));
|
event.reply(dbot.api.web.getUrl('profile/' + event.server + '/' + user));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
commands['~setprop'].regex = [/~setprop ([^ ]+) (.+)/, 3];
|
commands['~set'].regex = [/~set ([^ ]+) (.+)/, 3];
|
||||||
|
|
||||||
return commands;
|
return commands;
|
||||||
};
|
};
|
||||||
|
@ -8,9 +8,10 @@
|
|||||||
"tagline": null,
|
"tagline": null,
|
||||||
"avatar": null,
|
"avatar": null,
|
||||||
"bio": null,
|
"bio": null,
|
||||||
|
"lastfm": null,
|
||||||
"favourites": {
|
"favourites": {
|
||||||
"colour": null
|
"colour": null
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": [ "web", "quotes", "users" ]
|
"dependencies": [ "web", "quotes", "users" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user