From d618ab46a1f14c12f0236002dbb776f27cdeffd2 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Tue, 13 Feb 2024 19:31:04 -0800 Subject: [PATCH] turn off the palworld channel update thing --- app/cogs/palworld.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/app/cogs/palworld.py b/app/cogs/palworld.py index 8b98a9b2..af53c225 100755 --- a/app/cogs/palworld.py +++ b/app/cogs/palworld.py @@ -10,7 +10,7 @@ import os class PalWorld(commands.Cog): def __init__(self, bot): self.bot: commands.Bot = bot - self.poll_server_population.start() + # self.poll_server_population.start() palworld = discord.SlashCommandGroup("palworld", "Palworld related commands") @@ -171,26 +171,26 @@ class PalWorld(commands.Cog): "https://img.game8.co/3822502/5ae8382d16bd390dd19f343e87680d51.png/show" ) - @tasks.loop(seconds=60) - async def poll_server_population(self): - # Wait until the bot is ready before we actually start executing code - await self.bot.wait_until_ready() + # @tasks.loop(seconds=60) + # async def poll_server_population(self): + # # Wait until the bot is ready before we actually start executing code + # await self.bot.wait_until_ready() - from source_rcon import SourceRcon - from loguru import logger + # from source_rcon import SourceRcon + # from loguru import logger - logger.disable("source_rcon") + # logger.disable("source_rcon") - rcon = SourceRcon("192.168.1.200", 25575, os.getenv("pal_rcon_pass")) - num_players = len(rcon.send_command("ShowPlayers").split("\n")[1:-1]) + # rcon = SourceRcon("192.168.1.200", 25575, os.getenv("pal_rcon_pass")) + # num_players = len(rcon.send_command("ShowPlayers").split("\n")[1:-1]) - # channel = self.bot.get_channel(1201389692759842816) # test server - channel = self.bot.get_channel(1199397770746925239) + # # channel = self.bot.get_channel(1201389692759842816) # test server + # channel = self.bot.get_channel(1199397770746925239) - if str(num_players) in channel.name.split("/")[0]: - return + # if str(num_players) in channel.name.split("/")[0]: + # return - await channel.edit(name="Palworlders (%s/16 online)" % num_players) + # await channel.edit(name="Palworlders (%s/16 online)" % num_players) def setup(bot):