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:
+15
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user