mirror of
https://github.com/moritzsternemann/QtTelegramBot.git
synced 2025-07-29 19:07:14 +02:00
Update README.md
This commit is contained in:
25
README.md
25
README.md
@ -5,24 +5,29 @@ You need a bot token to make API calls. Text the [@botfather](https://telegram.m
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
Create a lib directory in your project directory and cd into it:
|
Create a lib directory in your project directory and cd into it:
|
||||||
|
```sh
|
||||||
mkdir lib && cd lib
|
mkdir lib && cd lib
|
||||||
|
```
|
||||||
|
|
||||||
Clone the repo to your projects source directory:
|
Clone the repo to your projects source directory:
|
||||||
|
```bash
|
||||||
git clone https://github.com/iMoritz/QtTelegramBot.git
|
git clone https://github.com/iMoritz/QtTelegramBot.git
|
||||||
|
```
|
||||||
|
|
||||||
Alternatively you can add QtTelegramBot as a git submodule to always stay up-to-date:
|
Alternatively you can add QtTelegramBot as a git submodule to always stay up-to-date:
|
||||||
|
```bash
|
||||||
git submodule add https://github.com/iMoritz/QtTelegramBot.git
|
git submodule add https://github.com/iMoritz/QtTelegramBot.git
|
||||||
|
```
|
||||||
|
|
||||||
In your project file (*project*.pro) add this include:
|
In your project file (*project*.pro) add this include:
|
||||||
|
```qmake
|
||||||
include($$PWD/lib/QtTelegramBot/QtTelegramBot.pri)
|
include($$PWD/lib/QtTelegramBot/QtTelegramBot.pri)
|
||||||
|
```
|
||||||
|
|
||||||
Now you can use the Bot classes using:
|
Now you can use the Bot classes using:
|
||||||
|
```c++
|
||||||
#include "qttelegrambot.h"
|
#include "qttelegrambot.h"
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Everything in *QtTelegramBot* is in the `Telegram` namespace.
|
Everything in *QtTelegramBot* is in the `Telegram` namespace.
|
||||||
|
Reference in New Issue
Block a user