Skip to content

Commit

Permalink
Merge pull request #82 from Habarug/unchanged
Browse files Browse the repository at this point in the history
Parz coin now has a very small chance of being unchanged since last time
  • Loading branch information
atomflunder authored Oct 6, 2024
2 parents 0869e7c + 8b2235e commit f48f04b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions cogs/funcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ async def parzcoin(self, ctx: commands.Context) -> None:

direction = random.choice(["up", "down"])

floor = 1
floor = 0

if self.parz_coin_value > 999.0:
direction = "down"
Expand All @@ -320,10 +320,16 @@ async def parzcoin(self, ctx: commands.Context) -> None:
percent = random.randint(floor, 75)
self.parz_coin_value *= 1 - (percent / 100)

print_direction = "UP 📈" if direction == "up" else "DOWN 📉"
if percent == 0:
print_str = "Parz Coin is **UNCHANGED** since last time!"
else:
print_direction = "UP 📈" if direction == "up" else "DOWN 📉"
print_str = (
f"Parz Coin is **{print_direction} {percent}%** since last time!"
)

await ctx.send(
f"Parz Coin is **{print_direction} {percent}%** since the last time!\nCurrent value: 0.{self.parz_coin_value:015.0f} USD"
f"{print_str}\nCurrent value: 0.{self.parz_coin_value:015.0f} USD"
)


Expand Down

0 comments on commit f48f04b

Please sign in to comment.