Improved the loading of handlers

This commit is contained in:
Logan Cusano
2022-02-18 20:35:21 -05:00
parent fc30c6a183
commit 0fa0018b66

4
bot.py
View File

@@ -4,8 +4,6 @@ import discord
import sound
import configparser
from discord.ext import commands
from gqrxHandler import GQRXHandler
from op25Handler import OP25Handler
# Init class for bot
@@ -60,10 +58,12 @@ class Bot(commands.Bot):
def check_handler(self):
if self.Handler == "gqrx":
print("Starting GQRX handler")
from gqrxHandler import GQRXHandler
self.GQRXHandler = GQRXHandler()
elif self.Handler == 'op25':
print("Starting OP25 handler")
from op25Handler import OP25Handler
self.OP25Handler = OP25Handler()
# Start the bot