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

Method get_ban_status

helper/database.py:246–253  ·  view source on GitHub ↗
(self, id)

Source from the content-addressed store, hash-verified

244 await self.col.update_one({'_id': int(user_id)}, {'$set': {'ban_status': ban_status}})
245
246 async def get_ban_status(self, id):
247 default = dict(
248 is_banned=False,
249 ban_duration=0,
250 banned_on=datetime.date.max.isoformat(),
251 ban_reason='')
252 user = await self.col.find_one({'_id': int(id)})
253 return user.get('ban_status', default)
254
255 async def get_all_banned_users(self):
256 banned_users = self.col.find({'ban_status.is_banned': True})

Callers 1

_Function · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected