Compare commits
2 commits
f86a5aa62a
...
fb8e623a84
Author | SHA1 | Date | |
---|---|---|---|
fb8e623a84 | |||
![]() |
f66d05d632 |
1 changed files with 4 additions and 4 deletions
|
@ -20,6 +20,7 @@ from src.sasl import handle_sasl, handle_authenticate, handle_903
|
|||
class Bot:
|
||||
def __init__(self, config_file):
|
||||
self.config = self.load_config(config_file)
|
||||
self.validate_config(self.config)
|
||||
self.channel_manager = ChannelManager()
|
||||
self.logger = Logger('logs/elitebot.log')
|
||||
self.connected = False
|
||||
|
@ -27,8 +28,6 @@ class Bot:
|
|||
self.running = True
|
||||
self.plugins = []
|
||||
self.load_plugins()
|
||||
self.config = self.load_config(config_file)
|
||||
self.validate_config(self.config)
|
||||
|
||||
def validate_config(self, config):
|
||||
required_fields = [
|
||||
|
@ -212,6 +211,7 @@ class Bot:
|
|||
self.logger.error(f'General error: {e}')
|
||||
self.connected = False
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
bot = Bot(sys.argv[1])
|
||||
|
|
Loading…
Add table
Reference in a new issue