This repository has been archived by the owner on Sep 25, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,23 @@ | ||
# cli | ||
|
||
The command line interface for telegram. | ||
The command line interface for telegram. | ||
|
||
```console | ||
$ go install github.com/gotd/cli/cmd/tg@latest | ||
``` | ||
|
||
## Usage | ||
|
||
First, initialize configuration (currently only for bots) | ||
|
||
```console | ||
$ tg init --app-id APP_ID --app-hash APP_HASH --token BOT_TOKEN | ||
``` | ||
|
||
This will create config in `gotd` subdirectory of default config directory, for example `~/.config/gotd/gotd.cli.yaml`. | ||
|
||
Now you can issue commands to control your bot. | ||
For example, you can send `Hello world` to `@gotd_test`: | ||
```bash | ||
$ tg send --peer gotd_test "Hello world" | ||
``` |