MCPcopy Create free account
hub / github.com/TechifyBots/Rename-Bot / add_user

Method add_user

helper/database.py:36–41  ·  view source on GitHub ↗
(self, b, m)

Source from the content-addressed store, hash-verified

34 )
35
36 async def add_user(self, b, m):
37 u = m.from_user
38 if not await self.is_user_exist(u.id):
39 user = self.new_user(u.id)
40 await self.col.insert_one(user)
41 await send_log(b, u)
42
43 async def is_user_exist(self, id):
44 user = await self.col.find_one({'_id': int(id)})

Callers 2

startFunction · 0.80
_Function · 0.80

Calls 3

is_user_existMethod · 0.95
new_userMethod · 0.95
send_logFunction · 0.90

Tested by

no test coverage detected