From 6f8698790107b465dfee3361decb034f5b45c07d Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Mon, 18 Sep 2023 14:49:22 +1000 Subject: [PATCH] bot: Fix typo with variables --- discord-bot/bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/discord-bot/bot.py b/discord-bot/bot.py index 289dc34..cf7fa15 100644 --- a/discord-bot/bot.py +++ b/discord-bot/bot.py @@ -131,7 +131,7 @@ async def check_site_ready(domain): else: return False -def site_count(): +def get_site_count(): r = requests.get(f"http://{Master_IP}:{Master_Port}/site-count") if r.status_code == 200: return r.text @@ -139,7 +139,7 @@ def site_count(): return "Error getting site count\n" + r.text def update_bot_status(): - site_count = site_count() + site_count = get_site_count() client.loop.create_task(client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="over " + site_count + " wordpress sites"))) # When the bot is ready @@ -150,7 +150,7 @@ async def on_ready(): await tree.sync() # Get the number of sites - site_count = site_count() + site_count = get_site_count() await client.loop.create_task(client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="over " + site_count + " wordpress sites"))) client.run(TOKEN) \ No newline at end of file