This is seriously last fix

description update

last fix ?

Small fix

Kolejny fix

Final fix

FX2

fx
This commit is contained in:
2024-04-05 16:39:59 +02:00
committed by migatu
parent ae0d807714
commit 82273df13c
+19 -18
View File
@@ -782,14 +782,7 @@ async def get_file(ctx, source, link):
logger.info(
"Failed to download %s, make sure yt_dlp is up to date", link
)
extract = re.search("v=(...........)[&,$]*", link)
ident = extract.group(1)
for item in Path.glob(Path(dir_path), "**/*.mp3"):
file = item.as_posix()
if platform == "win32":
file = file.replace("/", "\\")
if re.match(".*" + ident + ".*", file):
file_list.append(file)
file_list.append("wiadomo co wiadomo gdzie")
return dir_path, file_list
# define an asynchronous generator
@@ -1694,7 +1687,7 @@ async def parametry_muzyki_mego_ludu(ctx, ile_historii=1500, ile_slow_kluczowych
@client.hybrid_command(
name="krecimy_pornola",
description="Podaj link do youtube - sciagnie i doda muzyke",
description="Wiadomo co, dla kogo i po co",
guild=discord.Object(id=664789470779932693),
)
async def krecimy_pornola(ctx):
@@ -1707,15 +1700,23 @@ async def krecimy_pornola(ctx):
with the Discord API and
"""
await ctx.send("Dej mnie chwilkę")
logger.info("Pornol")
async with ctx.typing():
# wyciagnij linka z kontekstu
content = ctx.message.content.split()
for item_yt in content:
if re.match("http.*", item_yt):
_, files = await get_file(ctx, "Pornol", item_yt)
if files:
logger.info("Pornol udany")
allowed = False
for role in ctx.author.roles:
if role.name == "Bartender":
allowed = True
if allowed:
logger.info("Pornol")
async with ctx.typing():
# wyciagnij linka z kontekstu
content = ctx.message.content.split()
for item_yt in content:
if re.match("http.*", item_yt):
sciezka, files = await get_file(ctx, "Pornol", item_yt)
if files:
logger.info("Pornol udany")
ctx.reply(f"Jest w tajnym archiwum pod adresem{sciezka})")
else:
ctx.reply("Jak ładnie szefa poprosisz.")