def __init__(self, bot): self.bot = bot self.script_start = time.time() self.db_path = "./data/discord.db" self.time_heartbeat = 0 self.conn = handySQL.create_connection(self.db_path) self.task = self.bot.loop.create_task(self.background_events())
def __init__(self, bot): self.bot = bot with open("./data/ignored_users.json") as f: self.ignored_users = json.load(f) self.db_path = "./data/discord.db" self.conn = handySQL.create_connection(self.db_path) self.time_to_wait = 20 * 3600 # Wait 20 hours before repping again
def get_connection(self): """ Retreives the current database connection :return: Database Connection """ if self.conn is None: self.conn = handySQL.create_connection(self.db_path) return self.conn
def __init__(self, bot): self.bot = bot self.db_path = "./data/discord.db" self.conn = handySQL.create_connection(self.db_path) self.time_heartbeat = 0 self.task = self.bot.loop.create_task(self.background_save_levels())
def __init__(self, bot): self.bot = bot self.db_path = "./data/discord.db" self.conn = handySQL.create_connection(self.db_path) self.cancel_all = False self.cancel_draws = [] try: self.image = Image.open("place.png") except FileNotFoundError: self.image = None
def __init__(self, bot): self.bot = bot self.script_start = 0 self.waiting = False self.time_counter = 0 # So statistics dont get saved every few seconds, and instead only every 2 mins self.bot_changed_to_yesterday = {} self.time_heartbeat = 0 self.db_path = "./data/discord.db" self.conn = handySQL.create_connection(self.db_path) self.task = self.bot.loop.create_task(self.background_git_backup())
def get_connection(self): """ Retreives the current database connection :return: Database Connection """ if self.conn is None: self.conn = handySQL.create_connection(self.db_path) c = self.conn.cursor() c.execute('PRAGMA foreign_keys = ON;') self.conn.commit() c.close() return self.conn
def __init__(self, bot): self.bot = bot self.clap_counter = 0 self.time = 0 self.confirmed_cases = 0 self.confirm_msg = None # Confirmed message with open("./data/covid19.txt") as f: self.cases_today = int(f.read()) self.db_path = "./data/discord.db" self.conn = handySQL.create_connection(self.db_path) self.time_heartbeat = 0 self.time_since_task_start = time.time() self.task = self.bot.loop.create_task(self.background_check_cases())
def __init__(self, bot): self.bot = bot with open("./data/schedule.json", "r") as f: self.schedule = json.load(f) with open("./data/settings.json", "r") as f: self.settings = json.load(f) self.channel_to_post = self.settings[self.settings["channel_to_post"]] self.test_livestream_message = self.settings["test_livestream_message"] self.send_message_to_finn = self.settings["send_message_to_finn"] self.lecture_updater_version = "v2.4" self.time_heartbeat = 0 self.db_path = "./data/discord.db" self.conn = handySQL.create_connection(self.db_path) self.task = self.bot.loop.create_task(self.background_loop()) self.current_activity = ""
def __init__(self, bot): self.bot = bot self.time = 0 with open("./data/ignored_users.json") as f: self.ignored_users = json.load(f) self.quotes_filepath = "./data/quotes.json" with open(self.quotes_filepath, "r") as f: self.quotes = json.load(f) self.aliases = { "püschel": ["pueschel", "peuschel", "pushel", "puschel"], "steurer": ["streuer", "steuer"], "cannas": ["ana", "canas", "annas", "anna", "canna"], "gross": ["thomas", "thoma"], "olga": ["olge", "sorkine", "sarkine"], "burger": [], "barbara": [], "onur": ["mutlu", "mutu", "multu"], "lengler": ["lenger"] } self.db_path = "./data/discord.db" self.conn = handySQL.create_connection(self.db_path)
def __init__(self, bot): self.bot = bot self.db_path = "./data/discord.db" self.conn = handySQL.create_connection(self.db_path) self.cancel_draw = False
def __init__(self, bot): self.bot = bot self.script_start = time.time() self.db_path = "./data/discord.db" self.conn = handySQL.create_connection(self.db_path)
def __init__(self, bot): self.bot = bot self.sending = False self.db_path = "./data/discord.db" self.conn = handySQL.create_connection(self.db_path)