SMall fixes for tunnel

This commit is contained in:
2024-04-21 15:56:05 +02:00
committed by migatu
parent a521724857
commit 4cc828373b
+34
View File
@@ -1582,6 +1582,40 @@ async def graj_muzyko(ctx):
logger.info("Press play on tape completed")
check_music.start()
@client.hybrid_command(
name="radio_hardkor",
description="Włącza muzykę na kanale #nocna-zmiana.",
guild=discord.Object(id=664789470779932693),
)
async def radio_hardkor(ctx):
"""
Async function named "graj_muzyko" starts music playback on channel "Nocna Zmiana".
:param ctx: ctx stands for "context" and is a parameter commonly used in Discord.py commands. It
represents the context in which the command was invoked, including information such as the message,
the channel, the server, and the user who invoked the command. This parameter is required in all
Discord.py commands
"""
logger.info("Press play on radio hardkor")
async with ctx.typing():
global MUZYKA # pylint: disable=global-variable-not-assigned
MUZYKA["ctx"] = ctx
await connect(ctx=ctx)
await play(ctx=ctx)
logger.info("Press play on radio completed")
voice_client = client.voice_clients[0]
if not client.voice_clients:
voice_client = client.voice_clients[0]
await connect(ctx)
voice_client.play(
discord.PCMVolumeTransformer(
discord.FFmpegPCMAudio(source="http://95.175.16.246:666/mp3-stream"), volume=0.3
)
)
check_music.start()
@client.hybrid_command(
name="cisza",