Browse Source

Bye Heroku 🥲; will be missed! (#193)

ÁÑÑÍHÌLÅTØR SPÄRK 4 năm trước cách đây
mục cha
commit
aed50caf69
5 tập tin đã thay đổi với 19 bổ sung và 145 xóa
  1. 0 1
      Procfile
  2. 0 8
      README.md
  3. 0 85
      app.json
  4. 0 3
      heroku.yml
  5. 19 48
      sample_config.py

+ 0 - 1
Procfile

@@ -1 +0,0 @@
-worker: python3 -m wbb

+ 0 - 8
README.md

@@ -66,14 +66,6 @@ thehamkercat@arch:~$ cp sample_config.py config.py
 thehamkercat@arch:~$ python3 -m wbb
 ```
 
-<h1>
-    <p align="center">
-        <a href="https://heroku.com/deploy?template=https://github.com/thehamkercat/WilliamButcherBot">
-            <img src="https://www.herokucdn.com/deploy/button.svg" alt="Deploy">
-        </a>
-    </p>
-</h1>
-
 <h3 align="center"> 
    Generating Pyrogram Session For Heroku
 </h3>

+ 0 - 85
app.json

@@ -1,85 +0,0 @@
-{
-    "name": "WilliamButcherBot",
-    "description": "Telegram Group Management Bot Written In Python Using Pyrogram.",
-    "repository": "https://github.com/TheHamkerCat/WilliamButcherBot",
-    "logo": "https://upload.wikimedia.org/wikipedia/commons/c/c3/Python-logo-notext.svg",
-    "keywords": [
-    "python3",
-    "telegram",
-    "bot",
-    "youtube",
-    "telegram-bot",
-    "pyrogram"
-    ],
-    "repository": "https://github.com/TheHamkerCat/WilliamButcherBot",
-    "stack": "container",
-    "env": {
-        "BOT_TOKEN": {
-            "description": "Obtain a Telegram bot token by contacting @BotFather",
-            "required": true
-        },
-        "API_ID": {
-            "description": "API_ID of your Telegram Account my.telegram.org/apps",
-            "required": true
-        },
-        "API_HASH": {
-            "description": "API_HASH of your Telegram Account my.telegram.org/apps",
-            "required": true
-        },
-        "SESSION_STRING": {
-            "description": "Need for Userbot Module So u can execute .sh & .l cmd",
-            "required": true
-        },
-        "SUDO_USERS_ID": {
-            "description": "Sudo users have full access to everythin, don't trust anyone... ex:- 123456 654311 123456",
-            "required": true
-        },
-        "LOG_GROUP_ID": {
-            "description": "For logs channel to note down important bot level events, recommend to make this public. ex: '-123456'",
-            "required": true
-        },
-        "GBAN_LOG_GROUP_ID": {
-            "description": "gban logs. ex: '-123456'",
-            "required": true
-        },
-        "WELCOME_DELAY_KICK_SEC": {
-            "value": "300",
-            "required": true
-        },
-        "MONGO_URL": {
-            "description": "Get From Here. https://telegra.ph/How-To-get-Mongodb-URI-04-06",
-            "required": true
-        },
-        "ARQ_API_URL": {
-            "description": "For Music Downloading And Many More Things... Don't change this value",
-            "value": "https://arq.hamker.in",
-            "required": true
-        },
-        "MESSAGE_DUMP_CHAT": {
-            "description": "Chat_id of the group where useless things will go",
-            "required": true
-        },
-        "ARQ_API_KEY": {
-            "description": "Get this from @ARQRobot.",
-            "required": true
-        },
-        "LOG_MENTIONS": {
-            "description": "Fill 1 to turn this on, or 0 to turn it off.",
-            "required": true
-        },
-        "USERBOT_PREFIX": {
-            "description": "Userbot command prefix, Leave it empty if you don't know what that is.",
-            "required": false
-        },
-        "RSS_DELAY": {
-            "description": "Delay in which RSS will send updates in chat",
-            "value": "300",
-            "required": true
-        },
-        "PM_PERMIT":{
-            "description": "Pm permit, fill 1 to enable or 0 to disable it.",
-            "value": "1",
-            "required": true
-        }
-    }
-}

+ 0 - 3
heroku.yml

@@ -1,3 +0,0 @@
-build:
-  docker:
-      worker: Dockerfile

+ 19 - 48
sample_config.py

@@ -1,48 +1,19 @@
-from os import environ
-
-from dotenv import load_dotenv
-
-load_dotenv("config.env")
-
-HEROKU = bool(
-    environ.get("DYNO")
-)  # NOTE Make it false if you're not deploying on heroku or docker.
-
-if HEROKU:
-
-    BOT_TOKEN = environ.get("BOT_TOKEN", None)
-    API_ID = int(environ.get("API_ID", 6))
-    API_HASH = environ.get("API_HASH", "eb06d4abfb49dc3eeb1aeb98ae0f581e")
-    SESSION_STRING = environ.get("SESSION_STRING", None)
-    USERBOT_PREFIX = environ.get("USERBOT_PREFIX", ".")
-    SUDO_USERS_ID = [int(x) for x in environ.get("SUDO_USERS_ID", "").split()]
-    LOG_GROUP_ID = int(environ.get("LOG_GROUP_ID", None))
-    GBAN_LOG_GROUP_ID = int(environ.get("GBAN_LOG_GROUP_ID", None))
-    MESSAGE_DUMP_CHAT = int(environ.get("MESSAGE_DUMP_CHAT", None))
-    WELCOME_DELAY_KICK_SEC = int(environ.get("WELCOME_DELAY_KICK_SEC", None))
-    MONGO_URL = environ.get("MONGO_URL", None)
-    ARQ_API_URL = environ.get("ARQ_API_URL", None)
-    ARQ_API_KEY = environ.get("ARQ_API_KEY", None)
-    LOG_MENTIONS = bool(int(environ.get("LOG_MENTIONS", None)))
-    RSS_DELAY = int(environ.get("RSS_DELAY", None))
-    PM_PERMIT = bool(int(environ.get("PM_PERMIT", None)))
-else:
-    BOT_TOKEN = "467677575:YZfaakjwd545dfg-N6JStihhuw5gQeZHntc"
-    API_ID = 123456
-    API_HASH = "dfxcgs5s12hdcxfgdfz"
-    USERBOT_PREFIX = "."
-    PHONE_NUMBER = "+916969696969"  # Need for Userbot
-    SUDO_USERS_ID = [
-        4543744343,
-        543214651351,
-    ]  # Sudo users have full access to everything, don't trust anyone
-    LOG_GROUP_ID = -100125431255
-    GBAN_LOG_GROUP_ID = -100125431255
-    MESSAGE_DUMP_CHAT = -1001181696437
-    WELCOME_DELAY_KICK_SEC = 300
-    MONGO_URL = "mongodb+srv://username:password@cluster0.ksiis.mongodb.net/YourDataBaseName?retryWrites=true&w=majority"
-    ARQ_API_KEY = "Get this from @ARQRobot"
-    ARQ_API_URL = "https://arq.hamker.in"
-    LOG_MENTIONS = True
-    RSS_DELAY = 300  # In seconds
-    PM_PERMIT = True
+BOT_TOKEN = "467677575:YZfaakjwd545dfg-N6JStihhuw5gQeZHntc"
+API_ID = 123456
+API_HASH = "dfxcgs5s12hdcxfgdfz"
+USERBOT_PREFIX = "."
+PHONE_NUMBER = "+916969696969"  # Need for Userbot
+SUDO_USERS_ID = [
+    4543744343,
+    543214651351,
+]  # Sudo users have full access to everything, don't trust anyone
+LOG_GROUP_ID = -100125431255
+GBAN_LOG_GROUP_ID = -100125431255
+MESSAGE_DUMP_CHAT = -1001181696437
+WELCOME_DELAY_KICK_SEC = 300
+MONGO_URL = "mongodb+srv://username:password@cluster0.ksiis.mongodb.net/YourDataBaseName?retryWrites=true&w=majority"
+ARQ_API_KEY = "Get this from @ARQRobot"
+ARQ_API_URL = "https://arq.hamker.in"
+LOG_MENTIONS = True
+RSS_DELAY = 300  # In seconds
+PM_PERMIT = True