def init(self, cfg_name, *args, **kwargs): self.__config = json_reader.read(cfg_name) self.__cfg_name = cfg_name
def __init__(self, cfg_name, *args, **kwargs): self.config = json_reader.read(cfg_name)
async def on_message(message): # if message.author.bot: # return await commands_tracker.identify_command(message) @client.event async def on_reaction_add(reaction, user): for command in commands_tracker.commands: await command.on_reaction_add(reaction, user) @client.event async def on_reaction_remove(reaction, user): for command in commands_tracker.commands: await command.on_reaction_remove(reaction, user) @client.event async def on_ready(): global commands_tracker commands_tracker = CommandTracker(client) print('Loaded Discord.py version {}'.format(discord.__version__)) print('Connected as {0.user}'.format(client)) print('RelBot version {0}{1}'.format(app_info['ver'], '-' + app_info['env'])) client.run(json_reader.read('token'))
def init(self, cfg_name, *args, **kwargs): try: self.config = json_reader.read(cfg_name) except JSONDecodeError as e: raise e
def init(self, *args, **kwds): self.config = json_reader.read(CONFIG_NAME) self.verify_table_exists('users') self.connection = None