From 0988333f3b798637679e853cfd86f4e1169dfaed Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Wed, 8 Nov 2023 12:06:07 +1100 Subject: [PATCH] feat: Use alias for hardcoded IPs --- discord-bot/bot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/discord-bot/bot.py b/discord-bot/bot.py index 6293b17..9915466 100644 --- a/discord-bot/bot.py +++ b/discord-bot/bot.py @@ -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'])