mirror of
				https://github.com/reality/dbot.git
				synced 2025-10-31 04:17:26 +01:00 
			
		
		
		
	fix profile
This commit is contained in:
		
							parent
							
								
									80b76c9325
								
							
						
					
					
						commit
						1e995d7bba
					
				| @ -2,7 +2,7 @@ var _ = require('underscore')._; | ||||
| 
 | ||||
| var commands = function(dbot){ | ||||
|     var commands = { | ||||
|         '~getprop': function(event){ | ||||
|         '~get': function(event){ | ||||
|             if(event.params[1]){ | ||||
|                 if(_.has(this.config.schema.profile, event.params[1])){ | ||||
|                     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(_.has(this.config.schema.profile, event.input[1])){ | ||||
|                     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)); | ||||
|         } | ||||
|     }; | ||||
|     commands['~setprop'].regex = [/~setprop ([^ ]+) (.+)/, 3]; | ||||
|     commands['~set'].regex = [/~set ([^ ]+) (.+)/, 3]; | ||||
| 
 | ||||
|     return commands; | ||||
| }; | ||||
|  | ||||
| @ -8,9 +8,10 @@ | ||||
|             "tagline": null, | ||||
|             "avatar": null, | ||||
|             "bio": null, | ||||
|             "lastfm": null, | ||||
|             "favourites": { | ||||
|               "colour": null | ||||
|             }, | ||||
|             } | ||||
|         } | ||||
|     }, | ||||
|     "dependencies": [ "web", "quotes", "users" ] | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 reality
						reality