-import socket
-import aptbot.args
-import time
-import aptbot.args_logic
-import aptbot.bot
-import os
-import sys
import importlib
import importlib.util
+import os
+import socket
+import sys
+import time
import traceback
from threading import Thread
-from dotenv import load_dotenv
from types import ModuleType
+
+from dotenv import load_dotenv
+
+import aptbot.args
+import aptbot.args_logic
+import aptbot.bot
from aptbot import *
load_dotenv()
else:
method.daemon = True
method.start()
- time.sleep(0.1)
def start(bot: aptbot.bot.Bot, modules: dict[str, ModuleType]):
-import websocket
-import time
import re
-from enum import Enum
+import time
from dataclasses import dataclass, field
+from enum import Enum
from typing import Optional, Union
+import websocket
+
class Commands(Enum):
CLEARCHAT = "CLEARCHAT"
message.value = " ".join(message.value.split())
if not message.tags.get("reply-parent-msg-body", None):
- print(message)
+ # print(message)
+ try:
+ print(f"#{message.channel} | {message.tags['display-name']}: {message.value}")
+ except KeyError:
+ pass
return message
rep = message.tags["reply-parent-msg-body"]
message.tags["reply-parent-msg-body"] = " ".join(new_rep.split())
- print(message)
+ # print(message)
+ try:
+ print(f"#{message.channel} | {message.tags['display-name']}: {message.value}")
+ except KeyError:
+ pass
return message
def _handle_message(self, received_msg: str) -> Message:
import setuptools
-
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
install_requires=[
"python-dotenv",
"urllib3",
+ "websocket-client"
],
python_requires=">=3.7",
)