Disable IPC

pull/104/head
Stijn De Clercq 2022-02-05 14:43:19 +01:00
parent eaed08168c
commit 829729c8db
4 changed files with 4 additions and 21 deletions

View File

@ -23,4 +23,5 @@ class IPC(commands.Cog):
def setup(client):
client.add_cog(IPC(client))
# client.add_cog(IPC(client))
pass

View File

@ -16,9 +16,4 @@ if __name__ == "__main__":
intents.members = True
client = Didier(command_prefix=get_prefix, case_insensitive=True, intents=intents, activity=activity, status=status)
# Run IPC server if necessary
if client.ipc is not None:
client.ipc.start()
client.run(TOKEN)

View File

@ -5,7 +5,7 @@ python-dotenv==0.14.0
beautifulsoup4==4.9.1
# discord.py==1.7.3
git+https://github.com/Rapptz/discord-ext-menus@master
discord-ext-ipc==2.0.0
# discord-ext-ipc==2.0.0
psycopg2==2.8.5
psycopg2-binary==2.8.5
python-dateutil==2.6.1

View File

@ -1,8 +1,7 @@
from data.snipe import Snipe
from discord.ext import commands, ipc
from discord.ext import commands
from dislash import InteractionClient
import os
from settings import HOST_IPC
from startup.init_files import check_all
from typing import Dict
@ -20,12 +19,6 @@ class Didier(commands.Bot):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._host_ipc = HOST_IPC
# IPC Server
# TODO secret key
self.ipc = ipc.Server(self, secret_key="SOME_SECRET_KEY") if self._host_ipc else None
# Cogs that should be loaded before the others
self._preload = ("ipc", "utils", "failedchecks", "events",)
@ -62,9 +55,3 @@ class Didier(commands.Bot):
# Subdirectory
# Also walrus operator hype
self._init_directory(new_path)
async def on_ipc_ready(self):
print("IPC server is ready.")
async def on_ipc_error(self, endpoint, error):
print(endpoint, "raised", error)