mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-15 14:22:13 +00:00
Kolejny fix
This commit is contained in:
@@ -1103,11 +1103,7 @@ async def get_file(ctx, source, link):
|
|||||||
logger.info(
|
logger.info(
|
||||||
"Failed to download %s, make sure yt_dlp is up to date", link
|
"Failed to download %s, make sure yt_dlp is up to date", link
|
||||||
)
|
)
|
||||||
file = item.as_posix()
|
return dir_path, file_list.append["wiadomo co wiadomo gdzie"]
|
||||||
if platform == "win32":
|
|
||||||
file = file.replace("/", "\\")
|
|
||||||
file_list.append(file)
|
|
||||||
return dir_path, file_list
|
|
||||||
|
|
||||||
# define an asynchronous generator
|
# define an asynchronous generator
|
||||||
async def async_iterator_generator(range_of_iterable):
|
async def async_iterator_generator(range_of_iterable):
|
||||||
@@ -2141,15 +2137,23 @@ async def krecimy_pornola(ctx):
|
|||||||
with the Discord API and
|
with the Discord API and
|
||||||
"""
|
"""
|
||||||
await ctx.send("Dej mnie chwilkę")
|
await ctx.send("Dej mnie chwilkę")
|
||||||
logger.info("Pornol")
|
allowed = False
|
||||||
async with ctx.typing():
|
for role in ctx.author.roles:
|
||||||
# wyciagnij linka z kontekstu
|
if role.name == "Bartender":
|
||||||
content = ctx.message.content.split()
|
allowed = True
|
||||||
for item_yt in content:
|
if allowed:
|
||||||
if re.match("http.*", item_yt):
|
logger.info("Pornol")
|
||||||
_, files = await get_file(ctx, "Pornol", item_yt)
|
async with ctx.typing():
|
||||||
if files:
|
# wyciagnij linka z kontekstu
|
||||||
logger.info("Pornol udany")
|
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