maple/commands/character_quiz.py
Matyáš Caras 8d33c22f71
feat: start work on character quiz
fixed DB and added a link command that saves user's list to DB
2024-04-07 12:49:03 +02:00

19 lines
610 B
Python

from interactions import Extension, slash_command, SlashContext
from util.db import get_connection
class CharacterQuizExtension(Extension):
@slash_command(name="kviz", description="Kvíz postav podle tvého anime listu")
async def start_quiz(self, ctx: SlashContext):
await ctx.defer()
c = get_connection(ctx.author_id)
print(c)
if not c:
await ctx.respond("Nemáš propojený anime list, použij příkaz `/link` k propojení!", ephemeral=True)
return
_, _, name, service = c
await ctx.respond(content="Ok", ephemeral=True)