Fix some new bugs
This commit is contained in:
		
							parent
							
								
									3e58935f6f
								
							
						
					
					
						commit
						2bc2102a76
					
				
							
								
								
									
										13
									
								
								mod.py
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								mod.py
									
									
									
									
									
								
							| @ -102,7 +102,7 @@ def get_target(message): | |||||||
| 		global users | 		global users | ||||||
| 
 | 
 | ||||||
| 		spl = message.text.split() | 		spl = message.text.split() | ||||||
| 		if len(spl) > 1 and ( spl[1][0] == '@' or spl[2][0] == '@' ): | 		if ( len(spl) > 1 and spl[1][0] == '@' ) or ( len(spl) > 2  and spl[2][0] == '@' ): | ||||||
| 			for i in spl: | 			for i in spl: | ||||||
| 				if i[0] == '@': | 				if i[0] == '@': | ||||||
| 					username = i[1:] | 					username = i[1:] | ||||||
| @ -128,7 +128,7 @@ def get_name(message): | |||||||
| 		# If message with @username | 		# If message with @username | ||||||
| 		if len(text) > 1 and text[1][0] == '@': | 		if len(text) > 1 and text[1][0] == '@': | ||||||
| 			return text[1] | 			return text[1] | ||||||
| 		if len(text) > 1 and text[2][0] == '@': | 		if len(text) > 2 and text[2][0] == '@': | ||||||
| 			return text[2] | 			return text[2] | ||||||
| 		# Reply to message | 		# Reply to message | ||||||
| 		else: | 		else: | ||||||
| @ -147,10 +147,13 @@ def get_time(message): | |||||||
| 		if time: | 		if time: | ||||||
| 			break | 			break | ||||||
| 		for f in list(formats.keys()): | 		for f in list(formats.keys()): | ||||||
| 			print(i, '   ', f) | #			print(i, '   ', f) | ||||||
| 			if f in i: | 			if f in i: | ||||||
| 				time = [i[:-1], int(i[:-1]) * formats[i[-1]][0] , formats[i[-1]][1] ] | 				try: | ||||||
| 				break | 					time = [i[:-1], int(i[:-1]) * formats[i[-1]][0] , formats[i[-1]][1] ] | ||||||
|  | 					break | ||||||
|  | 				except: | ||||||
|  | 					pass | ||||||
| 
 | 
 | ||||||
| 	return time | 	return time | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user