mirror of https://github.com/stijndcl/didier
Disable IPC
parent
eaed08168c
commit
829729c8db
|
@ -23,4 +23,5 @@ class IPC(commands.Cog):
|
||||||
|
|
||||||
|
|
||||||
def setup(client):
|
def setup(client):
|
||||||
client.add_cog(IPC(client))
|
# client.add_cog(IPC(client))
|
||||||
|
pass
|
||||||
|
|
|
@ -16,9 +16,4 @@ if __name__ == "__main__":
|
||||||
intents.members = True
|
intents.members = True
|
||||||
|
|
||||||
client = Didier(command_prefix=get_prefix, case_insensitive=True, intents=intents, activity=activity, status=status)
|
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)
|
client.run(TOKEN)
|
||||||
|
|
|
@ -5,7 +5,7 @@ python-dotenv==0.14.0
|
||||||
beautifulsoup4==4.9.1
|
beautifulsoup4==4.9.1
|
||||||
# discord.py==1.7.3
|
# discord.py==1.7.3
|
||||||
git+https://github.com/Rapptz/discord-ext-menus@master
|
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==2.8.5
|
||||||
psycopg2-binary==2.8.5
|
psycopg2-binary==2.8.5
|
||||||
python-dateutil==2.6.1
|
python-dateutil==2.6.1
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
from data.snipe import Snipe
|
from data.snipe import Snipe
|
||||||
from discord.ext import commands, ipc
|
from discord.ext import commands
|
||||||
from dislash import InteractionClient
|
from dislash import InteractionClient
|
||||||
import os
|
import os
|
||||||
from settings import HOST_IPC
|
|
||||||
from startup.init_files import check_all
|
from startup.init_files import check_all
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
|
@ -20,12 +19,6 @@ class Didier(commands.Bot):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*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
|
# Cogs that should be loaded before the others
|
||||||
self._preload = ("ipc", "utils", "failedchecks", "events",)
|
self._preload = ("ipc", "utils", "failedchecks", "events",)
|
||||||
|
|
||||||
|
@ -62,9 +55,3 @@ class Didier(commands.Bot):
|
||||||
# Subdirectory
|
# Subdirectory
|
||||||
# Also walrus operator hype
|
# Also walrus operator hype
|
||||||
self._init_directory(new_path)
|
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)
|
|
||||||
|
|
Loading…
Reference in New Issue