-
Notifications
You must be signed in to change notification settings - Fork 29
Sourcery refactored main branch #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,12 +19,11 @@ async def add_user(self, id): | |
| await self.dcol.insert_one(user) | ||
| async def is_user_exist(self, id): | ||
| user = await self.dcol.find_one({'id':int(id)}) | ||
| return True if user else False | ||
| return bool(user) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
||
| async def total_users_count(self): | ||
| count = await self.dcol.count_documents({}) | ||
| return count | ||
| async def get_all_users(self): | ||
| all_users = self.dcol.find({}) | ||
| return all_users | ||
| return self.dcol.find({}) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Function
|
||
| async def delete_user(self, user_id): | ||
| await self.dcol.delete_many({'id': int(user_id)}) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| import os | ||
| class Config(object): | ||
|
|
||
|
|
||
| class Config((object)): | ||
|
Comment on lines
-2
to
+4
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lines
|
||
|
|
||
| BOT_TOKEN = os.environ.get("BOT_TOKEN", "") | ||
|
|
||
|
|
@@ -11,4 +13,4 @@ class Config(object): | |
|
|
||
| DEV_NAME = os.environ.get("DEV_NAME", "Muhammed") | ||
|
|
||
| DEV_ID = set(int(x) for x in os.environ.get("DEV_ID", "1855070892").split()) | ||
| DEV_ID = {int(x) for x in os.environ.get("DEV_ID", "1855070892").split()} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function
broadcast_refactored with the following changes:remove-redundant-fstring)