Fix cog_notificator.py
This commit is contained in:
GaMeNu 2023-10-20 01:41:05 +03:00
parent 54d1e08078
commit 2689cef361

View File

@ -82,13 +82,13 @@ class Alert:
# noinspection PyUnresolvedReferences # noinspection PyUnresolvedReferences
class Notificator(commands.Cog): class Notificator(commands.Cog):
location_group = app_commands.Group(name='locations',
description='Commands related adding, removing, or setting locations.')
districts: list[dict] = json.loads(requests.get('https://www.oref.org.il//Shared/Ajax/GetDistricts.aspx').text) districts: list[dict] = json.loads(requests.get('https://www.oref.org.il//Shared/Ajax/GetDistricts.aspx').text)
def __init__(self, bot: commands.Bot, handler: logging.Handler): def __init__(self, bot: commands.Bot, handler: logging.Handler):
self.bot = bot self.bot = bot
self.bot.add_command(Location())
self.log = logging.Logger('Notificator') self.log = logging.Logger('Notificator')
self.log.addHandler(handler) self.log.addHandler(handler)
@ -523,8 +523,6 @@ class Notificator(commands.Cog):
"desc": desc "desc": desc
}, districts_ls) }, districts_ls)
location_group = app_commands.Group(name='locations', description='Commands related adding, removing, or setting locations.')
@staticmethod @staticmethod
def locations_page(data_list: list, page: int, res_in_page: int = 50) -> str: def locations_page(data_list: list, page: int, res_in_page: int = 50) -> str:
""" """