Magic Numbers Everywhere #11
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
if len(hytale_username) < 3 or len(hytale_username) > 16:
Fix:
At top of file with other constants
MIN_USERNAME_LENGTH = 3
MAX_USERNAME_LENGTH = 16
MAX_POLL_OPTIONS = 10
MAX_DICE_SIDES = 100
MAX_DICE_COUNT = 20
Usage:
if not (MIN_USERNAME_LENGTH <= len(username) <= MAX_USERNAME_LENGTH):
await interaction.followup.send(
f"Username must be {MIN_USERNAME_LENGTH}-{MAX_USERNAME_LENGTH} characters",
ephemeral=True
)