Skip to content

Commit

Permalink
Minor fixes to get the demo working again
Browse files Browse the repository at this point in the history
  • Loading branch information
amantri committed Mar 17, 2024
1 parent 995a6d0 commit c95f31a
Show file tree
Hide file tree
Showing 3 changed files with 255 additions and 278 deletions.
6 changes: 3 additions & 3 deletions example/discord/honcho-fact-memory/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ async def on_message(message):
return

user_id = f"discord_{str(message.author.id)}"
user = honcho.get_or_create(user_id)
user = honcho.get_or_create_user(user_id)
location_id = str(message.channel.id)

sessions = list(user.get_sessions_generator(location_id))
try:
collection = user.get_collection(user_id=user_id, name="discord")
collection = user.get_collection(name="discord")
except Exception:
collection = user.create_collection(user_id=user_id, name="discord")
collection = user.create_collection(name="discord")

if len(sessions) > 0:
session = sessions[0]
Expand Down
Loading

0 comments on commit c95f31a

Please sign in to comment.