diff --git a/src/code/bot.py b/src/code/bot.py new file mode 100644 index 0000000..353bd0f --- /dev/null +++ b/src/code/bot.py @@ -0,0 +1,17 @@ +import asyncio, logging + +from init import * +from handlers import router + + +async def main() -> None: + dp.include_router(router) + await bot.delete_webhook(drop_pending_updates=True) + await dp.start_polling(bot, allowed_updates=dp.resolve_used_update_types()) + + +if __name__ == "__main__": + logging.basicConfig(level=logging.INFO) + + try: asyncio.run(main()) + except KeyboardInterrupt: pass diff --git a/src/code/config.py b/src/code/config.py new file mode 100644 index 0000000..bd514c4 --- /dev/null +++ b/src/code/config.py @@ -0,0 +1 @@ +BOT_TOKEN = "XXXXXXXXX" # @MosPoly_Helperbot \ No newline at end of file diff --git a/src/code/handlers.py b/src/code/handlers.py new file mode 100644 index 0000000..282a303 --- /dev/null +++ b/src/code/handlers.py @@ -0,0 +1,27 @@ +from aiogram import types, F, Router +from aiogram.types import (Message, InlineQuery, InlineQueryResultArticle, InputTextMessageContent, ChosenInlineResult, + ContentType, InlineKeyboardButton, InlineKeyboardMarkup, CallbackQuery, FSInputFile, + InputMediaPhoto, InlineQueryResultPhoto) +from aiogram.filters import Command, CommandStart +from aiogram.utils.keyboard import InlineKeyboardBuilder + +from init import * +from scripts import * + +router = Router() + + +@router.message(CommandStart()) +async def start_handler(msg: Message) -> None: + await msg.answer("Привет мир!") + + +@router.message(Command("help")) +async def help_handler(msg: Message) -> None: + text = "Текст\n\n" + + text += "/dates - Текст\n\n" + text += "/picture - Текст\n\n" + text += "/gallery - Текст" + + await msg.answer(text) diff --git a/src/code/init.py b/src/code/init.py new file mode 100644 index 0000000..4004301 --- /dev/null +++ b/src/code/init.py @@ -0,0 +1,10 @@ +from aiogram import Bot, Dispatcher +from aiogram.enums.parse_mode import ParseMode +from aiogram.fsm.storage.memory import MemoryStorage +from aiogram.client.bot import DefaultBotProperties + +import config + + +bot = Bot(token=config.BOT_TOKEN, default=DefaultBotProperties(parse_mode=ParseMode.HTML)) +dp = Dispatcher(storage=MemoryStorage()) diff --git a/src/code/scripts.py b/src/code/scripts.py new file mode 100644 index 0000000..24ad5c6 --- /dev/null +++ b/src/code/scripts.py @@ -0,0 +1,15 @@ +from csv import reader, writer + +def write_log(text): + with open("../data/database/log.txt", "a") as f: + f.writelines(text) + + +def view_csv(filename): + data = [] + with open(f'../data/database/{filename}', 'r', encoding='utf-8') as csvfile: + csvreader = reader(csvfile) + for row in csvreader: + data.append(row) + + return data diff --git a/src/videos/av/buildings/av-1b.mp4 b/src/videos/av/buildings/av-1b.mp4 new file mode 100644 index 0000000..6f1616d Binary files /dev/null and b/src/videos/av/buildings/av-1b.mp4 differ diff --git a/src/videos/av/buildings/av-2b.mp4 b/src/videos/av/buildings/av-2b.mp4 new file mode 100644 index 0000000..8223b16 Binary files /dev/null and b/src/videos/av/buildings/av-2b.mp4 differ diff --git a/src/videos/av/buildings/av-4b.mp4 b/src/videos/av/buildings/av-4b.mp4 new file mode 100644 index 0000000..8c0c780 Binary files /dev/null and b/src/videos/av/buildings/av-4b.mp4 differ diff --git a/src/videos/av/floors/av-4b-01f.mp4 b/src/videos/av/floors/av-4b-01f.mp4 new file mode 100644 index 0000000..2576885 Binary files /dev/null and b/src/videos/av/floors/av-4b-01f.mp4 differ diff --git a/src/videos/av/floors/av-4b-04f.mp4 b/src/videos/av/floors/av-4b-04f.mp4 new file mode 100644 index 0000000..183e93a Binary files /dev/null and b/src/videos/av/floors/av-4b-04f.mp4 differ diff --git a/src/videos/av/offices/av-4b-04f-04401c.mp4 b/src/videos/av/offices/av-4b-04f-04401c.mp4 new file mode 100644 index 0000000..44e2103 Binary files /dev/null and b/src/videos/av/offices/av-4b-04f-04401c.mp4 differ diff --git a/src/videos/av/offices/av-4b-04f-04412c.mp4 b/src/videos/av/offices/av-4b-04f-04412c.mp4 new file mode 100644 index 0000000..eed7982 Binary files /dev/null and b/src/videos/av/offices/av-4b-04f-04412c.mp4 differ diff --git a/src/videos/av/offices/av-4b-04f-04413c.mp4 b/src/videos/av/offices/av-4b-04f-04413c.mp4 new file mode 100644 index 0000000..af54116 Binary files /dev/null and b/src/videos/av/offices/av-4b-04f-04413c.mp4 differ diff --git a/src/videos/av/other/av-wardrobe.mp4 b/src/videos/av/other/av-wardrobe.mp4 new file mode 100644 index 0000000..c091936 Binary files /dev/null and b/src/videos/av/other/av-wardrobe.mp4 differ diff --git a/src/videos/bs/buildings/null.md b/src/videos/bs/buildings/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/bs/buildings/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file diff --git a/src/videos/bs/floors/null.md b/src/videos/bs/floors/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/bs/floors/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file diff --git a/src/videos/bs/offices/null.md b/src/videos/bs/offices/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/bs/offices/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file diff --git a/src/videos/bs/other/null.md b/src/videos/bs/other/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/bs/other/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file diff --git a/src/videos/mi/buildings/null.md b/src/videos/mi/buildings/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/mi/buildings/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file diff --git a/src/videos/mi/floors/null.md b/src/videos/mi/floors/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/mi/floors/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file diff --git a/src/videos/mi/offices/null.md b/src/videos/mi/offices/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/mi/offices/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file diff --git a/src/videos/mi/other/null.md b/src/videos/mi/other/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/mi/other/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file diff --git a/src/videos/pk/buildings/null.md b/src/videos/pk/buildings/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/pk/buildings/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file diff --git a/src/videos/pk/floors/null.md b/src/videos/pk/floors/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/pk/floors/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file diff --git a/src/videos/pk/offices/null.md b/src/videos/pk/offices/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/pk/offices/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file diff --git a/src/videos/pk/other/null.md b/src/videos/pk/other/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/pk/other/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file diff --git a/src/videos/pr/buildings/null.md b/src/videos/pr/buildings/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/pr/buildings/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file diff --git a/src/videos/pr/floors/null.md b/src/videos/pr/floors/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/pr/floors/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file diff --git a/src/videos/pr/offices/null.md b/src/videos/pr/offices/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/pr/offices/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file diff --git a/src/videos/pr/other/null.md b/src/videos/pr/other/null.md new file mode 100644 index 0000000..5f42308 --- /dev/null +++ b/src/videos/pr/other/null.md @@ -0,0 +1 @@ +Это файл загулшка \ No newline at end of file