Open
Conversation
There was a problem hiding this comment.
Pull request overview
Updates config.py defaults for a Telegram file-sharing bot by hardcoding production-like values for tokens/IDs/DB settings.
Changes:
- Replaced environment-only configuration with concrete default values for bot/API credentials and chat/user IDs.
- Changed default port, database name/URI, and force-sub channel behavior.
- Added a hardcoded admin ID to the
ADMINSlist.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
|
||
| #Bot token @Botfather | ||
| TG_BOT_TOKEN = os.environ.get("TG_BOT_TOKEN", "") | ||
| TG_BOT_TOKEN = os.environ.get("TG_BOT_TOKEN", "7543182408:AAFv8tj0CMvnxrLdjh0R-tH8Qx4Y7ZO0vko") |
Comment on lines
+14
to
+17
| APP_ID = int(os.environ.get("APP_ID", "28902436")) | ||
|
|
||
| #Your API Hash from my.telegram.org | ||
| API_HASH = os.environ.get("API_HASH", "") | ||
| API_HASH = os.environ.get("API_HASH", "78e3c8b856fd5bd13b52066a52404c3c") |
|
|
||
| #OWNER ID | ||
| OWNER_ID = int(os.environ.get("OWNER_ID", "")) | ||
| OWNER_ID = int(os.environ.get("OWNER_ID", "6190987091")) |
| #Database | ||
| DB_URI = os.environ.get("DATABASE_URL", "") | ||
| DB_NAME = os.environ.get("DATABASE_NAME", "filesharexbot") | ||
| DB_URI = os.environ.get("DATABASE_URL", "abinnathNS93@cluster0.za32sml.mongodb.net") |
|
|
||
| #force sub channel id, if you want enable force sub | ||
| FORCE_SUB_CHANNEL = int(os.environ.get("FORCE_SUB_CHANNEL", "0")) | ||
| FORCE_SUB_CHANNEL = int(os.environ.get("FORCE_SUB_CHANNEL", "1003155086322")) |
|
|
||
| ADMINS.append(OWNER_ID) | ||
| ADMINS.append(1250450587) | ||
| ADMINS.append(6190987091) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.