Tracking username length limit in data file.

This commit is contained in:
alwayscompiling
2022-07-20 22:17:20 -04:00
parent 374632bbc6
commit 090184c1e9
4 changed files with 9 additions and 5 deletions
+3 -1
View File
@@ -43,7 +43,9 @@ class SubmissionListener(commands.Cog, name="Message Listener"):
files=[await attch.to_file() for attch in message.attachments],
)
elif state == SubmissionState.NAME and message.content:
submission_objects[message.author.id]["username"] = message.content[:12]
submission_objects[message.author.id]["username"] = message.content[
: highscores_data["username_length"]
]
embed = get_submission_embed(message.author.id)
await submission_message.edit(
embed=embed,
+3 -1
View File
@@ -201,7 +201,9 @@ class SubmissionCreateButton(nextcord.ui.View):
"boss_name": boss_name,
"score": "",
"category": "",
"username": interaction.user.display_name.split("|")[0][:12],
"username": interaction.user.display_name.split("|")[0][
: highscores_data["username_length"]
],
}
embed = get_submission_embed(interaction.user.id)