Mods
This commit is contained in:
		
							
								
								
									
										9
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								main.py
									
									
									
									
									
								
							| @@ -52,6 +52,12 @@ def extract_range(string): | ||||
| def clean_list(lst): | ||||
| 	return list(filter(lambda x: x != "", lst)) | ||||
|  | ||||
| def string_to_number(input_string): | ||||
| 	hash_value = hash(input_string) | ||||
| 	absolute_hash = abs(hash_value) | ||||
| 	scaled_number = absolute_hash % 1000 | ||||
| 	return scaled_number | ||||
|  | ||||
| headers = { | ||||
| 	"User-Agent": "gluebot", | ||||
| 	"Origin": "https://deek.chat", | ||||
| @@ -213,6 +219,9 @@ async def gif_numbers(arg, room_id): | ||||
| 			if numbers[0] < numbers[1]: | ||||
| 				num = random_int(numbers[0], numbers[1]) | ||||
|  | ||||
| 		if num == -1: | ||||
| 			num = string_to_number(arg) | ||||
|  | ||||
| 	if num < 0: | ||||
| 		num = random_int(0, 999) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Auric Vente
					Auric Vente