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