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