Files
conjurer/cogs/music.py
T
gitea a8797df45c Tag: 1.5
Intermediate commits (oldest → newest):
- Hit list queue for radio
- fix
- Documentation of conjurer_librarian
- Reformatting of conjurer_librarian
- Documentation of conjurer_musician
- Formatting of conjurer_musician
- Documentation of radio_conjurer.liq
- Merge branch 'main' of https://github.com/migatu/conjurer
- Removal from tracking
- Fixing librarian result (#6)
- Potential bugfix for some lazycoding in spotipy... Another one. fuck it
- Music tunneling (#7)
- Even more logging in spotify download
- test requests
- Fine tuning
- Optimization bug fix #1
- Fix crossfade
- Crossfadeing ctnd
- Fix
- Starting work on librarian headless mode
2025-10-30 16:59:00 +01:00

47 lines
2.0 KiB
Python

import discord
from discord.ext import commands
from typing import Optional
class Music(commands.Cog):
def __init__(self, bot):
self.bot = bot # This is so you can access Bot instance in your cog
# You must have this function for `bot.load_extension` to call
def setup(bot):
bot.add_cog(Music(bot))
@commands.hybrid_command(
name="przytul", description="Przytul kogoś - daj mention po komendzie :)"
)
async def przytul(ctx, arg: Optional[discord.Member] = None):
"""
Generate a text about hugging mentioned user.
:param ctx: ctx stands for "context" and is a required parameter 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
:param arg: arg is a parameter of the function "przytul" that expects a Discord member object. The
parameter is optional, meaning that if no member object is provided, it will default to None
:type arg: Optional[discord.Member]
"""
async with ctx.typing():
nieprzytulac = False
for mention in ctx.message.mentions:
for role in mention.roles:
if role.name == "NIEPRZYTULAĆ!":
nieprzytulac = True
if arg and nieprzytulac:
await ctx.send(
f"Żebym ja Ciebie nie przytulił {ctx.message.author.mention}"
)
elif arg:
await ctx.send(
# trunk-ignore(codespell/misspelled)
f"Już dobrze.... Już dobrze... Ojej.. Biedactwo... :( *W ułamku sekundy {arg.mention} znajduje sie w duszącym uścisku. Żebra trzeszczą - kilka pęka. Pacnięcia po plecach grożą odbiciem nerek, a głaskanie po głowie powoduje wstrząs mózgu*"
)
else:
await ctx.send(
"Kogo mam przytulić? *Wyłamuje kostki i przeciąga się - jego 200 kilowa sylwetka złożona z samych mięśni świadczy o tym że jest gotowy*"
)