Initial commit

This commit is contained in:
unknown
2026-05-19 01:41:07 +02:00
commit 033d0ffcb7
19 changed files with 2532 additions and 0 deletions

62
main.py Normal file
View File

@@ -0,0 +1,62 @@
from aiogram import Bot, Dispatcher, F
from aiogram.enums import ParseMode
from aiogram.filters import Command
from aiogram.types import Message
from aiogram.client.default import DefaultBotProperties
import asyncio
bot = Bot(
token=BOT_TOKEN,
default=DefaultBotProperties(parse_mode=ParseMode.HTML)
)
dp = Dispatcher()
def is_admin(user_id: int) -> bool:
return user_id in ADMINS
@dp.message(Command("help"))
async def help_command(message: Message):
if not is_admin(message.from_user.id):
return
help_text = """
<b>Bold text</b>
<i>Italic text</i>
<u>Underlined text</u>
<s>Strikethrough text</s>
<tg-spoiler>Spoiler text</tg-spoiler>
<code>Mono font / inline code</code>
<pre>
Multi-line
mono block
</pre>
<b><i>Bold + Italic</i></b>
Line 1
Line 2
Line 3
<a href="https://telegram.org">Clickable URL</a>
"""
await message.answer(help_text)
@dp.message(Command("start"))
async def start_command(message: Message):
await message.answer("Bot is running.")
async def main():
print("Bot started.")
await dp.start_polling(bot)
if __name__ == "__main__":
asyncio.run(main())