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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user