1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00
royalnet/newuser.py

43 lines
980 B
Python
Raw Normal View History

2017-10-17 18:49:28 +00:00
import db
2017-10-25 09:09:06 +00:00
user = db.Royal.get_or_create(input("Nome account: "))
db.session.add(user)
db.session.commit()
try:
steam = db.Steam.get_or_create(user.id, input("Steam ID 1: "))
except KeyboardInterrupt:
pass
else:
db.session.add(steam)
try:
dota = db.Dota.get_or_create(steam.steam_id)
except KeyboardInterrupt:
pass
else:
db.session.add(dota)
try:
rl = db.RocketLeague.get_or_create(steam.steam_id)
except KeyboardInterrupt:
pass
else:
db.session.add(rl)
try:
osu = db.Osu.get_or_create(user.id, input("Osu! username: "))
except KeyboardInterrupt:
pass
else:
db.session.add(osu)
try:
overwatch = db.Overwatch.get_or_create(user.id, input("Battle.net battletag: "))
except KeyboardInterrupt:
pass
else:
db.session.add(overwatch)
try:
lol = db.LeagueOfLegends.get_or_create(user.id, input("League summoner name: "))
except KeyboardInterrupt:
pass
else:
db.session.add(lol)
db.session.commit()
db.session.close()