Skip to content

Commit

Permalink
u
Browse files Browse the repository at this point in the history
  • Loading branch information
makayla-moster committed Sep 8, 2023
1 parent a4da11b commit 6a04a69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cog_modules/taunts/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import discord
from discord.ext import commands, tasks
from dotenv import load_dotenv
import json

from resources import *

Expand Down Expand Up @@ -142,6 +143,8 @@ async def stockpile(self, ctx: commands.Context):
@commands.command(name="!printdict")
async def printdict(self, ctx: commands.Context):
print(serverResources)
with open('serverResources.json', 'w') as f:
json.dump(serverResources, f)

@commands.command(name="38")
@commands.cooldown(1, 30, commands.BucketType.user)
Expand All @@ -152,7 +155,6 @@ async def no_38(self, ctx: commands.Context):
response = f'Sent to "{ctx.message.author.display_name}": {num} {res}'
if user in serverResources:
currentRes = serverResources[user][res]
print(currentRes)
serverResources[user][res] = str(int(currentRes) + int(num))
else:
serverResources[user] = {"Food": "0", "Wood": "0", "Gold": "0", "Stone": "0"}
Expand Down
Empty file added serverResources.json
Empty file.

0 comments on commit 6a04a69

Please sign in to comment.