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

@ -6,13 +6,13 @@ import (
)
// GetFile get download info of File by fileID from Telegram.
func (r *Robot) GetFile(ctx context.Context, fileID string) (*File, error) {
func (b *Bot) GetFile(ctx context.Context, fileID string) (*File, error) {
formData := url.Values{
"file_id": {fileID},
}
var result File
err := r.postForm(ctx, "/getFile", formData, &result)
err := b.postForm(ctx, "/getFile", formData, &result)
if err != nil {
return nil, err
}