mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-26 00:56:22 +01:00
Python deprecated :/
parent
4fb414a410
commit
4d2a60153d
1 changed files with 8 additions and 8 deletions
|
@ -26,19 +26,19 @@ Install [puTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
|
||||||
In the field *Host Name (or IP address)* enter the IP address of your server. As the connection type, select *SSH* and set *Port* to *22*. You can save these settings my entering a name in the field below *Saved Sessions* and clicking *Save*. Then, click *Open* and enter your username and password when asked to do so.
|
In the field *Host Name (or IP address)* enter the IP address of your server. As the connection type, select *SSH* and set *Port* to *22*. You can save these settings my entering a name in the field below *Saved Sessions* and clicking *Save*. Then, click *Open* and enter your username and password when asked to do so.
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
First, install the Python package manager `pip` (replace `python-pip` with `python3-pip` if you want to use Python 3).
|
First, install the Python package manager `pip`.
|
||||||
```
|
```
|
||||||
apt-get update && apt-get install python-pip
|
apt-get update && apt-get install python3-pip
|
||||||
```
|
```
|
||||||
|
|
||||||
Now, install the `python-telegram-bot` library (replace `pip` with `pip3` if you're using Python 3):
|
Now, install the `python-telegram-bot` library:
|
||||||
```
|
```
|
||||||
pip install python-telegram-bot
|
pip3 install python-telegram-bot
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, confirm the installation (replace `python` with `python3` if you're using Python 3):
|
Finally, confirm the installation:
|
||||||
```
|
```
|
||||||
python -c "import telegram;print(telegram.__version__)"
|
python3 -c "import telegram;print(telegram.__version__)"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Upload your bot's files
|
### Upload your bot's files
|
||||||
|
@ -63,9 +63,9 @@ Create a new *screen* and attach to it:
|
||||||
screen -S mybot
|
screen -S mybot
|
||||||
```
|
```
|
||||||
|
|
||||||
Start the bot (replace `python` with `python3` if you're using Python 3):
|
Start the bot:
|
||||||
```
|
```
|
||||||
python bot.py
|
python3 bot.py
|
||||||
```
|
```
|
||||||
|
|
||||||
Detach from the *screen* by holding <kbd>CTRL</kbd> and pressing <kbd>A</kbd>, then <kbd>D</kbd>. You can now disconnect from the server by typing `exit` if you want.
|
Detach from the *screen* by holding <kbd>CTRL</kbd> and pressing <kbd>A</kbd>, then <kbd>D</kbd>. You can now disconnect from the server by typing `exit` if you want.
|
||||||
|
|
Loading…
Reference in a new issue