From 6c150045f540f1e54926967367998af1e97e955e Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh <102361830+SeaswimmerTheFsh@users.noreply.github.com> Date: Thu, 16 Mar 2023 17:04:11 -0400 Subject: [PATCH] making sure galaxy.py is updated on this --- galaxy/galaxy.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/galaxy/galaxy.py b/galaxy/galaxy.py index 3843dff..bdfa5dd 100644 --- a/galaxy/galaxy.py +++ b/galaxy/galaxy.py @@ -1,6 +1,7 @@ from redbot.core import commands, checks, Config, bot import discord from datetime import datetime +import re class Galaxy(commands.Cog): """Custom cog intended for use on the Galaxy discord server. @@ -14,6 +15,23 @@ class Galaxy(commands.Cog): cocoemoji = 1028535684757209118 ) + @commands.command(aliases=["pxc", "pc", "polarisconvert", "tatsutopolaris", "ttp"]) + @commands.guild_only() + async def polarisxpconvert(self, ctx, *, tatsu_studs: str): + """Converts Tatsu Studs to Polaris XP.""" + try: + tatsu_studs_int = int(f"{tatsu_studs}".replace(",", "")) + except ValueError: + await ctx.send(content="Please input a number!") + return + math = round((tatsu_studs_int/25)*10) + output_from = f'{tatsu_studs_int:,}' + output_to = f'{math:,}' + embed = discord.Embed(color=await self.bot.get_embed_color(None)) + embed.add_field(name="Tatsu Studs", value=f"{output_from}", inline=False) + embed.add_field(name="Polaris XP", value=f"{output_to}", inline=False) + await ctx.send(embed=embed) + @commands.command() async def galaxyissues(self, ctx, target: discord.Member = None): if ctx.me.id == 1070819799254438039: