fix: Use strip not trim
All checks were successful
Build Docker / Build_Master_AMD (push) Successful in 1m14s
Build Docker / Build_Master_ARM (push) Successful in 1m16s
Build Docker / Build_Bot_ARM (push) Successful in 1m34s
Build Docker / Build_Bot_AMD (push) Successful in 2m53s

This commit is contained in:
2025-06-03 12:02:35 +10:00
parent 04e1335173
commit 752efbfc3f

View File

@@ -80,7 +80,7 @@ async def createsite(ctx, domain: str, licence: str = None):
await ctx.response.send_message("You must specify a domain without http:// or https://",ephemeral=True) await ctx.response.send_message("You must specify a domain without http:// or https://",ephemeral=True)
return return
domain = domain.lower().trim() domain = domain.lower().strip()
# Regex for a domain (or a tld) # Regex for a domain (or a tld)
if not re.match(r'^[a-z0-9-]+(\.[a-z0-9-]+)*$', domain): if not re.match(r'^[a-z0-9-]+(\.[a-z0-9-]+)*$', domain):
await ctx.response.send_message("You must specify a valid domain",ephemeral=True) await ctx.response.send_message("You must specify a valid domain",ephemeral=True)