Massive changes! Basically everything fixed (please do test that theory)
Changelog
- In the
send_webhook()
function:- An error message will now be displayed if no webhook URL was entered
- If the user is entering JSON data, an attempt is made to parse it as
JSON and display and error message if invalid JSON is provided. The
parsed JSON and the Webhook URL are then concatenated into a
confirmation message. - For predefined form fields:
- An error message is displayed if either the username or content
were not entered - If no avatar URL was provided, a default one is used
- It checks whether the avatar URL ends with a common image format
(".jpg", ".jpeg", ".png", and ".gif"). If it doesn't, an error
message is displayed.
- An error message is displayed if either the username or content
- After all this input validation, it asks the for user confirmation
before sending the webhook. If they cancel, an informational message
is displayed instead of exiting the program. - In case of a successful request (HTTP status code 204), an
informative message is displayed saying that the webhook was sent
successfully.
- Added
messagebox
calls for various actions including input
validation and webhook send success/faliure.
Full Changelog: v1.0.0...v1.5.0