Skip to content

Commit

Permalink
docs(readme): update bot example
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Dec 24, 2020
1 parent 4441c20 commit 5997f98
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,10 @@ You can use generated `tg.Client` that allows calling any MTProto methods
directly.

```go
client, err := telegram.Dial(ctx, telegram.Options{
// Grab these from https://my.telegram.org/apps.
// Never share it or hardcode!
AppID: appID,
AppHash: appHash,
})
if err != nil {
// Grab these from https://my.telegram.org/apps.
// Never share it or hardcode!
client := telegram.NewClient(appID, appHash, telegram.Options{})
if err := client.Connect(ctx); != nil {
panic(err)
}
// Grab token from @BotFather.
Expand Down

0 comments on commit 5997f98

Please sign in to comment.