mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
safe
This commit is contained in:
+28
-26
@@ -25,6 +25,7 @@ class MusicModule(commands.Cog):
|
||||
name="krecimy_pornola",
|
||||
description="Wiadomo co, dla kogo i po co",
|
||||
)
|
||||
@commands.has_any_role('Legenda', 'Jarl', 'Thane' , 'Bartender')
|
||||
async def krecimy_pornola(self, ctx):
|
||||
"""
|
||||
Download a music number from youtube.
|
||||
@@ -35,33 +36,28 @@ class MusicModule(commands.Cog):
|
||||
with the Discord API and
|
||||
"""
|
||||
await ctx.send("Dej mnie chwilkę")
|
||||
allowed = False
|
||||
for role in ctx.author.roles:
|
||||
if role.name == "Bartender":
|
||||
allowed = True
|
||||
if allowed:
|
||||
self.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 music_functions.get_file(
|
||||
ctx, "Pornol", item_yt
|
||||
self.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 music_functions.get_file(
|
||||
ctx, "Pornol", item_yt
|
||||
)
|
||||
if files:
|
||||
self.logger.info("Pornol udany")
|
||||
await ctx.send(
|
||||
f"Jest w tajnym archiwum pod adresem{sciezka})"
|
||||
)
|
||||
if files:
|
||||
self.logger.info("Pornol udany")
|
||||
await ctx.send(
|
||||
f"Jest w tajnym archiwum pod adresem{sciezka})"
|
||||
)
|
||||
else:
|
||||
await ctx.reply("Jak ładnie szefa poprosisz.")
|
||||
|
||||
@commands.hybrid_command(
|
||||
name="co_na_plejliscie_wariacie",
|
||||
description="Wyswietl kawalki ktore sa na pocztku list radia",
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
@commands.has_any_role('Nocna Zmiana', 'Jarl', 'Thane' , 'Bartender')
|
||||
|
||||
async def co_na_plejliscie_wariacie(self, ctx):
|
||||
"""
|
||||
Download a music number from youtube.
|
||||
@@ -101,6 +97,7 @@ class MusicModule(commands.Cog):
|
||||
description="Podaj link do youtube - sciagnie i doda muzyke",
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
@commands.has_any_role('Nocna Zmiana', 'Jarl', 'Thane' , 'Bartender')
|
||||
async def dej_co_z_jutuba(self, ctx):
|
||||
"""
|
||||
Download a music number from youtube.
|
||||
@@ -132,6 +129,7 @@ class MusicModule(commands.Cog):
|
||||
description="Podaj link do spotify - sciagnie i doda muzyke",
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
@commands.has_any_role('Nocna Zmiana', 'Jarl', 'Thane' , 'Bartender')
|
||||
async def dej_co_ze_spotifaja(self, ctx):
|
||||
"""
|
||||
Get a playlist or a music number from Spotify.
|
||||
@@ -187,6 +185,7 @@ class MusicModule(commands.Cog):
|
||||
description="Wyłącza muzykę i czyści plejliste.",
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
@commands.has_any_role('Nocna Zmiana', 'Jarl', 'Thane' , 'Bartender')
|
||||
async def cisza(self, ctx):
|
||||
"""
|
||||
Stop playback of the music and clear the queue.
|
||||
@@ -213,6 +212,7 @@ class MusicModule(commands.Cog):
|
||||
description="Przerzuca na następny kawałek",
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
@commands.has_any_role('Nocna Zmiana', 'Jarl', 'Thane' , 'Bartender')
|
||||
async def dalej(self, ctx):
|
||||
"""
|
||||
Play next track in queue.
|
||||
@@ -230,12 +230,12 @@ class MusicModule(commands.Cog):
|
||||
voice_client.stop()
|
||||
self.logger.info("Next completed")
|
||||
|
||||
# TODO: MUSIC
|
||||
@commands.hybrid_command(
|
||||
name="daj_mi_chwile",
|
||||
description="Pauzuje",
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
@commands.has_any_role('Nocna Zmiana', 'Jarl', 'Thane' , 'Bartender')
|
||||
async def daj_mi_chwile(self, ctx):
|
||||
"""
|
||||
Pause music playback.
|
||||
@@ -254,12 +254,12 @@ class MusicModule(commands.Cog):
|
||||
voice_client.pause()
|
||||
self.logger.info("Pause completed")
|
||||
|
||||
# TODO: MUSIC
|
||||
@commands.hybrid_command(
|
||||
name="graj_dalej",
|
||||
description="Odpauzowuje",
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
@commands.has_any_role('Nocna Zmiana', 'Jarl', 'Thane' , 'Bartender')
|
||||
async def graj_dalej(self, ctx):
|
||||
"""
|
||||
Unpause music and continue playback.
|
||||
@@ -277,12 +277,12 @@ class MusicModule(commands.Cog):
|
||||
voice_client.resume()
|
||||
self.logger.info("Unpause completed")
|
||||
|
||||
# TODO: MUSIC
|
||||
@commands.hybrid_command(
|
||||
name="zagraj_mi_kawalek",
|
||||
description="Wyszukuje w bibliotece muzycznej Hammera kawałek który ma zostać zagrany",
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
@commands.has_any_role('Nocna Zmiana', 'Jarl', 'Thane' , 'Bartender')
|
||||
async def zagraj_mi_kawalek(self, ctx):
|
||||
"""
|
||||
Play a song or music piece in response to a command
|
||||
@@ -327,12 +327,12 @@ class MusicModule(commands.Cog):
|
||||
"Obawiam się że nie mogę nic znaleźć u siebie. Spróbuj komendy '$dej_co_ze_spotifaja' jeśli masz link"
|
||||
)
|
||||
|
||||
# TODO: MUSIC
|
||||
@commands.hybrid_command(
|
||||
name="zrob_mi_plejliste",
|
||||
description="Generuje playliste - param1 - dlugosc, potem slowa wyszukiwania",
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
@commands.has_any_role('Nocna Zmiana', 'Jarl', 'Thane' , 'Bartender')
|
||||
async def zrob_mi_plejliste(self, ctx):
|
||||
"""
|
||||
Generate a playlist in queue. First word in this command shall be int defining length of the playlist.
|
||||
@@ -394,12 +394,12 @@ class MusicModule(commands.Cog):
|
||||
await ctx.send(reply)
|
||||
self.logger.info("Plejlista zrobiona")
|
||||
|
||||
# TODO: MUSIC
|
||||
@commands.hybrid_command(
|
||||
name="zagraj_muzyke_mego_ludu",
|
||||
description="Gra muzyke wyszukana na bazie tematow konwersacji na kanale NZ",
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
@commands.has_any_role('Nocna Zmiana', 'Jarl', 'Thane' , 'Bartender')
|
||||
async def zagraj_muzyke_mego_ludu(self, ctx):
|
||||
"""
|
||||
Play completeley random playlist based on messaging history.
|
||||
@@ -480,12 +480,12 @@ class MusicModule(commands.Cog):
|
||||
await ctx.send(reply)
|
||||
self.logger.info("Plejlista zrobiona")
|
||||
|
||||
# TODO: MUSIC
|
||||
@commands.hybrid_command(
|
||||
name="parametry_muzyki_mego_ludu",
|
||||
description="Konfiguruje komende zagraj muzyke mojego ludu",
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
@commands.has_any_role('Nocna Zmiana', 'Jarl', 'Thane' , 'Bartender')
|
||||
async def parametry_muzyki_mego_ludu(
|
||||
self, ctx, ile_historii=1500, ile_slow_kluczowych=15, jak_dluga_plejlista=30
|
||||
):
|
||||
@@ -547,6 +547,7 @@ class MusicModule(commands.Cog):
|
||||
description="Włącza muzykę na kanale #nocna-zmiana.",
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
@commands.has_any_role('Nocna Zmiana', 'Jarl', 'Thane' , 'Bartender')
|
||||
async def graj_muzyko(self, ctx):
|
||||
"""
|
||||
Async function named "graj_muzyko" starts music playback on channel "Nocna Zmiana".
|
||||
@@ -603,6 +604,7 @@ class MusicModule(commands.Cog):
|
||||
description="Zaciąga obiekty z pliku",
|
||||
guild=discord.Object(id=664789470779932693),
|
||||
)
|
||||
@commands.has_any_role('Legenda', 'Jarl', 'Thane' , 'Bartender')
|
||||
async def batch_download(self, ctx):
|
||||
content_type = ctx.message.attachments[0].content_type
|
||||
check = re.search("text\/plain; *charset=(.*)", content_type, re.IGNORECASE)
|
||||
|
||||
Reference in New Issue
Block a user