Files
bdbot/main.py
2026-01-28 12:47:48 +03:00

26 lines
617 B
Python

"""Main entry point for the bot."""
import threading
from bot import create_bot
from handlers.scheduler import setup_scheduler
def main() -> None:
"""Main function to start the bot and scheduler."""
# Create bot
bot = create_bot()
# Setup scheduler
scheduler = setup_scheduler(bot)
# Start scheduler in a separate thread
scheduler_thread = threading.Thread(target=scheduler.start, daemon=True)
scheduler_thread.start()
# Start bot polling
print("Bot is starting...", flush=True)
bot.infinity_polling(none_stop=True)
if __name__ == "__main__":
main()