You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 4, 2023. It is now read-only.
- Added sudo using database
NOTE: redeploy recommended to generating database, or you can go to your herokuapp > resources > add-ons > then serach Heroku Postgres > hit Submit Order Form, then copy your database url from DATABASE_URL > Heroku config vars
- mirror: Fix for uploading telegram file_name of None type
- gdriveTools: Fix infinite loop when hitting rate limits
Co-authored-by: Sreeraj V R <[email protected]>
Co-authored-by: Gautam Kumar <[email protected]>
Co-authored-by: KenHV <[email protected]>
- Create a new database user (change YOUR_USER appropriately):
92
+
```
93
+
createuser -P -s -e YOUR_USER
94
+
```
95
+
This will be followed by you needing to input your password.
96
+
- Create a new database table:
97
+
```
98
+
createdb -O YOUR_USER YOUR_DB_NAME
99
+
```
100
+
Change YOUR_USER and YOUR_DB_NAME appropriately.
101
+
- Finally:
102
+
```
103
+
psql YOUR_DB_NAME -h YOUR_HOST YOUR_USER
104
+
```
105
+
This will allow you to connect to your database via your terminal. By default, YOUR_HOST should be 0.0.0.0:5432.
106
+
107
+
You should now be able to build your database URL. This will be:
108
+
```
109
+
sqldbtype://username:pw@hostname:port/db_name
110
+
```
111
+
Replace sqldbtype with whichever db youre using (eg postgres, mysql, sqllite, etc) repeat for your username, password, hostname (localhost?), port (5432?), and db name.
112
+
113
+
**NOTE**: If you deploying on Heroku, no need to generate database manually, because it will automatic generate database
114
+
115
+
</details>
71
116
72
117
## Setting up config file
73
118
<details>
@@ -86,8 +131,8 @@ Fill up rest of the fields. Meaning of each fields are discussed below:
86
131
-**DOWNLOAD_DIR**: The path to the local folder where the downloads should be downloaded to
87
132
-**DOWNLOAD_STATUS_UPDATE_INTERVAL**: A short interval of time in seconds after which the Mirror progress message is updated. (I recommend to keep it `5` seconds at least)
88
133
-**OWNER_ID**: The Telegram user ID (not username) of the Owner of the bot
89
-
-**SUDO_USER**: (Optional field) Multiple Telegram user ID (not username) separate by space.
90
134
-**AUTHORIZED_CHATS**: Fill user_id and chat_id of you want to authorize.
135
+
-**DATABASE_URL**: Your Database URL. See [Generate Database](https://github.com/breakdowns/slam-mirrorbot/tree/master#generate-database) to generate database. (**NOTE**: If you deploying on Heroku, no need to generate database manually, because it will automatic generate database)
91
136
-**AUTO_DELETE_MESSAGE_DURATION**: Interval of time (in seconds), after which the bot deletes it's message (and command message) which is expected to be viewed instantly. (**Note**: Set to `-1` to never automatically delete messages)
92
137
-**IS_TEAM_DRIVE**: (Optional field) Set to `True` if `GDRIVE_FOLDER_ID` is from a Team Drive else `False` or Leave it empty.
93
138
-**USE_SERVICE_ACCOUNTS**: (Optional field) (Leave empty if unsure) Whether to use Service Accounts or not. For this to work see [Using service accounts](https://github.com/breakdowns/slam-mirrorbot#generate-service-accounts-what-is-service-account) section below.
Copy file name to clipboardExpand all lines: app.json
+6-5
Original file line number
Diff line number
Diff line change
@@ -38,10 +38,6 @@
38
38
"description": "The Telegram User ID of the Owner of the Bot. Get it by using /info in @MissRose_bot.",
39
39
"required": true
40
40
},
41
-
"SUDO_USER": {
42
-
"description": "Multiple Telegram user ID (not username) separate by space.",
43
-
"required": false
44
-
},
45
41
"AUTO_DELETE_MESSAGE_DURATION": {
46
42
"description": "Interval of time (in seconds), after which the bot deletes it's message (and command message) which is expected to be viewed instantly. Note: Set to -1 to never automatically delete messages.",
47
43
"required": true
@@ -153,5 +149,10 @@
153
149
"description": "Fill your URL if you are using extra buttons.",
0 commit comments