bot: Updated dig location
All checks were successful
Build Docker / Build Docker (push) Successful in 31s

This commit is contained in:
Nathan Woodburn 2023-09-02 14:58:31 +10:00
parent a74943dec3
commit be6f6c14f9
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

4
bot.py
View File

@ -63,11 +63,9 @@ async def botstatus(ctx, message: str, statusmethod: str = None):
@tree.command(name="dig", description="Dig a dns record")
async def dig(ctx, domain: str, record_type: str = "A"):
record_type = record_type.upper()
# Format dig @100.74.29.146 -p 5350 <domain> <type>
resolver = dns.resolver.Resolver()
resolver.nameservers = ["100.74.29.146"]
resolver.port = 5350
resolver.port = 53
try:
# Query the DNS record
response = resolver.resolve(domain, record_type)