Updated Mastodon actually have correct finnish verb. Allowed dice throws to have text after the command.
This commit is contained in:
		
							parent
							
								
									27a58c4522
								
							
						
					
					
						commit
						e3f9491dcc
					
				| @ -11,7 +11,7 @@ class Dice extends BasePlugin { | ||||
| 
 | ||||
|   test(input) { | ||||
|     var res = null; | ||||
|     if (res = input.match(/^\.heit(a|ä) ([0-9]+)d([0-9]+)$/i)) { | ||||
|     if (res = input.match(/^\.heit(a|ä) ([0-9]+)d([0-9]+)( ([ \w])*)*$/i)) { | ||||
|       return true; | ||||
|     } | ||||
|     if (res = input.match(/^\.heit(a|ä) voltti homo$/i)) { | ||||
| @ -54,7 +54,7 @@ class Dice extends BasePlugin { | ||||
|   result(input) { | ||||
|     // Different cases
 | ||||
|     let res = null | ||||
|     if (res = input.match(/^\.heit(a|ä) ([0-9]+)d([0-9]+)$/i)) { | ||||
|     if (res = input.match(/^\.heit(a|ä) ([0-9]+)d([0-9]+)( ([ \w])*)*$/i)) { | ||||
|       var th = this.getDiceString(res[2], res[3]); | ||||
|       return 'Heitettiin: '+th; | ||||
|     } | ||||
|  | ||||
| @ -71,9 +71,9 @@ class Mastodon extends BasePlugin { | ||||
| 
 | ||||
|       if (host !== null && tootId !== null) { | ||||
|         that.getToot(host, tootId).then(function(toot) { | ||||
|           resultResolve('Töötti: ' + toot); | ||||
|           resultResolve('Tuuttaus: ' + toot); | ||||
|         }, function(error) { | ||||
|           resultReject('Töötti: Jokin virhe tapahtui'); | ||||
|           resultReject('Tuuttaus: Jokin virhe tapahtui'); | ||||
|         }); | ||||
|       } | ||||
|     }); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user