Skip to content

Commit

Permalink
Merge pull request tucnak#256 from kn100/patch-1
Browse files Browse the repository at this point in the history
Spellcheck/reword
  • Loading branch information
tucnak committed Mar 29, 2020
2 parents dd123e9 + a31b67f commit 7effb48
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func main() {

```

Simple, innit? Telebot's routing system takes care of deliviering updates
Simple, innit? Telebot's routing system takes care of delivering updates
to their endpoints, so in order to get to handle any meaningful event,
all you got to do is just plug your function to one of the Telebot-provided
endpoints. You can find the full list
Expand All @@ -98,7 +98,7 @@ b.Handle(tb.Query, func (q *tb.Query) {
})
```

Now there's a dozen of supported endpoints (see package consts). Let me know
There's dozens of supported endpoints (see package consts). Let me know
if you'd like to see some endpoint or endpoint idea implemented. This system
is completely extensible, so I can introduce them without breaking
backwards-compatibity.
Expand Down Expand Up @@ -202,17 +202,17 @@ to marshal them into whatever format, `File` only contain public fields, so no
data will ever be lost.

## Sendable
Send is undoubteldy the most important method in Telebot. `Send()` accepts a
`Recipient` (could be user, group or a channel) and a `Sendable`. FYI, not only
all telebot-provided media types (`Photo`, `Audio`, `Video`, etc.) are `Sendable`,
but you can create composite types of your own. As long as they satisfy `Sendable`,
Send is undoubtedly the most important method in Telebot. `Send()` accepts a
`Recipient` (could be user, group or a channel) and a `Sendable`. Other types other than
the telebot-provided media types (`Photo`, `Audio`, `Video`, etc.) are `Sendable`.
If you create composite types of your own, and they satisfy the `Sendable` interface,
Telebot will be able to send them out.

```go
// Sendable is any object that can send itself.
//
// This is pretty cool, since it lets bots implement
// custom Sendables for complex kind of media or
// custom Sendables for complex kinds of media or
// chat objects spanning across multiple messages.
type Sendable interface {
Send(*Bot, Recipient, *SendOptions) (*Message, error)
Expand Down Expand Up @@ -409,7 +409,7 @@ b.Handle(tb.OnQuery, func(q *tb.Query) {
}

results[i] = result
results[i].SetResultID(strconv.Itoa(i)) // It's needed to set a unique string ID for each result
results[i].SetResultID(strconv.Itoa(i)) // needed to set a unique string ID for each result
}

err := b.Answer(q, &tb.QueryResponse{
Expand All @@ -423,7 +423,7 @@ b.Handle(tb.OnQuery, func(q *tb.Query) {
})
```

There's not much to talk about really. It also support some form of authentication
There's not much to talk about really. It also supports some form of authentication
through deep-linking. For that, use fields `SwitchPMText` and `SwitchPMParameter`
of `QueryResponse`.

Expand Down

0 comments on commit 7effb48

Please sign in to comment.