8d33c22f71
fixed DB and added a link command that saves user's list to DB
18 lines
610 B
Python
18 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)
|