dgs.utils.utils.notify_on_completion_or_error¶
- dgs.utils.utils.notify_on_completion_or_error(info: str = '', min_time: float = 0.0)[source]¶
A decorator that sends a Discord notification when the decorated function completes successfully or fails.
- Parameters:
info – Additional information to send.
min_time – Minimum time in seconds the function has to run before sending a notification.
- Returns:
The decorated function with notification functionality.
- Return type:
function
- Raises:
Exception – Any exception raised by the decorated function is re-raised after sending a notification.