i may be stupid.

pull/1/head
Matt C 3 years ago
parent 84c010eb42
commit 75fb452a98

@ -8,14 +8,15 @@ bot.add_cog(Packages(bot))
@bot.command() @bot.command()
async def distrohop(self, ctx, *, count=0): async def distrohop(self, ctx, *, count=None):
"""Count another miku distrohop""" """Count another miku distrohop"""
if os.path.exists("miku_distrohops.txt"): if os.path.exists("miku_distrohops.txt"):
with open("miku_distrohops.txt", "r") as f: with open("miku_distrohops.txt", "r") as f:
distrohops = int(f.read()) distrohops = int(f.read())
else: else:
distrohops = 0 distrohops = 0
distrohops += count if count != None:
distrohops += count
with open("miku_distrohops.txt", "w") as f: with open("miku_distrohops.txt", "w") as f:
f.write(str(distrohops)) f.write(str(distrohops))
await ctx.send("Miku distrohops: " + str(distrohops)) await ctx.send("Miku distrohops: " + str(distrohops))

Loading…
Cancel
Save