feat: Use alias for hardcoded IPs
All checks were successful
Build Docker / Build Master (push) Successful in 22s
Build Docker / Build Bot (push) Successful in 24s

This commit is contained in:
Nathan Woodburn 2023-11-08 12:06:07 +11:00
parent 9d06151ed2
commit 0988333f3b
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -104,7 +104,10 @@ async def createsite(ctx, domain: str, licence: str = None):
r = requests.get(f"http://{Master_IP}:{Master_Port}/site-info?domain={domain}")
json = r.json()
if json['success'] == "true":
await ctx.user.send(f"Site https://{domain} is ready!\nHere is the site info for {json['domain']}\nA: `{json['ip']}`\nTLSA: `{json['tlsa']}`\nMake sure you put the TLSA in either `_443._tcp.{domain}` or `*.{domain}`")
if json['ip'] == '143.42.45.236':
await ctx.user.send(f"Site https://{domain} is ready!\nHere is the site info for {json['domain']}\nALIAS: `01.hnshosting.au`\nTLSA: `{json['tlsa']}`\nMake sure you put the TLSA in either `_443._tcp.{domain}` or `*.{domain}`")
else:
await ctx.user.send(f"Site https://{domain} is ready!\nHere is the site info for {json['domain']}\nA: `{json['ip']}`\nTLSA: `{json['tlsa']}`\nMake sure you put the TLSA in either `_443._tcp.{domain}` or `*.{domain}`")
else:
await ctx.user.send(f"Error getting site info\n" + json['error'])