load json file

This commit is contained in:
lickthecheese 2020-02-07 11:50:01 -05:00
parent 9f517aedec
commit be9bf489bf
2 changed files with 14 additions and 1 deletions

Binary file not shown.

View File

@ -1,10 +1,23 @@
# load me
import json
def loadJson(self):
try:
with open('stonks.json') as json_file:
data = json.load(json_file)
print(data)
except FileNotFoundError:
print('not found')
def parseCommand(self, c,n,m):
self.say(c,'PONG!')
def init(self):
self.registerCommand('stonks', parseCommand)
self.registerHelp('stonks', 'stonks - fake cryptocurrency without a blockchain')
loadJson(self)