flood exception message
This commit is contained in:
parent
94302d09e9
commit
81f97ee3d1
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue