bot: Fix typo with variables
This commit is contained in:
parent
910ce1b098
commit
6f86987901
@ -131,7 +131,7 @@ async def check_site_ready(domain):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def site_count():
|
def get_site_count():
|
||||||
r = requests.get(f"http://{Master_IP}:{Master_Port}/site-count")
|
r = requests.get(f"http://{Master_IP}:{Master_Port}/site-count")
|
||||||
if r.status_code == 200:
|
if r.status_code == 200:
|
||||||
return r.text
|
return r.text
|
||||||
@ -139,7 +139,7 @@ def site_count():
|
|||||||
return "Error getting site count\n" + r.text
|
return "Error getting site count\n" + r.text
|
||||||
|
|
||||||
def update_bot_status():
|
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")))
|
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
|
# When the bot is ready
|
||||||
@ -150,7 +150,7 @@ async def on_ready():
|
|||||||
await tree.sync()
|
await tree.sync()
|
||||||
|
|
||||||
# Get the number of sites
|
# 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")))
|
await client.loop.create_task(client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="over " + site_count + " wordpress sites")))
|
||||||
|
|
||||||
client.run(TOKEN)
|
client.run(TOKEN)
|
Loading…
Reference in New Issue
Block a user