-
Notifications
You must be signed in to change notification settings - Fork 0
Discord Bot Integration
LennyPegauOfficial edited this page Nov 30, 2025
·
1 revision
Mit 24 dedizierten Kategorien bietet der Logger umfassende Abdeckung für die Discord-Bot-Entwicklung.
Verwenden Sie die Discord-spezifische Interaktions-ID als Correlation ID im Kontext des Commands.
from logs import Logs, Category
async def handle_slash_command(ctx):
# Nutzt die Interaktions-ID als Trace-ID
Logs.set_correlation_id(ctx.interaction.id)
with Logs.context(f"CMD:{ctx.command.name}"):
Logs.info(Category.SLASH_CMD, "Command invoked", user=ctx.author.id)
# ... Logik ...
Logs.success(Category.SLASH_CMD, "Command executed successfully.")