1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Some fixes

This commit is contained in:
Steffo 2016-10-03 15:49:30 +02:00
parent c9f3ecb92d
commit 4eec3cf505
2 changed files with 4 additions and 2 deletions

2
bot.py
View file

@ -337,7 +337,7 @@ def cv():
else:
m['name'] = member['username']
tosend += "{emoji} {name}".format(emoji=m['emoji'], name=m['name'])
elif 'gamename' in m:
if 'gamename' in m:
tosend += " | _{gamename}_".format(gamename=m['gamename'])
elif 'channelname' in m:
tosend += " | {vemoji} *{channelname}*".format(vemoji=m['vemoji'], channelname=m['channelname'])

4
db.py
View file

@ -2,13 +2,15 @@ import json
db = json.load("db.json")
def findname(name: str):
def findbyname(name: str):
for player in db:
if player == name:
return db[player]
else:
return None
def findbykey(key, value):
for player in db:
if player[key] == value: