Skip to content

Commit

Permalink
disabled promo popup showing at start by default (i forgot)
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazorTheCat committed Nov 21, 2021
1 parent 6f95534 commit da9ae05
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 2 deletions.
62 changes: 62 additions & 0 deletions Database/ClubManager.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import json
import sqlite3


class ClubManager():
def __init__(self):
self.conn = sqlite3.connect("Database/club.sqlite")
self.cursor = self.conn.cursor()
try:
self.cursor.execute("""CREATE TABLE main (LowID integer, Data json)""")
except:
pass

def createClub(self, lowID, data):
try:
self.cursor.execute("INSERT INTO main (LowID, Data) VALUES (?, ?)",
(lowID, json.dumps(data, ensure_ascii=0)))
self.conn.commit()
except Exception as e:
print(e)

def deleteClub(self, lowID):
try:
self.cursor.execute("DELETE FROM main where LowID=?", (lowID,))
self.conn.commit()
except Exception as e:
print(e)


def GetAllDb(self):
self.playersId = []
try:
self.cursor.execute("SELECT * from main")
self.db = self.cursor.fetchall()
for i in range(len(self.db)):
self.playersId.append(self.db[i][0])
return self.playersId
except Exception as e:
print(e)

def getClubWithLowID(self, low):
try:
self.cursor.execute("SELECT * from main where LowID=?", (low,))
return self.cursor.fetchall()
except Exception as e:
print(e)

def LoadAccount(self, low, player):
try:
self.player = player
self.cursor.execute("SELECT * from main where LowID=?", (low,))
self.players = self.cursor.fetchall()
self.players = json.loads(self.players[0][2])
except Exception as e:
print(e)

def update_player_data(self, data, lowID):
try:
self.cursor.execute("UPDATE main SET Data=? WHERE LowID=?", (json.dumps(data, ensure_ascii=0), lowID))
self.conn.commit()
except Exception as e:
print(e)
2 changes: 1 addition & 1 deletion Database/DatabaseManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class DatabaseManager():
def __init__(self):
self.conn = sqlite3.connect("player.sqlite")
self.conn = sqlite3.connect("Database/player.sqlite")
self.cursor = self.conn.cursor()
try:
self.cursor.execute("""CREATE TABLE main (LowID integer, Token text, Data json)""")
Expand Down
2 changes: 1 addition & 1 deletion Logic/Settings/Configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Configuration:
{
'ID': 83,
'Timer': 0,
'ShowAtLaunch': True,
'ShowAtLaunch': False,
'Text': "",
'Title': "BRAWL TALK IS HERE!",
'Subtitle': "Legendary Sidekick, MAKE Skin, and MORE!",
Expand Down

0 comments on commit da9ae05

Please sign in to comment.