mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Usiamo db.py per /match
This commit is contained in:
parent
3c4cd694f1
commit
c9f3ecb92d
1 changed files with 3 additions and 3 deletions
6
bot.py
6
bot.py
|
@ -10,6 +10,7 @@ import lol
|
||||||
import discord
|
import discord
|
||||||
import subprocess
|
import subprocess
|
||||||
import sm.steammatch as steammatch
|
import sm.steammatch as steammatch
|
||||||
|
import db
|
||||||
|
|
||||||
# Elenco di username dei membri della RYG
|
# Elenco di username dei membri della RYG
|
||||||
royalgames = json.load("db.json")
|
royalgames = json.load("db.json")
|
||||||
|
@ -514,9 +515,8 @@ def match():
|
||||||
if len(cmd) > 2:
|
if len(cmd) > 2:
|
||||||
del cmd[0]
|
del cmd[0]
|
||||||
for name in cmd:
|
for name in cmd:
|
||||||
if name.lower() in royalgames:
|
userdata = db.findbyname(name)
|
||||||
if "steam" in royalgames[name.lower()]:
|
tobematched += userdata['steam']
|
||||||
tobematched.append(royalgames[name.lower()]["steam"])
|
|
||||||
if len(tobematched) > 1:
|
if len(tobematched) > 1:
|
||||||
m = list(steammatch.compare(tobematched))
|
m = list(steammatch.compare(tobematched))
|
||||||
if len(m) > 0:
|
if len(m) > 0:
|
||||||
|
|
Loading…
Reference in a new issue