added a name limit for idols, and escaped mentions from names
This commit is contained in:
		
							parent
							
								
									f9e41031ad
								
							
						
					
					
						commit
						74e35f71e3
					
				@ -67,7 +67,10 @@ async def on_message(msg):
 | 
				
			|||||||
            meme = True
 | 
					            meme = True
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            meme = False
 | 
					            meme = False
 | 
				
			||||||
        player_name = command.split(" ",1)[1]
 | 
					        player_name = discord.utils.escape_mentions(command.split(" ",1)[1])
 | 
				
			||||||
 | 
					        if len(player_name) >= 70:
 | 
				
			||||||
 | 
					            await msg.channel.send("That name is too long. Please keep it below 70 characters, for my sake and yours.")
 | 
				
			||||||
 | 
					            return
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            player_json = ono.get_stats(player_name)
 | 
					            player_json = ono.get_stats(player_name)
 | 
				
			||||||
            db.designate_player(msg.author, player_json)
 | 
					            db.designate_player(msg.author, player_json)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user