diff options
-rw-r--r-- | cogs/stats.py | 4 | ||||
-rw-r--r-- | components/AnswerModal.py | 2 | ||||
-rw-r--r-- | components/__pycache__/AnswerModal.cpython-311.pyc | bin | 10307 -> 10279 bytes |
3 files changed, 1 insertions, 5 deletions
diff --git a/cogs/stats.py b/cogs/stats.py index 071d8d5..575dab5 100644 --- a/cogs/stats.py +++ b/cogs/stats.py @@ -2,8 +2,6 @@ from discord.ext.commands import Cog, Bot from discord.app_commands import command from discord import Interaction, Embed, Color from prisma import Prisma -# from prisma.models import User, CategoryBreakdown -# from prisma import get_client from common.types import category_field_translations reverse_categories = {v: k for k, v in category_field_translations.items()} @@ -16,7 +14,6 @@ class Stats(Cog): @command(description="Get your statistics for qbb") async def stats(self, ctx: Interaction): db = Prisma() - # db = get_client() await db.connect() stats = await db.user.find_first(where={'id': ctx.user.id}) cb = await db.categorybreakdown.find_first(where={'userId': ctx.user.id}) @@ -26,7 +23,6 @@ class Stats(Cog): embed = Embed(title="Your Stats!", description=f"""**Number of correct tossups:** {stats.questions_correct} **Number of incorrect tossups:** {stats.questions_incorrect} """) - print(stats.category_breakdown.__str__()) for cat in category_field_translations.values(): corr = getattr(cb, f'{cat}_correct') incorr = getattr(cb, f'{cat}_incorrect') diff --git a/components/AnswerModal.py b/components/AnswerModal.py index e5b394c..f53a344 100644 --- a/components/AnswerModal.py +++ b/components/AnswerModal.py @@ -22,7 +22,7 @@ class Answer(Modal, title="Submit Answer"): async def on_submit(self, interaction: Interaction) -> None: c = AsyncClient() - db = Prisma(auto_register=True) + db = Prisma() answer_check_resp = await c.get( "https://qbreader.org/api/check-answer", params={ diff --git a/components/__pycache__/AnswerModal.cpython-311.pyc b/components/__pycache__/AnswerModal.cpython-311.pyc index 1640197..b969caa 100644 --- a/components/__pycache__/AnswerModal.cpython-311.pyc +++ b/components/__pycache__/AnswerModal.cpython-311.pyc Binary files differ |