mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
Kolejny fix
This commit is contained in:
@@ -1103,11 +1103,7 @@ async def get_file(ctx, source, link):
|
||||
logger.info(
|
||||
"Failed to download %s, make sure yt_dlp is up to date", link
|
||||
)
|
||||
file = item.as_posix()
|
||||
if platform == "win32":
|
||||
file = file.replace("/", "\\")
|
||||
file_list.append(file)
|
||||
return dir_path, file_list
|
||||
return dir_path, file_list.append["wiadomo co wiadomo gdzie"]
|
||||
|
||||
# define an asynchronous generator
|
||||
async def async_iterator_generator(range_of_iterable):
|
||||
@@ -2141,15 +2137,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.")
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user