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):
|
def __init__(self, error, *args: object):
|
||||||
self.error = error
|
self.error = error
|
||||||
self.seconds = self.error.seconds if hasattr(self.error, "seconds") else -1 #type: ignore
|
self.seconds = self.error.seconds if hasattr(self.error, "seconds") else -1 #type: ignore
|
||||||
|
self.message = f"Flood wait for {self.seconds}" if self.seconds > 0 else "Flood error"
|
||||||
|
|
||||||
super().__init__(*args)
|
super().__init__(self.message, *args)
|
||||||
|
|
||||||
class IgnoreException(Exception):
|
class IgnoreException(Exception):
|
||||||
def __init__(self, error, *args):
|
def __init__(self, error, *args):
|
||||||
|
|
Loading…
Reference in New Issue