Skip to content

Commit 96d986f

Browse files
authored
Add back accidentally deleted code
1 parent 0ec09c7 commit 96d986f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

main.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
with open('./Desktop/Stock/database/warnings.json', 'r') as f:
3333
global warnings
3434
warnings = json.load(f)
35+
with open('./Desktop/Stock/database/items.json', 'r') as f:
36+
global items
37+
items = json.load(f)
3538

3639
#Pre-Initialization Commands
3740
def timenow():
@@ -41,6 +44,8 @@ def save():
4144
json.dump(currency, f, indent=4)
4245
with open(f'./Desktop/Stock/database/warnings.json', 'w+') as f:
4346
json.dump(warnings, f, indent=4)
47+
with open(f'./Desktop/Stock/database/items.json', 'w+') as f:
48+
json.dump(items, f, indent=4)
4449

4550
#Classes
4651
class colors:
@@ -52,7 +57,7 @@ class colors:
5257
class plugins:
5358
economy:bool = True
5459
moderation:bool = True
55-
leveling:bool = False
60+
levelling:bool = False
5661
music:bool = False
5762

5863
#Events
@@ -81,6 +86,13 @@ async def on_message(ctx):
8186
pass
8287
else:
8388
warnings[str(ctx.guild.id)][str(ctx.author.id)] = []
89+
if str(ctx.author.id) in items:
90+
pass
91+
else:
92+
items[str(ctx.author.id)] = {}
93+
items[str(ctx.author.id)]['rifle'] = 0
94+
items[str(ctx.author.id)]['fishingpole'] = 0
95+
items[str(ctx.author.id)]['shovel'] = 0
8496
save()
8597

8698
#Error handler

0 commit comments

Comments
 (0)