added type checking exception for port number in node

This commit is contained in:
cloudwithax 2023-04-05 22:58:30 -04:00
parent 02b62d493f
commit ab374d4ba8
1 changed files with 3 additions and 0 deletions

View File

@ -116,6 +116,9 @@ class Node:
log_level: LogLevel = LogLevel.INFO,
log_handler: Optional[logging.Handler] = None,
):
if not isinstance(port, int):
raise TypeError("Port must be an integer")
self._bot: commands.Bot = bot
self._host: str = host
self._port: int = port