Move everything to own file
This commit is contained in:
18
discord_embed/webhook.py
Normal file
18
discord_embed/webhook.py
Normal file
@ -0,0 +1,18 @@
|
||||
"""Send webhook to Discord."""
|
||||
from discord_webhook import DiscordWebhook
|
||||
|
||||
from discord_embed import settings
|
||||
|
||||
|
||||
def send_webhook(message: str) -> None:
|
||||
"""Send webhook to Discord.
|
||||
|
||||
Args:
|
||||
message (str): The message to send.
|
||||
"""
|
||||
webhook = DiscordWebhook(
|
||||
url=settings.webhook_url,
|
||||
content=message,
|
||||
rate_limit_retry=True,
|
||||
)
|
||||
webhook.execute()
|
Reference in New Issue
Block a user