mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user