mirror of
				https://github.com/keanuplayz/TravBot-v3.git
				synced 2024-08-15 02:33:12 +00:00 
			
		
		
		
	Fixed a bug in .emote command when the selector number is too large
This commit is contained in:
		
							parent
							
								
									053b835e89
								
							
						
					
					
						commit
						066d210107
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -101,7 +101,7 @@ function processEmoteQuery(query: string[], isFormatted: boolean): string[] { | ||||||
|         // Find all similar emote candidates within certian threshold and select Nth top one according to the selector.
 |         // Find all similar emote candidates within certian threshold and select Nth top one according to the selector.
 | ||||||
|         const similarEmotes = searchSimilarEmotes(emote); |         const similarEmotes = searchSimilarEmotes(emote); | ||||||
|         if (similarEmotes.length > 0) { |         if (similarEmotes.length > 0) { | ||||||
|             selector = Math.min(selector, similarEmotes.length); |             selector = Math.min(selector, similarEmotes.length - 1); | ||||||
|             return similarEmotes[selector].toString(); |             return similarEmotes[selector].toString(); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue