mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
45 lines
1.1 KiB
Python
45 lines
1.1 KiB
Python
|
import db
|
||
|
|
||
|
session = db.Session()
|
||
|
|
||
|
while True:
|
||
|
user = db.Royal.get_or_create(input("Nome account: "))
|
||
|
session.add(user)
|
||
|
session.commit()
|
||
|
try:
|
||
|
steam = db.Steam.get_or_create(user.id, input("Steam ID 1: "))
|
||
|
except KeyboardInterrupt:
|
||
|
pass
|
||
|
else:
|
||
|
session.add(steam)
|
||
|
try:
|
||
|
dota = db.Dota.get_or_create(steam.steam_id)
|
||
|
except KeyboardInterrupt:
|
||
|
pass
|
||
|
else:
|
||
|
session.add(dota)
|
||
|
try:
|
||
|
rl = db.RocketLeague.get_or_create(steam.steam_id)
|
||
|
except KeyboardInterrupt:
|
||
|
pass
|
||
|
else:
|
||
|
session.add(rl)
|
||
|
try:
|
||
|
osu = db.Osu.get_or_create(user.id, input("Osu! username: "))
|
||
|
except KeyboardInterrupt:
|
||
|
pass
|
||
|
else:
|
||
|
session.add(osu)
|
||
|
try:
|
||
|
overwatch = db.Overwatch.get_or_create(user.id, input("Battle.net battletag: "))
|
||
|
except KeyboardInterrupt:
|
||
|
pass
|
||
|
else:
|
||
|
session.add(overwatch)
|
||
|
try:
|
||
|
lol = db.LeagueOfLegends.get_or_create(user.id, input("League summoner name: "))
|
||
|
except KeyboardInterrupt:
|
||
|
pass
|
||
|
else:
|
||
|
session.add(lol)
|
||
|
session.commit()
|