29 lines
1.1 KiB
Python
29 lines
1.1 KiB
Python
from aiogram import Bot, Router, types
|
|
|
|
from utils.logging import logger
|
|
|
|
router = Router()
|
|
|
|
|
|
@router.startup()
|
|
async def startup(bot: Bot) -> None:
|
|
await bot.set_my_commands(
|
|
[
|
|
types.BotCommand(command="/start", description="Start bot"),
|
|
types.BotCommand(command="/apikey", description="Set Gemini API key"),
|
|
types.BotCommand(command="/new", description="Create new chat"),
|
|
types.BotCommand(command="/clear", description="Clear chat history"),
|
|
types.BotCommand(command="/prompt", description="Set system prompt"),
|
|
types.BotCommand(command="/model", description="Change AI model"),
|
|
types.BotCommand(command="/presets", description="Show prompt presets"),
|
|
types.BotCommand(command="/preset", description="Apply a preset"),
|
|
types.BotCommand(command="/proxy", description="Proxy chat to another bot"),
|
|
]
|
|
)
|
|
logger.info(f"[green]Started as[/] @{(await bot.me()).username}")
|
|
|
|
|
|
@router.shutdown()
|
|
async def shutdown() -> None:
|
|
logger.info("Shutting down bot...")
|