-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (23 loc) · 723 Bytes
/
main.py
File metadata and controls
31 lines (23 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import logging
from dotenv import load_dotenv
import os
import asyncio
import requests
from App import App
from flask import jsonify
from telegram import Update
from telegram.ext import ContextTypes, filters, CommandHandler, MessageHandler
load_dotenv()
# Enable logging
logging.basicConfig(
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO
)
# set higher logging level for httpx to avoid all GET and POST requests being logged
logging.getLogger("httpx").setLevel(logging.WARNING)
logger = logging.getLogger(__name__)
async def main() -> None:
"""Start the bot."""
app = App()
print(await app.get_all_files_info())
if __name__ == "__main__":
asyncio.run(main())