Skip to content

Commit

Permalink
update heroku guide + add userge modes guide
Browse files Browse the repository at this point in the history
  • Loading branch information
rking32 committed Sep 26, 2020
1 parent 4483afe commit 383541d
Showing 3 changed files with 66 additions and 35 deletions.
52 changes: 30 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -79,21 +79,44 @@ async def testing(message: Message):
* Google Drive [API Keys](https://console.developers.google.com/)
* MongoDB [Database URL](https://cloud.mongodb.com/)

## UserGe MODES 🕹

* **USER** mode `(using user account)`
* **BOT** mode `(using bot account)`
* **DUAL** mode `(using both user and bot account)`

> further **read** [config.env.sample](https://github.com/UsergeTeam/Userge/blob/alpha/config.env.sample)
## How To Deploy 👷

* **[HEROKU](https://www.heroku.com/) Method** 🔧
* **[HEROKU](https://www.heroku.com/) Method** 🚀

> First click the button below.
> First click [**this**](https://heroku.com/deploy?template=https://github.com/UsergeTeam/Userge/tree/master)
> If you don't have HU_STRING_SESSION just ignore it.
> Fill `API_ID`, `API_HASH`, `DATABASE_URL` and `LOG_CHANNEL_ID` (**required**)
> After Deployed to Heroku first turn off the app (resources -> turn off) and run `bash genStr` in console (more -> run console).
> Choose your [**MODE**](https://github.com/UsergeTeam/Userge#userge-modes-)
> After that copy the string session and past it in Config Vars (settings -> reveal config vars).
> Then fill other **non-required** vars as relevent to your **MODE**
> Finally turn on the app and check the logs (settings -> view logs) :)
> Finally **hit deploy** button
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/UsergeTeam/Userge/tree/master)
> [**NOTE**] : your can fill other vars as your need and they are optional. (settings -> reveal config vars)
* **Docker Method** 🐳

1. Install Docker ( [Guide](https://docs.docker.com/engine/install/ubuntu/) )
2. Clone the repo
`git clone https://github.com/UsergeTeam/Userge.git`
3. `cd Userge`
4. Create the docker image
`docker build -t userge .`
5. `cd ..`
6. `wget https://raw.githubusercontent.com/UsergeTeam/Userge/alpha/config.env.sample -O config.env`
7. Edit the file with your text editor
`vi config.env`
8. Finally run the container
`docker run -dv "$(pwd)/config.env:/app/config.env" userge`

* **Other Method** 🔧

@@ -121,21 +144,6 @@ async def testing(message: Message):

* **[More Detailed Guide](https://docs.google.com/document/d/15uoiOn2NkN518MMkx9h5UaMEWMp8aNZqJocXvS0uI6E)** 📝

### Run on Docker 🐳

1. Install Docker ( [Guide](https://docs.docker.com/engine/install/ubuntu/) )
2. Clone the repo
`git clone https://github.com/UsergeTeam/Userge.git`
3. `cd Userge`
4. Create the docker image
`docker build -t userge .`
5. `cd ..`
6. `wget https://raw.githubusercontent.com/UsergeTeam/Userge/alpha/config.env.sample -O config.env`
7. Edit the file with your text editor
`vi config.env`
8. Finally run the container
`docker run -dv "$(pwd)/config.env:/app/config.env" userge`

### Video Tutorial 🎥

[![Tutorial](resources/tutorial.jpg)](https://youtu.be/M4T_BJvFqkc "Tutorial")
8 changes: 7 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
@@ -17,7 +17,13 @@
"DATABASE_URL": {"description": "Mongodb url from https://cloud.mongodb.com/"},
"LOG_CHANNEL_ID": {"description": "Telegram Log Channel ID"},
"HU_STRING_SESSION": {
"description": "Get it by 'https://GenUserGeString.usergeuserbot.repl.run' or use `bash genStr`",
"description": "[USER MODE] - Get this using 'https://GenUserGeString.usergeuserbot.repl.run' or `bash genStr`",
"required": false},
"BOT_TOKEN": {
"description": "[BOT MODE] - Get this from https://t.me/botfather",
"required": false},
"OWNER_ID": {
"description": "[BOT MODE] - Your user_id",
"required": false}
},
"addons": [],
41 changes: 29 additions & 12 deletions config.env.sample
Original file line number Diff line number Diff line change
@@ -21,10 +21,6 @@ API_ID=""
API_HASH=""


# Get it by 'https://GenUserGeString.usergeuserbot.repl.run' or use `bash genStr`
HU_STRING_SESSION=""


# Mongodb url from https://cloud.mongodb.com/
DATABASE_URL=""

@@ -33,21 +29,18 @@ DATABASE_URL=""
LOG_CHANNEL_ID=""


# one of USERGE MODE
# you can use userge as [ USER or BOT or DUAL ] MODE
# see below for more info


# ----------- OPTIONAL ----------- #


# Set true if your like to use unofficial plugins
LOAD_UNOFFICIAL_PLUGINS=false


# Get this from https://t.me/botfather if you like to use userge as a bot
BOT_TOKEN=""


# Your user_id if you are gonna use userge as a bot
OWNER_ID=""


# Userbot Workers Count : Default = cpu_count + 4
WORKERS=""

@@ -124,16 +117,19 @@ UNFINISHED_PROGRESS_STR='░'
# custom name for your sticker pack
CUSTOM_PACK_NAME=""


# set your own custom media for .alive or
# disable it by putting value 'nothing'
# accepted formats:
# a link to message: https://t.me/theuserge/8
# chat and message id separated by |: -1005545442|84565
ALIVE_MEDIA=""


# your instagram username
INSTA_ID=""


# your instagram password
INSTA_PASS=""

@@ -147,3 +143,24 @@ HEROKU_API_KEY=""

# given app name to the heroku app
HEROKU_APP_NAME=""


# ----------- USERGE MODES ----------- #


# >>> USER MODE <<< #
# use userge as user
# get this using [ 'https://GenUserGeString.usergeuserbot.repl.run' or `bash genStr` ]
HU_STRING_SESSION=""


# >>> BOT MODE <<< #
# use userge as bot
# get this from https://t.me/botfather if you like to use userge as a bot
BOT_TOKEN=""
OWNER_ID="" # your user_id


# >>> DUAL MODE <<< #
# use userge as both user and bot
# fill all USER MODE and BOT MODE vars

0 comments on commit 383541d

Please sign in to comment.