From 39c7aedc05ef33328fcee778b32f2bba0316b138 Mon Sep 17 00:00:00 2001 From: agessaman Date: Sun, 7 Sep 2025 15:10:55 -0700 Subject: [PATCH] Make API source dynamic based on configured URL --- modules/commands/prefix_command.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/commands/prefix_command.py b/modules/commands/prefix_command.py index 76e68f9..c169a17 100644 --- a/modules/commands/prefix_command.py +++ b/modules/commands/prefix_command.py @@ -203,8 +203,15 @@ class PrefixCommand(BaseCommand): # No additional info needed for database responses pass else: - # Add API source info - response += f"\nSource: map.w0z.is" + # Add API source info - extract domain from API URL + try: + from urllib.parse import urlparse + parsed_url = urlparse(self.api_url) + domain = parsed_url.netloc + response += f"\nSource: {domain}" + except Exception: + # Fallback if URL parsing fails + response += f"\nSource: API" return response