From 06885ace8c4991f6810be609a1064f88b35c808f Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Sun, 9 Mar 2025 18:25:42 +0100 Subject: [PATCH] :memo: Fix webhook_events example docstring and remove unnecessary logging setup --- examples/webhook_events.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/examples/webhook_events.py b/examples/webhook_events.py index bc9c466..0512845 100644 --- a/examples/webhook_events.py +++ b/examples/webhook_events.py @@ -1,12 +1,8 @@ # Copyright (c) Paillat-dev # SPDX-License-Identifier: MIT -"""Basic Discord bot example using Pycord REST. +"""Example showing how to work with webhook events in Pycord REST.""" -This is a minimal example showing how to create slash commands. -""" - -import logging import os from dotenv import load_dotenv @@ -16,10 +12,6 @@ from pycord_rest import App, ApplicationAuthorizedEvent # Load environment variables from .env file load_dotenv() - -# Set up logging -logging.basicConfig(level=logging.DEBUG) - app = App() @@ -31,7 +23,7 @@ async def on_application_authorized(event: ApplicationAuthorizedEvent) -> None: else: print( - f"Bot {event.user.display_name} ({event.user.id}) installed the application" # noqa: ISC003 + f"Bot {event.user.display_name} ({event.user.id}) installed the application" + f" to guild {event.guild.name} ({event.guild.id})." )