refactor: change all Robot to Bot (#1767)

* Change all `Robot` to `Bot`

* Change all `r` of `Bot` to `b`

* Change `Robot` to `bot` in comments

* Fix typo

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
This commit is contained in:
Athurg Gooth
2023-05-29 19:49:05 +08:00
committed by GitHub
parent ddf4cae537
commit 845297ec03
16 changed files with 80 additions and 80 deletions

View File

@ -7,7 +7,7 @@ import (
)
// SendReplyMessage make a sendMessage api request.
func (r *Robot) SendReplyMessage(ctx context.Context, chatID, replyID int, text string) (*Message, error) {
func (b *Bot) SendReplyMessage(ctx context.Context, chatID, replyID int, text string) (*Message, error) {
formData := url.Values{
"reply_to_message_id": {strconv.Itoa(replyID)},
"chat_id": {strconv.Itoa(chatID)},
@ -15,7 +15,7 @@ func (r *Robot) SendReplyMessage(ctx context.Context, chatID, replyID int, text
}
var result Message
err := r.postForm(ctx, "/sendMessage", formData, &result)
err := b.postForm(ctx, "/sendMessage", formData, &result)
if err != nil {
return nil, err
}