added authentication to the bot. added bot commnads. added create button for when the db is empty or no data is available to show.

This commit is contained in:
Hosein
2026-01-05 23:40:13 +03:30
parent 4b5b24c97c
commit caac6c3a08
18 changed files with 369 additions and 47 deletions
+15 -1
View File
@@ -1,11 +1,25 @@
from . import start, students, teachers, courses, tags, categories, common
from . import start, students, teachers, courses, tags, categories, common, login
from bot.callbacks.init import register_all_callbacks
from telebot import types
def register_all_handlers(bot):
"""Register all handlers and callbacks"""
# Set bot commands
commands = [
types.BotCommand(command="start", description="Start the bot"),
types.BotCommand(command="login", description="Login to your account"),
types.BotCommand(command="logout",
description="Logout of your account"),
types.BotCommand(command="session",
description="Info about your session"),
]
bot.set_my_commands(commands)
# Message handlers
start.register(bot)
login.register(bot)
students.register(bot)
teachers.register(bot)
courses.register(bot)