mirror of
https://github.com/RGBCube/minearchy-bot
synced 2025-07-27 08:57:46 +00:00
Remove unused stuff
This commit is contained in:
parent
32353e53cf
commit
39c42acae5
1 changed files with 1 additions and 26 deletions
|
@ -3,9 +3,7 @@ from __future__ import annotations
|
|||
from typing import TYPE_CHECKING
|
||||
|
||||
import discord
|
||||
from discord.ext import commands, tasks
|
||||
import subprocess
|
||||
import psutil
|
||||
from discord.ext import commands
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from bot import MinearchyBot
|
||||
|
@ -19,12 +17,6 @@ class MinecraftServer(
|
|||
def __init__(self, bot: MinearchyBot) -> None:
|
||||
self.bot = bot
|
||||
|
||||
async def cog_load(self) -> None:
|
||||
self.check_processes_up.start()
|
||||
|
||||
async def cog_unload(self) -> None:
|
||||
self.check_processes_up.cancel()
|
||||
|
||||
@commands.group(
|
||||
invoke_without_command=True,
|
||||
brief="Sends the server IP.",
|
||||
|
@ -126,23 +118,6 @@ class MinecraftServer(
|
|||
)
|
||||
await ctx.reply(view=view)
|
||||
|
||||
@tasks.loop(minutes=5)
|
||||
async def check_processes_up(self) -> None:
|
||||
pass
|
||||
# pids = [
|
||||
# int(pid)
|
||||
# for pid in subprocess.Popen(
|
||||
# ["ps", "aux", "|", "grep", "java"], stdout=subprocess.PIPE
|
||||
# )
|
||||
# .communicate()[0]
|
||||
# .splitlines()
|
||||
# ]
|
||||
# await self.bot.log_webhook.send(f"```\n{pids!r}```")
|
||||
#
|
||||
# for pid in pids:
|
||||
# if not psutil.pid_exists(pid):
|
||||
# await self.bot.log_webhook.send(f"No such pid: {pid}")
|
||||
|
||||
|
||||
async def setup(bot: MinearchyBot) -> None:
|
||||
await bot.add_cog(MinecraftServer(bot))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue