You can use the following code snippets to set up custom notifications from your python code, Eg. When your code execution has completed or you want to be notified if your code has run into any exceptions.
The URL required below is the webhook URL. To know more about webhooks on discord and how to create one, please read this page.
To know how to get bot_token and bot_chatID, please refer to this article on Creating a Bot using the Telegram Bot API.