Skip to content

Commit

Permalink
rollback example echo
Browse files Browse the repository at this point in the history
  • Loading branch information
negasus committed Feb 21, 2024
1 parent ee74954 commit 3531ae2
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions examples/echo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"context"
"fmt"
"os"
"os/signal"

Expand Down Expand Up @@ -31,25 +30,8 @@ func main() {
}

func handler(ctx context.Context, b *bot.Bot, update *models.Update) {
_, err := b.SetMessageReaction(ctx, &bot.SetMessageReactionParams{
ChatID: update.Message.Chat.ID,
MessageID: update.Message.ID,
Reaction: []models.ReactionType{
{
Type: models.ReactionTypeTypeEmoji,
ReactionTypeEmoji: &models.ReactionTypeEmoji{
Type: "emoji",
Emoji: "👍",
},
},
},
b.SendMessage(ctx, &bot.SendMessageParams{
ChatID: update.Message.Chat.ID,
Text: update.Message.Text,
})
if err != nil {
fmt.Printf("Error: %v", err)
}

//b.SendMessage(ctx, &bot.SendMessageParams{
// ChatID: update.Message.Chat.ID,
// Text: update.Message.Text,
//})
}

0 comments on commit 3531ae2

Please sign in to comment.