Skip to content

Commit 939d620

Browse files
yangchuanshengAdministrator
authored andcommitted
fix typo
Signed-off-by: Administrator <[email protected]>
1 parent e6c1022 commit 939d620

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"log"
66
"os"
77
"os/signal"
8+
"strings"
89
"strconv"
910
"syscall"
1011
"time"
@@ -87,7 +88,7 @@ func main() {
8788
}
8889

8990
bot.Request(tgbotapi.NewChatAction(update.Message.Chat.ID, "typing"))
90-
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)) {
91+
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))) {
9192
feed, err := chatGPT.SendMessage(update.Message.Text, userConversations[update.Message.Chat.ID].ConversationID, userConversations[update.Message.Chat.ID].LastMessageID)
9293
if err != nil {
9394
msg.Text = fmt.Sprintf("Error: %v", err)

0 commit comments

Comments
 (0)