Move everything to own file

This commit is contained in:
2022-04-13 02:36:39 +02:00
parent a2af09075f
commit d85f23740d
6 changed files with 236 additions and 192 deletions

18
discord_embed/webhook.py Normal file
View 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()