mirror of
https://github.com/miloszowi/everyone-mention-telegram-bot.git
synced 2025-10-10 17:16:03 +00:00
Firebase to MongoDB change, updated README.md, removed entrypoint.py and heroku-specific files
Author: miloszowi<miloszweb@gmail.com>
This commit is contained in:
14
src/app.py
Normal file → Executable file
14
src/app.py
Normal file → Executable file
@@ -1,10 +1,9 @@
|
||||
from .config.credentials import bot_token
|
||||
from .config.handlers import handlers
|
||||
from .handlers.handlerInterface import HandlerInterface
|
||||
from config.credentials import bot_token
|
||||
from config.handlers import handlers
|
||||
from handlers.handlerInterface import HandlerInterface
|
||||
from telegram.ext.dispatcher import Dispatcher
|
||||
from telegram.ext import Updater
|
||||
|
||||
|
||||
class App:
|
||||
updater: Updater
|
||||
dispatcher: Dispatcher
|
||||
@@ -14,6 +13,7 @@ class App:
|
||||
|
||||
def run(self) -> None:
|
||||
self.registerHandlers()
|
||||
|
||||
self.updater.start_polling()
|
||||
self.updater.idle()
|
||||
|
||||
@@ -23,3 +23,9 @@ class App:
|
||||
raise Exception('Invalid list of handlers provided. Handler must implement HandlerInterface')
|
||||
|
||||
self.updater.dispatcher.add_handler(handler.getBotHandler())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = App()
|
||||
|
||||
app.run()
|
0
src/config/contents.py
Normal file → Executable file
0
src/config/contents.py
Normal file → Executable file
12
src/config/credentials.py
Normal file → Executable file
12
src/config/credentials.py
Normal file → Executable file
@@ -5,10 +5,8 @@ load_dotenv()
|
||||
|
||||
bot_token = os.environ['bot_token']
|
||||
|
||||
firebaseConfig = {
|
||||
"apiKey": os.environ['firebase_apiKey'],
|
||||
"authDomain": os.environ['firebase_authDomain'],
|
||||
"databaseURL": os.environ['firebase_databaseURL'],
|
||||
"projectId": os.environ['firebase_projectId'],
|
||||
"storageBucket": os.environ['firebase_storageBucket'],
|
||||
}
|
||||
MONGODB_DATABASE=os.environ['MONGODB_DATABASE']
|
||||
MONGODB_USERNAME=os.environ['MONGODB_USERNAME']
|
||||
MONGODB_PASSWORD=os.environ['MONGODB_PASSWORD']
|
||||
MONGODB_HOSTNAME=os.environ['MONGODB_HOSTNAME']
|
||||
MONGODB_PORT=os.environ['MONGODB_PORT']
|
||||
|
6
src/config/handlers.py
Normal file → Executable file
6
src/config/handlers.py
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
from ..handlers.inHandler import InHandler
|
||||
from ..handlers.outHandler import OutHandler
|
||||
from ..handlers.mentionHandler import MentionHandler
|
||||
from handlers.inHandler import InHandler
|
||||
from handlers.outHandler import OutHandler
|
||||
from handlers.mentionHandler import MentionHandler
|
||||
|
||||
handlers = [
|
||||
InHandler(),
|
||||
|
30
src/database/databaseClient.py
Executable file
30
src/database/databaseClient.py
Executable file
@@ -0,0 +1,30 @@
|
||||
from pymongo.errors import ServerSelectionTimeoutError
|
||||
from config.credentials import MONGODB_USERNAME, MONGODB_PASSWORD, MONGODB_DATABASE, MONGODB_HOSTNAME, MONGODB_PORT
|
||||
from pymongo import MongoClient
|
||||
from pymongo.database import Database
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
class DatabaseClient():
|
||||
mongoClient: MongoClient
|
||||
database: Database
|
||||
|
||||
def __init__(self) -> None:
|
||||
uri = "mongodb://%s:%s@%s:%s/%s?authSource=admin" % (
|
||||
MONGODB_USERNAME, quote_plus(MONGODB_PASSWORD),
|
||||
MONGODB_HOSTNAME, MONGODB_PORT, MONGODB_DATABASE
|
||||
)
|
||||
|
||||
self.mongoClient = MongoClient(uri)
|
||||
self.database = self.mongoClient[MONGODB_DATABASE]
|
||||
|
||||
def insert(self, collection: str, data: dict) -> None:
|
||||
self.database.get_collection(collection).insert_one(data)
|
||||
|
||||
def find(self, collection: str, query: dict) -> dict:
|
||||
return self.database.get_collection(collection).find(query)
|
||||
|
||||
def findOne(self, collection: str, query: dict) -> dict:
|
||||
return self.database.get_collection(collection).find_one(query)
|
||||
|
||||
def remove(self, collection: str, data: dict) -> None:
|
||||
self.database.get_collection(collection).remove(data)
|
28
src/entities/chat.py
Executable file
28
src/entities/chat.py
Executable file
@@ -0,0 +1,28 @@
|
||||
from __future__ import annotations
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class Chat():
|
||||
id: str
|
||||
|
||||
def __init__(self, id: str) -> None:
|
||||
self.id = id
|
||||
|
||||
def getId(self) -> str:
|
||||
return self.id
|
||||
|
||||
def toDict(self) -> dict:
|
||||
return {
|
||||
'_id': self.id
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def getMongoRoot() -> str:
|
||||
return 'chat'
|
||||
|
||||
@staticmethod
|
||||
def fromDocument(document: Optional[dict]) -> Optional[Chat]:
|
||||
if not document:
|
||||
return None
|
||||
|
||||
return Chat(document['_id'])
|
34
src/entities/chatPerson.py
Executable file
34
src/entities/chatPerson.py
Executable file
@@ -0,0 +1,34 @@
|
||||
from __future__ import annotations
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class ChatPerson():
|
||||
chat_id: str
|
||||
person_id: str
|
||||
|
||||
def __init__(self, chatId: str, personId: str) -> None:
|
||||
self.chat_id = chatId
|
||||
self.person_id = personId
|
||||
|
||||
def getChatId(self) -> str:
|
||||
return self.chat_id
|
||||
|
||||
def getPersonId(self) -> str:
|
||||
return self.person_id
|
||||
|
||||
def toDict(self) -> dict:
|
||||
return {
|
||||
'_id': f'{self.chat_id}-{self.person_id}',
|
||||
'chat_id': self.chat_id,
|
||||
'person_id': self.person_id
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def getMongoRoot() -> str:
|
||||
return 'chat_person'
|
||||
|
||||
@staticmethod
|
||||
def fromDocument(document: Optional[dict]) -> Optional[ChatPerson]:
|
||||
if not document:
|
||||
return None
|
||||
return ChatPerson(document['chat_id'], document['person_id'])
|
@@ -1,34 +0,0 @@
|
||||
from typing import Iterable
|
||||
from .user import User
|
||||
|
||||
class Group():
|
||||
__id: int
|
||||
__users: Iterable[User] = []
|
||||
|
||||
def __init__(self, id: int) -> None:
|
||||
self.__id = id
|
||||
|
||||
def getId(self) -> int:
|
||||
return self.__id
|
||||
|
||||
def setUsers(self, users: Iterable[User]) -> None:
|
||||
self.__users = users
|
||||
|
||||
def addUser(self, user: User) -> None:
|
||||
self.__users.append(user)
|
||||
|
||||
def removeUser(self, user: User) -> None:
|
||||
for index, groupUser in enumerate(self.__users):
|
||||
if groupUser.getId() == user.getId():
|
||||
del self.__users[index]
|
||||
|
||||
def getUsers(self) -> Iterable[User]:
|
||||
return self.__users
|
||||
|
||||
def hasUser(self, user: User) -> bool:
|
||||
userIds = [int(groupUser.getId()) for groupUser in self.getUsers()]
|
||||
|
||||
if user.getId() in userIds:
|
||||
return True
|
||||
|
||||
return False
|
44
src/entities/person.py
Executable file
44
src/entities/person.py
Executable file
@@ -0,0 +1,44 @@
|
||||
from __future__ import annotations
|
||||
from abc import abstractmethod
|
||||
from typing import Optional
|
||||
import names
|
||||
|
||||
|
||||
class Person():
|
||||
id: str
|
||||
username: str
|
||||
|
||||
def __init__(self, id: str, username: Optional[str] = None) -> None:
|
||||
self.id = id
|
||||
|
||||
if not username:
|
||||
self.username = names.get_first_name()
|
||||
else:
|
||||
self.username = username
|
||||
|
||||
def getId(self) -> str:
|
||||
return self.id
|
||||
|
||||
def getUsername(self) -> str:
|
||||
return self.username
|
||||
|
||||
def toDict(self, withUsername: bool = True) -> dict:
|
||||
result = {
|
||||
'_id': self.id
|
||||
}
|
||||
|
||||
if withUsername:
|
||||
result['username'] = self.username
|
||||
|
||||
return result
|
||||
|
||||
@staticmethod
|
||||
def getMongoRoot() -> str:
|
||||
return 'person'
|
||||
|
||||
@staticmethod
|
||||
def fromDocument(document: Optional[dict]) -> Optional[Person]:
|
||||
if not document:
|
||||
return None
|
||||
|
||||
return Person(document['_id'], document['username'])
|
@@ -1,19 +0,0 @@
|
||||
from typing import Optional
|
||||
|
||||
class User():
|
||||
__id: int
|
||||
__username: Optional[str]
|
||||
__groupId: int
|
||||
|
||||
def __init__(self, id: int, username: Optional[str]) -> None:
|
||||
self.__id = id
|
||||
self.__username = username
|
||||
|
||||
def getId(self) -> int:
|
||||
return self.__id
|
||||
|
||||
def getUsername(self) -> Optional[str]:
|
||||
return self.__username
|
||||
|
||||
def getGroupId(self) -> int:
|
||||
return self.__groupId
|
@@ -1,34 +0,0 @@
|
||||
import pyrebase
|
||||
from pyrebase.pyrebase import Database as FirebaseDB
|
||||
from .config.credentials import firebaseConfig
|
||||
|
||||
|
||||
class FirebaseProxy():
|
||||
db: FirebaseDB
|
||||
|
||||
# Group specific values
|
||||
group_index: str = 'groups'
|
||||
|
||||
# User specific values
|
||||
id_index: str = 'id'
|
||||
name_index: str = 'name'
|
||||
|
||||
def __init__(self) -> None:
|
||||
firebase = pyrebase.pyrebase.initialize_app(firebaseConfig)
|
||||
self.db = firebase.database()
|
||||
|
||||
def getChilds(self, *childs: str) -> FirebaseDB:
|
||||
current = self.db
|
||||
|
||||
for child_index in childs:
|
||||
current = current.child(child_index)
|
||||
|
||||
return current
|
||||
|
||||
@staticmethod
|
||||
def getGroupPath(groupId: int) -> str:
|
||||
return f'{FirebaseProxy.group_index}/{groupId}'
|
||||
|
||||
@staticmethod
|
||||
def getUserPath(userId: int, groupId: int) -> str:
|
||||
return f'{groupId}_{userId}'
|
3
src/handlers/handlerInterface.py
Normal file → Executable file
3
src/handlers/handlerInterface.py
Normal file → Executable file
@@ -16,3 +16,6 @@ class HandlerInterface:
|
||||
|
||||
@abstractmethod
|
||||
def getCommandName(self) -> str: raise Exception('getCommandName method is not implemented')
|
||||
|
||||
def reply(self, update: Update, message: str) -> None:
|
||||
update.effective_message.reply_markdown_v2(text=message)
|
||||
|
30
src/handlers/inHandler.py
Normal file → Executable file
30
src/handlers/inHandler.py
Normal file → Executable file
@@ -1,12 +1,11 @@
|
||||
from ..config.contents import opted_in_successfully, opted_in_failed
|
||||
from ..entities.user import User
|
||||
from ..repositories.groupRepository import GroupRepository
|
||||
from .handlerInterface import HandlerInterface
|
||||
from config.contents import opted_in_successfully, opted_in_failed
|
||||
from repositories.relationRepository import RelationRepository
|
||||
from database.databaseClient import DatabaseClient
|
||||
from handlers.handlerInterface import HandlerInterface
|
||||
from telegram.ext.callbackcontext import CallbackContext
|
||||
from telegram.ext.commandhandler import CommandHandler
|
||||
from telegram.update import Update
|
||||
|
||||
|
||||
class InHandler(HandlerInterface):
|
||||
botHandler: CommandHandler
|
||||
commandName: str = 'in'
|
||||
@@ -18,18 +17,19 @@ class InHandler(HandlerInterface):
|
||||
)
|
||||
|
||||
def handle(self, update: Update, context: CallbackContext) -> None:
|
||||
groupRepository = GroupRepository()
|
||||
group = groupRepository.get(update.effective_chat.id)
|
||||
user = User(update.effective_user.id, update.effective_user.username)
|
||||
personId = update.effective_user.id
|
||||
chatId = update.effective_chat.id
|
||||
username = update.effective_user.username
|
||||
|
||||
if group.hasUser(user):
|
||||
update.message.reply_markdown_v2(text=opted_in_failed)
|
||||
relationRepository = RelationRepository()
|
||||
relation = relationRepository.get(chatId, personId)
|
||||
|
||||
if relation:
|
||||
self.reply(update, opted_in_failed)
|
||||
return
|
||||
|
||||
group.addUser(user)
|
||||
groupRepository.save(group)
|
||||
|
||||
update.message.reply_markdown_v2(text=opted_in_successfully)
|
||||
|
||||
relationRepository.save(chatId, personId, username)
|
||||
self.reply(update, opted_in_successfully)
|
||||
|
||||
def getBotHandler(self) -> CommandHandler:
|
||||
return self.botHandler
|
||||
|
33
src/handlers/mentionHandler.py
Normal file → Executable file
33
src/handlers/mentionHandler.py
Normal file → Executable file
@@ -1,9 +1,9 @@
|
||||
from ..config.contents import mention_failed
|
||||
from ..entities.group import Group
|
||||
from ..entities.user import User
|
||||
from ..firebaseProxy import FirebaseProxy
|
||||
from ..repositories.groupRepository import GroupRepository
|
||||
from .handlerInterface import HandlerInterface
|
||||
from typing import Iterable
|
||||
from config.contents import mention_failed
|
||||
from entities.person import Person
|
||||
from handlers.handlerInterface import HandlerInterface
|
||||
from repositories.relationRepository import RelationRepository
|
||||
from repositories.personRepository import PersonRepository
|
||||
from telegram.ext.callbackcontext import CallbackContext
|
||||
from telegram.ext.commandhandler import CommandHandler
|
||||
from telegram.update import Update
|
||||
@@ -20,11 +20,15 @@ class MentionHandler(HandlerInterface):
|
||||
)
|
||||
|
||||
def handle(self, update: Update, context: CallbackContext) -> None:
|
||||
groupId = update.effective_chat.id
|
||||
groupRepository = GroupRepository()
|
||||
mentionMessage = self.buildMentionMessage(groupRepository.get(id=groupId))
|
||||
relationRepository = RelationRepository()
|
||||
persons = relationRepository.getPersonsForChat(update.effective_chat.id)
|
||||
|
||||
if not persons:
|
||||
self.reply(update, mention_failed)
|
||||
return
|
||||
|
||||
self.reply(update, self.buildMentionMessage(persons))
|
||||
|
||||
update.message.reply_markdown_v2(text=mentionMessage)
|
||||
|
||||
def getBotHandler(self) -> CommandHandler:
|
||||
return self.botHandler
|
||||
@@ -32,11 +36,10 @@ class MentionHandler(HandlerInterface):
|
||||
def getCommandName(self) -> str:
|
||||
return self.commandName
|
||||
|
||||
def buildMentionMessage(self, group: Group) -> str:
|
||||
def buildMentionMessage(self, persons: Iterable[Person]) -> str:
|
||||
result = ''
|
||||
|
||||
for user in group.getUsers():
|
||||
username = user.getUsername() or user.getId()
|
||||
result += f'*[{username}](tg://user?id={user.getId()})* '
|
||||
for person in persons:
|
||||
result += f'*[{person.getUsername()}](tg://user?id={person.getId()})* '
|
||||
|
||||
return result or mention_failed
|
||||
return result
|
||||
|
28
src/handlers/outHandler.py
Normal file → Executable file
28
src/handlers/outHandler.py
Normal file → Executable file
@@ -1,11 +1,11 @@
|
||||
from ..config.contents import opted_off_successfully, opted_off_failed
|
||||
from ..entities.user import User
|
||||
from ..repositories.groupRepository import GroupRepository
|
||||
from .handlerInterface import HandlerInterface
|
||||
from config.contents import opted_off_successfully, opted_off_failed
|
||||
from handlers.handlerInterface import HandlerInterface
|
||||
from telegram.ext.callbackcontext import CallbackContext
|
||||
from telegram.ext.commandhandler import CommandHandler
|
||||
from telegram.update import Update
|
||||
|
||||
from repositories.relationRepository import RelationRepository
|
||||
|
||||
|
||||
class OutHandler(HandlerInterface):
|
||||
botHandler: CommandHandler
|
||||
@@ -18,18 +18,18 @@ class OutHandler(HandlerInterface):
|
||||
)
|
||||
|
||||
def handle(self, update: Update, context: CallbackContext) -> None:
|
||||
groupRepository = GroupRepository()
|
||||
group = groupRepository.get(update.effective_chat.id)
|
||||
user = User(update.effective_user.id, update.effective_user.username)
|
||||
personId = update.effective_user.id
|
||||
chatId = update.effective_chat.id
|
||||
|
||||
if group.hasUser(user):
|
||||
group.removeUser(user)
|
||||
groupRepository.save(group)
|
||||
|
||||
update.message.reply_markdown_v2(text=opted_off_successfully)
|
||||
relationRepository = RelationRepository()
|
||||
relation = relationRepository.get(chatId, personId)
|
||||
|
||||
if not relation:
|
||||
self.reply(update, opted_off_failed)
|
||||
return
|
||||
|
||||
update.message.reply_markdown_v2(text=opted_off_failed)
|
||||
|
||||
relationRepository.remove(relation)
|
||||
self.reply(update, opted_off_successfully)
|
||||
|
||||
def getBotHandler(self) -> CommandHandler:
|
||||
return self.botHandler
|
||||
|
18
src/repositories/chatRepository.py
Executable file
18
src/repositories/chatRepository.py
Executable file
@@ -0,0 +1,18 @@
|
||||
from database.databaseClient import DatabaseClient
|
||||
from entities.chat import Chat
|
||||
from typing import Optional
|
||||
|
||||
class ChatRepository:
|
||||
database: DatabaseClient
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.database = DatabaseClient()
|
||||
|
||||
def get(self, id: str) -> Optional[Chat]:
|
||||
chat = Chat(id)
|
||||
search = self.database.findOne(Chat.getMongoRoot(), chat.toDict())
|
||||
|
||||
return Chat.fromDocument(search)
|
||||
|
||||
def save(self, chat: Chat) -> None:
|
||||
self.database.insert(Chat.getMongoRoot(), chat.toDict())
|
@@ -1,48 +0,0 @@
|
||||
from ..entities.group import Group
|
||||
from ..entities.user import User
|
||||
from ..firebaseProxy import FirebaseProxy
|
||||
|
||||
|
||||
class GroupRepository():
|
||||
firebase: FirebaseProxy
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.firebase = FirebaseProxy()
|
||||
|
||||
def get(self, id: int) -> Group:
|
||||
group = Group(id)
|
||||
fbData = self.firebase.getChilds(FirebaseProxy.group_index, id).get()
|
||||
users = []
|
||||
|
||||
for userData in fbData.each() or []:
|
||||
userData = userData.val()
|
||||
users.append(
|
||||
User(
|
||||
userData.get(FirebaseProxy.id_index),
|
||||
userData.get(FirebaseProxy.name_index)
|
||||
)
|
||||
)
|
||||
|
||||
group.setUsers(users)
|
||||
|
||||
return group
|
||||
|
||||
def save(self, group: Group) -> None:
|
||||
users = {}
|
||||
|
||||
if not group.getUsers():
|
||||
self.remove(group)
|
||||
|
||||
for user in group.getUsers():
|
||||
users[user.getId()] = {
|
||||
FirebaseProxy.id_index: user.getId(),
|
||||
FirebaseProxy.name_index: user.getUsername()
|
||||
}
|
||||
|
||||
self.firebase.getChilds(
|
||||
FirebaseProxy.group_index,
|
||||
group.getId()
|
||||
).update(users)
|
||||
|
||||
def remove(self, group: Group) -> None:
|
||||
self.firebase.getChilds(FirebaseProxy.group_index, group.getId()).remove()
|
27
src/repositories/personRepository.py
Executable file
27
src/repositories/personRepository.py
Executable file
@@ -0,0 +1,27 @@
|
||||
from database.databaseClient import DatabaseClient
|
||||
from entities.person import Person
|
||||
from typing import Iterable, Optional
|
||||
|
||||
class PersonRepository:
|
||||
database: DatabaseClient
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.database = DatabaseClient()
|
||||
|
||||
def get(self, id: str) -> Optional[Person]:
|
||||
person = Person(id)
|
||||
search = self.database.findOne(Person.getMongoRoot(), person.toDict(False))
|
||||
|
||||
return Person.fromDocument(search)
|
||||
|
||||
def find(self, query: dict) -> Iterable[Person]:
|
||||
result = []
|
||||
search = self.database.find(Person.getMongoRoot(), query)
|
||||
|
||||
for document in search:
|
||||
result.append(Person.fromDocument(document))
|
||||
|
||||
return result
|
||||
|
||||
def save(self, person: Person) -> None:
|
||||
self.database.insert(Person.getMongoRoot(), person.toDict())
|
56
src/repositories/relationRepository.py
Executable file
56
src/repositories/relationRepository.py
Executable file
@@ -0,0 +1,56 @@
|
||||
from typing import Iterable, Optional
|
||||
from database.databaseClient import DatabaseClient
|
||||
from entities.chat import Chat
|
||||
from entities.chatPerson import ChatPerson
|
||||
from entities.person import Person
|
||||
from repositories.personRepository import PersonRepository
|
||||
from repositories.chatRepository import ChatRepository
|
||||
|
||||
|
||||
class RelationRepository():
|
||||
client: DatabaseClient
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.client = DatabaseClient()
|
||||
|
||||
def get(self, chatId: str, personId: str) -> Optional[ChatPerson]:
|
||||
relation = ChatPerson(chatId, personId)
|
||||
search = self.client.findOne(ChatPerson.getMongoRoot(), relation.toDict())
|
||||
|
||||
return ChatPerson.fromDocument(search)
|
||||
|
||||
def save(self, chatId: str, personId: str, username: Optional[str] = None) -> None:
|
||||
relation = ChatPerson(chatId, personId)
|
||||
|
||||
self.client.insert(ChatPerson.getMongoRoot(), relation.toDict())
|
||||
personRepository = PersonRepository()
|
||||
person = personRepository.get(personId)
|
||||
|
||||
if not person:
|
||||
person = Person(personId, username)
|
||||
personRepository.save(person)
|
||||
|
||||
chatRepository = ChatRepository()
|
||||
chat = chatRepository.get(chatId)
|
||||
|
||||
if not chat:
|
||||
chat = Chat(chatId)
|
||||
chatRepository.save(chat)
|
||||
|
||||
def getPersonsForChat(self, chatId: str) -> Iterable[ChatPerson]:
|
||||
result = []
|
||||
relations = self.client.find(ChatPerson.getMongoRoot(), {'chat_id': chatId})
|
||||
|
||||
search = {}
|
||||
for relation in relations:
|
||||
search['_id'] = relation['person_id']
|
||||
|
||||
if not search:
|
||||
return result
|
||||
|
||||
personRepository = PersonRepository()
|
||||
return personRepository.find(search)
|
||||
|
||||
def remove(self, relation: ChatPerson) -> None:
|
||||
self.client.remove(ChatPerson.getMongoRoot() ,relation.toDict())
|
||||
|
@@ -1,12 +0,0 @@
|
||||
from ..firebaseProxy import FirebaseProxy
|
||||
|
||||
|
||||
class UserRepository():
|
||||
firebaseProxy: FirebaseProxy
|
||||
|
||||
def __init__(self) -> None:
|
||||
self.firebaseProxy = FirebaseProxy()
|
||||
|
||||
# TODO : this repository needs to handle user save/deletion/update
|
||||
# right now, all of those above is handled by GroupRepository
|
||||
|
4
src/requirements.txt
Executable file
4
src/requirements.txt
Executable file
@@ -0,0 +1,4 @@
|
||||
python-dotenv==0.19.0
|
||||
python-telegram-bot==13.7
|
||||
pymongo==3.12.0
|
||||
names==0.3.0
|
Reference in New Issue
Block a user