EXTENSIONS = [filename[:len(filename) - 3] for filename in os.listdir(COGS_FOLDER + "/FF-Bots") if filename[0] != '_'] # We cut the '.py' from every filename,and don't take scripts starting w/ '_' COGS_FOLDER = COGS_FOLDER+'.FF-Bots.' ################################################################################################################### # Initializing bot and setting up our 'globals' (between cogs) # ################################################################################################################### # We initialize the bot object as 'client'. client = Bot(command_prefix=BOT_PREFIX) # Setting up global variables (accessible to all cogs/extensions) client.BOT_PREFIX = BOT_PREFIX client.COGS_FOLDER = COGS_FOLDER client.CURRENT_BOT = token_name client.EXTENSIONS = EXTENSIONS ################################################################################################################### # Setting up event handlers (common to all bots) # ################################################################################################################### # Event handler for boot-up @client.event async def on_ready(): if not hasattr(client, 'AppInfo'): client.AppInfo = await client.application_info() print("---------------------------------------------------------------") print("Bot logged in as >>> {0.name} <<< (id : {0.id})".format(client.user)) print("---------------------------------------------------------------") ###################################################################################################################