From 81f97ee3d1a93a72210aaff82cfc95a7b3102613 Mon Sep 17 00:00:00 2001 From: winet Date: Thu, 8 Feb 2024 18:00:06 +1000 Subject: [PATCH] flood exception message --- paper/errors/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/paper/errors/__init__.py b/paper/errors/__init__.py index 90e142e..72c17f0 100644 --- a/paper/errors/__init__.py +++ b/paper/errors/__init__.py @@ -18,8 +18,9 @@ class FloodException(Exception): def __init__(self, error, *args: object): self.error = error self.seconds = self.error.seconds if hasattr(self.error, "seconds") else -1 #type: ignore - - super().__init__(*args) + self.message = f"Flood wait for {self.seconds}" if self.seconds > 0 else "Flood error" + + super().__init__(self.message, *args) class IgnoreException(Exception): def __init__(self, error, *args):