diff options
Diffstat (limited to 'command.py')
-rw-r--r-- | command.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -2,7 +2,7 @@ from telegram import Update | |||
2 | from telegram.constants import ParseMode | 2 | from telegram.constants import ParseMode |
3 | from telegram.error import BadRequest | 3 | from telegram.error import BadRequest |
4 | from telegram.ext import ContextTypes, ConversationHandler | 4 | from telegram.ext import ContextTypes, ConversationHandler |
5 | from dbstore.peewee_store import get_user_access_key, get_user_home_instance | 5 | from dbstore.peewee_store import get_user_access_key, get_user_home_instance, delete_user_by_id |
6 | from config import * | 6 | from config import * |
7 | 7 | ||
8 | 8 | ||
@@ -46,7 +46,8 @@ async def list_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> No | |||
46 | 46 | ||
47 | 47 | ||
48 | async def logout_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: | 48 | async def logout_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: |
49 | await update.message.reply_text(PROMPT_LOGOUT, parse_mode=ParseMode.HTML, reply_markup=MAIN_MENU) | 49 | if delete_user_by_id(str(update.effective_user.id)): |
50 | await update.message.reply_text(PROMPT_LOGOUT_SUCCESS, parse_mode=ParseMode.HTML, reply_markup=LOGIN_MENU) | ||
50 | 51 | ||
51 | 52 | ||
52 | async def toggle_visibility_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: | 53 | async def toggle_visibility_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: |