-
Notifications
You must be signed in to change notification settings - Fork 1
/
data.py
36 lines (29 loc) · 1.24 KB
/
data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import sqlite3
con = sqlite3.connect('db/gambling_cat.db', check_same_thread=True)
cur = con.cursor()
######################################################################
# #
# Uncomment below section and change VALUES section appropriatelly #
# for the first bot start up. #
# Then - shutdown bot & comment these line out again. #
# #
######################################################################
#
#cur.execute("""CREATE TABLE users(
# userid text,
# username text,
# address text,
# balance real
# )""")
#cur.execute("INSERT INTO users VALUES ('BotID-goes-here', 'BotName#XXX-goes-here', 'Bot-Assigned-Wallet-Address-goes-here', '0')")
#
#####################################################################
#cur.execute("SELECT * FROM users")
def createWallet(raw, username, address, balance):
cur.execute("INSERT INTO users VALUES (?, ?, ?, ?)",
(str(raw), str(username), str(address['result']), str(balance['result'])))
con.commit()
cur.execute("SELECT * FROM users")
print(cur.fetchall())
con.commit()
#con.close()