mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
Small fixes continued.
This commit is contained in:
@@ -42,9 +42,6 @@ import yt_dlp
|
||||
from spotify_dl import spotify
|
||||
from spotify_dl import youtube as youtube_download
|
||||
|
||||
Movie = TypedDict("Movie", {"name": str, "year": int})
|
||||
movie: Movie = {"name": "Blade Runner", "year": 1982}
|
||||
|
||||
Music_Config = TypedDict(
|
||||
"Music_Config",
|
||||
{
|
||||
@@ -57,7 +54,7 @@ Music_Config = TypedDict(
|
||||
|
||||
# *=========================================== Predefines
|
||||
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
||||
master_timeout = datetime.now()
|
||||
MASTER_TIMEOUT = datetime.now()
|
||||
INITIAL_TIME_WAIT = 5
|
||||
MUZYKA: Music_Config = {"playing": False, "ctx": None, "queue": [], "requestor": []}
|
||||
|
||||
@@ -70,7 +67,9 @@ SETTINGS_FILE = ""
|
||||
ENCODING = ""
|
||||
GRAPHICS_PATH = ""
|
||||
# *=========================================== Platform Specific Predefines
|
||||
|
||||
if platform in ("linux", "linux2"):
|
||||
SEPARATOR_FILE_PATH = "/"
|
||||
if "microsoft-standard" in uname().release:
|
||||
LOGFILE = "/home/mtuszowski/conjurer/discord.log"
|
||||
MEMORY_FIVE_SIARA = "/home/mtuszowski/conjurer/pamiec.json"
|
||||
@@ -109,6 +108,7 @@ elif platform == "win32":
|
||||
ACCIDENT_LOG = "accident_log.json"
|
||||
ENCODING = "utf-8"
|
||||
DIR_PATH_SADOX = "C:\\Users\\mtusz\\OneDrive\\Dokumenty\\Fansadox\\"
|
||||
SEPARATOR_FILE_PATH = "\\"
|
||||
|
||||
|
||||
# *=========================================== Keys
|
||||
@@ -237,7 +237,7 @@ async def on_message(message):
|
||||
# TODO: wpiac jego reakcje we framework chatu GPT
|
||||
message.content = message.content.lower()
|
||||
|
||||
tdelta = datetime.now() - master_timeout
|
||||
tdelta = datetime.now() - MASTER_TIMEOUT
|
||||
tdelta = tdelta.total_seconds()
|
||||
if "opowiedz o fabryczce" in message.content:
|
||||
await message.reply(historia_fabryczki)
|
||||
@@ -400,12 +400,7 @@ async def play(ctx, zamawial=None, arg=None):
|
||||
logger.debug(file_to_play)
|
||||
metadata = eyed3.load(file_to_play)
|
||||
query = None
|
||||
separator = None
|
||||
if platform in ("linux", "linux2"):
|
||||
separator = "/"
|
||||
elif platform == "win32":
|
||||
separator = "\\"
|
||||
temp = file_to_play.split(separator)[-1]
|
||||
temp = file_to_play.split(SEPARATOR_FILE_PATH)[-1]
|
||||
kawalek = f"Zagram teraz kawalek {temp} z prywatnej kolekcji Hammera."
|
||||
if metadata:
|
||||
if metadata.tag:
|
||||
|
||||
Reference in New Issue
Block a user