Skip to content

Commit

Permalink
Added &water
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiDuncan committed Nov 10, 2023
1 parent 97c4307 commit 63aa441
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions sizebot/cogs/objects.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from decimal import Decimal
import logging
import math
import random
Expand Down Expand Up @@ -326,6 +327,28 @@ async def food(self, ctx, food: typing.Union[DigiObject, str], *, who: typing.Un

await ctx.send(embed = embed)

@commands.command(
category = "objects"
)
async def water(self, ctx, *, who: typing.Union[discord.Member, FakePlayer, SV] = None):
if who is None:
who = ctx.author

userdata = userdb.load_or_fake(who)
scale = userdata.scale

BASE_WATER = WV(3200)

water_weight = WV(BASE_WATER * (scale ** 3))
water_liters = water_weight / 1000
water_gallons = water_liters / Decimal("3.78541")

embed = discord.Embed(
title = f"{userdata.nickname} drinking water",
description = f"{userdata.nickname} would need to drink **{water_weight:,.3mu}** per day. That's **{water_liters:,.1} liters**, or **{water_gallons:,.1} gallons**.")

await ctx.send(embed = embed)

@release_on("3.7")
@commands.command(
category = "objects"
Expand Down

0 comments on commit 63aa441

Please sign in to comment.