balence of all tokens

This commit is contained in:
lickthecheese 2020-02-23 13:54:39 -05:00
parent 3b46751ab4
commit 52723e30ad
2 changed files with 6 additions and 0 deletions

View File

@ -39,6 +39,12 @@ def listTokens(self, c, n, m):
def tokenBal(self, c, n, m):
if len(m) == 1:
try:
if m[0] == '*':
a=''
for i in [s for s in self.stonksData if n in self.stonksData[s]]:
a = a + "{}: {}, ".format(i, self.stonksData[i][n])
self.say(c, 'All your balences: {}'.format(a[:-2]))
return
self.say(c, "your balance of {} is {}.".format(m[0], self.stonksData[m[0]][n]))
except:
self.say(c, 'you have no {}.'.format(m[0]))