From c9f3ecb92dec83577449089c55314f695caf347a Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 3 Oct 2016 09:54:00 +0200 Subject: [PATCH] Usiamo db.py per /match --- bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index 336b3c28..c1c87ad3 100644 --- a/bot.py +++ b/bot.py @@ -10,6 +10,7 @@ import lol import discord import subprocess import sm.steammatch as steammatch +import db # Elenco di username dei membri della RYG royalgames = json.load("db.json") @@ -514,9 +515,8 @@ def match(): if len(cmd) > 2: del cmd[0] for name in cmd: - if name.lower() in royalgames: - if "steam" in royalgames[name.lower()]: - tobematched.append(royalgames[name.lower()]["steam"]) + userdata = db.findbyname(name) + tobematched += userdata['steam'] if len(tobematched) > 1: m = list(steammatch.compare(tobematched)) if len(m) > 0: