From 5f4cb88ea83d1dae1c95d8c00dbc15751c30bba6 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 14 Mar 2024 16:34:41 -0400 Subject: [PATCH] fix(pterodactyl): fixed incorrect placeholder name and fixed broken get_topic method --- pterodactyl/pterodactyl.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pterodactyl/pterodactyl.py b/pterodactyl/pterodactyl.py index 445df26..5ad387f 100644 --- a/pterodactyl/pterodactyl.py +++ b/pterodactyl/pterodactyl.py @@ -99,26 +99,26 @@ class Pterodactyl(commands.Cog): topic: str = await config.topic() placeholders = { "H": await config.topic_hostname() or "unset", - "P": str(await config.topic_port()), + "O": str(await config.topic_port()), } if await config.api_endpoint() == "minecraft": status, response = await mcsrvstatus.get_status(await config.topic_ip(), await config.topic_port()) if status: - placeholders += { + placeholders.update({ "I": response['ip'], "M": str(response['players']['max']), "P": str(response['players']['online']), "V": response['version'], "D": response['motd']['clean'][0] if response['motd']['clean'] else "unset", - } + }) else: - placeholders += { + placeholders.update({ "I": response['ip'], "M": "0", "P": "0", "V": "Server Offline", "D": "Server Offline", - } + }) for key, value in placeholders.items(): topic = topic.replace('.$' + key, value) return topic @@ -348,7 +348,7 @@ class Pterodactyl(commands.Cog): Available placeholders: - `.$H` (hostname) - - `.$P` (port) + - `.$O` (port) Available for Minecraft servers: - `.$I` (ip) - `.$M` (max players)