Compare commits
2 commits
c70e6c2431
...
151a4e0875
Author | SHA1 | Date | |
---|---|---|---|
def | 151a4e0875 | ||
def | 5b1c22653c |
0
filters/__init__.py
Normal file
0
filters/__init__.py
Normal file
0
handlers/__init__.py
Normal file
0
handlers/__init__.py
Normal file
0
keyboards/__init__.py
Normal file
0
keyboards/__init__.py
Normal file
12
main.py
Normal file
12
main.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/python
|
||||
from aiogram import executor
|
||||
|
||||
import asyncio
|
||||
|
||||
|
||||
async def main():
|
||||
"""TODO: Create and configure bot, connect to db"""
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
asyncio.run(main())
|
42
manage_db.py
Normal file
42
manage_db.py
Normal file
|
@ -0,0 +1,42 @@
|
|||
from loguru import logger
|
||||
import pretty_errors
|
||||
|
||||
import argparse
|
||||
from argparse import ArgumentParser
|
||||
|
||||
def lmao():
|
||||
print("lmao")
|
||||
|
||||
def init_argparser() -> ArgumentParser:
|
||||
argparser = argparse.ArgumentParser(
|
||||
description="List fish in aquarium.",
|
||||
argument_default=argparse.SUPPRESS
|
||||
)
|
||||
argparser.add_argument(
|
||||
"--init", "-i",
|
||||
help="Инициализирует базу данных",
|
||||
type=str,
|
||||
)
|
||||
argparser.add_argument(
|
||||
"--make-adm", "-m",
|
||||
help="Делает пользователя админом",
|
||||
type=str,
|
||||
)
|
||||
argparser.add_argument(
|
||||
"--del-adm", "-d",
|
||||
help="Забирает права админа у пользователя",
|
||||
type=str,
|
||||
)
|
||||
argparser.add_argument(
|
||||
"--delete-db",
|
||||
help="Снести базу данных",
|
||||
action="lmao"
|
||||
)
|
||||
|
||||
return argparser
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
argparser = init_argparser()
|
||||
args = vars(argparser.parse_args())
|
||||
|
0
middlewares/__init__.py
Normal file
0
middlewares/__init__.py
Normal file
0
models/__init__.py
Normal file
0
models/__init__.py
Normal file
4
requirements.txt
Normal file
4
requirements.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
loguru
|
||||
pretty_errors
|
||||
pyyaml
|
||||
aiogram
|
0
services/__init__.py
Normal file
0
services/__init__.py
Normal file
5
services/repository.py
Normal file
5
services/repository.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
class Repo:
|
||||
"""Db abstraction layer"""
|
||||
|
||||
def __init__(self):
|
||||
pass
|
0
states/__init__.py
Normal file
0
states/__init__.py
Normal file
Reference in a new issue