New command added that sets logging level dymnamically

This commit is contained in:
2025-01-31 20:13:47 +01:00
parent cf27b2f3f9
commit 74b7c22b6c
+17
View File
@@ -66,6 +66,23 @@ class OtherModule(commands.Cog):
"""
await ctx.send(historia_fabryczki)
@commands.hybrid_command(
name="set_logging_level",
description="Nie intererer bo kici kici",
guild=discord.Object(id=664789470779932693),
)
@commands.has_any_role('Legenda', 'Jarl', 'Bartender')
async def set_logging_level(self,ctx):
with ctx.typing():
if "DEBUG" in ctx.message.content:
logger = logging.getLogger("discord")
logger.setLevel(logging.DEBUG)
elif "INFO" in ctx.message.content:
logger = logging.getLogger("discord")
logger.setLevel(logging.INFO)
else:
await ctx.send("Weź się kurwa zdecyduj co ?")
@commands.hybrid_command(
name="reset_the_clock",
description="Resetowanie zegara - dostępne wyłącznie dla Hammera",