added type checking exception for port number in node
This commit is contained in:
parent
02b62d493f
commit
ab374d4ba8
|
|
@ -116,6 +116,9 @@ class Node:
|
||||||
log_level: LogLevel = LogLevel.INFO,
|
log_level: LogLevel = LogLevel.INFO,
|
||||||
log_handler: Optional[logging.Handler] = None,
|
log_handler: Optional[logging.Handler] = None,
|
||||||
):
|
):
|
||||||
|
if not isinstance(port, int):
|
||||||
|
raise TypeError("Port must be an integer")
|
||||||
|
|
||||||
self._bot: commands.Bot = bot
|
self._bot: commands.Bot = bot
|
||||||
self._host: str = host
|
self._host: str = host
|
||||||
self._port: int = port
|
self._port: int = port
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue