Skip to content

Commit

Permalink
feat(skill/introduction): ask about owner info if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
louistiti committed Jun 16, 2022
1 parent 795acc5 commit c5cc9bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions skills/leon/introduction/src/actions/introduce_leon.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
# -*- coding:utf-8 -*-

import utils
from ..lib import db

owner = db.get_owner()

def introduce_leon(params):
"""TODO"""
"""Leon introduces himself and
ask about you if he does not know you yet"""

has_info = False
is_owner_saved = owner != None

if has_info == False:
if is_owner_saved == False:
return utils.output('end', 'leon_introduction_with_question')

return utils.output('end', 'leon_introduction')
4 changes: 2 additions & 2 deletions skills/leon/introduction/src/lib/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def upsert_owner(owner_name, owner_birth_date):
'birth_date': owner_birth_date
}, doc_id=0))

def get_basic_info():
def get_owner():
"""Get owner's basic information"""

return owner_table
return owner_table.get(doc_id=0)

0 comments on commit c5cc9bd

Please sign in to comment.