From 74e35f71e3bb1e315683e665aa27e5cdb18f32ca Mon Sep 17 00:00:00 2001 From: Sakimori Date: Tue, 22 Dec 2020 15:15:18 -0500 Subject: [PATCH] added a name limit for idols, and escaped mentions from names --- the_prestige.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/the_prestige.py b/the_prestige.py index 7765157..597508f 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -67,7 +67,10 @@ async def on_message(msg): meme = True else: 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: player_json = ono.get_stats(player_name) db.designate_player(msg.author, player_json)