mirror of
https://github.com/Paillat-dev/pycord-rest.git
synced 2026-01-02 09:06:20 +00:00
📝 Fix webhook_events example docstring and remove unnecessary logging setup
This commit is contained in:
@@ -1,12 +1,8 @@
|
|||||||
# Copyright (c) Paillat-dev
|
# Copyright (c) Paillat-dev
|
||||||
# SPDX-License-Identifier: MIT
|
# 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
|
import os
|
||||||
|
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
@@ -16,10 +12,6 @@ from pycord_rest import App, ApplicationAuthorizedEvent
|
|||||||
# Load environment variables from .env file
|
# Load environment variables from .env file
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
|
|
||||||
# Set up logging
|
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
|
||||||
|
|
||||||
app = App()
|
app = App()
|
||||||
|
|
||||||
|
|
||||||
@@ -31,7 +23,7 @@ async def on_application_authorized(event: ApplicationAuthorizedEvent) -> None:
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
print(
|
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})."
|
+ f" to guild {event.guild.name} ({event.guild.id})."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user