load json file
This commit is contained in:
parent
9f517aedec
commit
be9bf489bf
Binary file not shown.
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue