portal_name = 8 portal_url = 7 parser = argparse.ArgumentParser() parser.add_argument("-u", "--update", action='store_true', help="Updates all Gyms and Stops using Portal info") parser.add_argument("-c", "--config", default="config.ini", help="Config file to use") args = parser.parse_args() config_path = args.config config = create_config(config_path) scraper = IntelMap(config.cookie) if not scraper.getCookieStatus(): print( "There's something wrong with your Cookie! Try getting a new one") if config.cookie_wh: data = { "username": "******", "avatar_url": "https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/237/cookie_1f36a.png", "embeds": [{ "description": ":cookie: Your Intel Cookie probably ran out! Please get a new one or check your account.",
import json import argparse import sys from pymysql import connect import util.tools as tools from util.config import create_config from util.queries import create_queries from util.waypoints import waypoint, init config = create_config("config/config.ini") mydb = connect(host=config.db_host, user=config.db_user, password=config.db_password, database=config.db_name_scan, port=config.db_port, autocommit=True) cursor = mydb.cursor() with open("config/filters.json", encoding="utf-8") as f: config.filters = json.load(f) with open("config/geofence.json", encoding="utf-8") as f: config.geofences = json.load(f) with open("config/templates.json", encoding="utf-8") as f: config.templates = json.load(f) with open(f"locale/{config.language}.json", encoding="utf-8") as f:
import yaml import sys import os from util.config import create_config from dotenv import load_dotenv from discord.ext.commands import Bot load_dotenv() create_config() with open("cfg/config.yml", 'r') as f: config_cfg = yaml.safe_load(f) with open("cfg/cogs.yml", 'r') as f: cog_cfg = yaml.safe_load(f) # Add cogs from cogs.yml file initial_extensions = [] for c in cog_cfg: if cog_cfg[c]: initial_extensions.append(c) client = Bot(command_prefix=config_cfg['Prefix']) # loading extensions/cogs for commands if __name__ == '__main__':