Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
Signed-off-by: Administrator <admin@example.com>
  • Loading branch information
yangchuansheng authored and Administrator committed Dec 7, 2022
1 parent e6c1022 commit 939d620
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"log"
"os"
"os/signal"
"strings"
"strconv"
"syscall"
"time"
Expand Down Expand Up @@ -87,7 +88,7 @@ func main() {
}

bot.Request(tgbotapi.NewChatAction(update.Message.Chat.ID, "typing"))
if !update.Message.IsCommand() && (update.Message.Chat.IsPrivate() || (update.Message.Chat.Type == "group" || update.Message.Chat.Type == "supergroup") && strings.HasPrefix(update.Message.Text, "@" + bot.Self.UserName)) {
if !update.Message.IsCommand() && (update.Message.Chat.IsPrivate() || ((update.Message.Chat.Type == "group" || update.Message.Chat.Type == "supergroup") && strings.HasPrefix(update.Message.Text, "@" + bot.Self.UserName))) {
feed, err := chatGPT.SendMessage(update.Message.Text, userConversations[update.Message.Chat.ID].ConversationID, userConversations[update.Message.Chat.ID].LastMessageID)
if err != nil {
msg.Text = fmt.Sprintf("Error: %v", err)
Expand Down

0 comments on commit 939d620

Please sign in to comment.