randydev commited on
Commit
5f48bc3
·
verified ·
1 Parent(s): d03defb

Update chatbot/plugins/chat.py

Browse files
Files changed (1) hide show
  1. chatbot/plugins/chat.py +3 -2
chatbot/plugins/chat.py CHANGED
@@ -236,8 +236,9 @@ async def memory_updated(client, callback):
236
  user_id = int(callback.matches[0].group(1))
237
  check_memory = {}
238
  if callback.message.id not in check_memory:
239
- check_memory = {}
240
- if check_memory[callback.message.id]:
 
241
  return await callback.answer("Memory is Already Updated!", False)
242
  backup_chat = await db._get_chatbot_chat_from_db(user_id)
243
  try:
 
236
  user_id = int(callback.matches[0].group(1))
237
  check_memory = {}
238
  if callback.message.id not in check_memory:
239
+ check_memory[callback.message.id] = False
240
+ is_memory = check_memory[callback.message.id]
241
+ if is_memory:
242
  return await callback.answer("Memory is Already Updated!", False)
243
  backup_chat = await db._get_chatbot_chat_from_db(user_id)
244
  try: