raw files
This commit is contained in:
parent
3cef7ac45f
commit
eb65182ee0
30 changed files with 86 additions and 0 deletions
17
src/code/bot.py
Normal file
17
src/code/bot.py
Normal file
|
|
@ -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
|
||||
1
src/code/config.py
Normal file
1
src/code/config.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
BOT_TOKEN = "XXXXXXXXX" # @MosPoly_Helperbot
|
||||
27
src/code/handlers.py
Normal file
27
src/code/handlers.py
Normal file
|
|
@ -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 = "<b>Текст</b>\n\n"
|
||||
|
||||
text += "<b>/dates</b> - Текст\n\n"
|
||||
text += "<b>/picture</b> - Текст\n\n"
|
||||
text += "<b>/gallery</b> - Текст"
|
||||
|
||||
await msg.answer(text)
|
||||
10
src/code/init.py
Normal file
10
src/code/init.py
Normal file
|
|
@ -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())
|
||||
15
src/code/scripts.py
Normal file
15
src/code/scripts.py
Normal file
|
|
@ -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
|
||||
BIN
src/videos/av/buildings/av-1b.mp4
Normal file
BIN
src/videos/av/buildings/av-1b.mp4
Normal file
Binary file not shown.
BIN
src/videos/av/buildings/av-2b.mp4
Normal file
BIN
src/videos/av/buildings/av-2b.mp4
Normal file
Binary file not shown.
BIN
src/videos/av/buildings/av-4b.mp4
Normal file
BIN
src/videos/av/buildings/av-4b.mp4
Normal file
Binary file not shown.
BIN
src/videos/av/floors/av-4b-01f.mp4
Normal file
BIN
src/videos/av/floors/av-4b-01f.mp4
Normal file
Binary file not shown.
BIN
src/videos/av/floors/av-4b-04f.mp4
Normal file
BIN
src/videos/av/floors/av-4b-04f.mp4
Normal file
Binary file not shown.
BIN
src/videos/av/offices/av-4b-04f-04401c.mp4
Normal file
BIN
src/videos/av/offices/av-4b-04f-04401c.mp4
Normal file
Binary file not shown.
BIN
src/videos/av/offices/av-4b-04f-04412c.mp4
Normal file
BIN
src/videos/av/offices/av-4b-04f-04412c.mp4
Normal file
Binary file not shown.
BIN
src/videos/av/offices/av-4b-04f-04413c.mp4
Normal file
BIN
src/videos/av/offices/av-4b-04f-04413c.mp4
Normal file
Binary file not shown.
BIN
src/videos/av/other/av-wardrobe.mp4
Normal file
BIN
src/videos/av/other/av-wardrobe.mp4
Normal file
Binary file not shown.
1
src/videos/bs/buildings/null.md
Normal file
1
src/videos/bs/buildings/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
1
src/videos/bs/floors/null.md
Normal file
1
src/videos/bs/floors/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
1
src/videos/bs/offices/null.md
Normal file
1
src/videos/bs/offices/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
1
src/videos/bs/other/null.md
Normal file
1
src/videos/bs/other/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
1
src/videos/mi/buildings/null.md
Normal file
1
src/videos/mi/buildings/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
1
src/videos/mi/floors/null.md
Normal file
1
src/videos/mi/floors/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
1
src/videos/mi/offices/null.md
Normal file
1
src/videos/mi/offices/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
1
src/videos/mi/other/null.md
Normal file
1
src/videos/mi/other/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
1
src/videos/pk/buildings/null.md
Normal file
1
src/videos/pk/buildings/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
1
src/videos/pk/floors/null.md
Normal file
1
src/videos/pk/floors/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
1
src/videos/pk/offices/null.md
Normal file
1
src/videos/pk/offices/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
1
src/videos/pk/other/null.md
Normal file
1
src/videos/pk/other/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
1
src/videos/pr/buildings/null.md
Normal file
1
src/videos/pr/buildings/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
1
src/videos/pr/floors/null.md
Normal file
1
src/videos/pr/floors/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
1
src/videos/pr/offices/null.md
Normal file
1
src/videos/pr/offices/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
1
src/videos/pr/other/null.md
Normal file
1
src/videos/pr/other/null.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Это файл загулшка
|
||||
Loading…
Add table
Reference in a new issue