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
)
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
)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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
)