Skip to content

Commit

Permalink
Beta143 (#142)
Browse files Browse the repository at this point in the history
* beta1

* beta2

* beta3

* beta4

* beta5

* beta6

* beta7

* beta8

* beta9

* beta10

* beta11

* beta12

* beta13

* beta14

* beta15

* beta16

* beta16

* beta19

* beta20

* beta21

* beta22

* beta23

* beta24

* beta25

* beta27

* beta28

* beta29

* beta30

* beta31

* beta33

* beta34

* beta35

* beta36

* beta37

* beta38

* beta39

* beta40

* beta41

* beta42

* beta43

* beta44

* beta45

* beta45

* beta46

* beat48

* beta49

* beta50

* beta51

* beta52

* beta53

* beta54

* beta55

* beta57

* beta58

* beta59

* beta61

* beta62

* beta63

* beta63

* beta64

* beta65

* beta66

* beta67

* beta70

* beta71

* beta72

* beta72

* beta74

* beta75

* beta76

* beta77

* beta78

* beta79

* beta80

* beta81

* beta82

* beta83

* beta85

* beta86

* beta87

* beta88

* beta89

* beta90

* beta91

* beta92

* beta93

* beta94

* beta94

* beta96

* beta97

* beta98

* beta99

* beta100

* beta101

* beta102

* beta104

* beta105

* beta106

* beta107

* beta108

* beta109

* beta110

* beta111

* beta112

* beta113

* beta115

* beta116

* beta117

* beta118

* beta119

* beta120

* beta121

* beta122

* beta123

* beta124

* beta125

* beta126

* beta127

* beta128

* beta129

* beta130

* beta131

* beta132

* beta1333

* beta134

* beta135

* beta136

* beta137

* beta138

* beta139

* beta140

* beta141

* beta142

* beta143
  • Loading branch information
Hoshinonyaruko authored Jun 8, 2024
1 parent c22ebe8 commit 5a209ae
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions applogic/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

// ApplyPromptChoiceQ 应用promptchoiceQ的逻辑,动态修改requestmsg
func (app *App) ApplyPromptChoiceQ(promptstr string, requestmsg *string, message *structs.OnebotGroupMessage) {
userid := message.UserID
userid := message.UserID + message.SelfID
if config.GetGroupContext() == 2 && message.MessageType != "private" {
userid = message.GroupID + message.SelfID
}
Expand Down Expand Up @@ -137,7 +137,7 @@ func (app *App) ApplyPromptChoiceQ(promptstr string, requestmsg *string, message

// ApplyPromptCoverQ 应用promptCoverQ的逻辑,动态覆盖requestmsg
func (app *App) ApplyPromptCoverQ(promptstr string, requestmsg *string, message *structs.OnebotGroupMessage) {
userid := message.UserID
userid := message.UserID + message.SelfID
if config.GetGroupContext() == 2 && message.MessageType != "private" {
userid = message.GroupID + message.SelfID
}
Expand Down Expand Up @@ -249,7 +249,7 @@ func (app *App) ApplyPromptCoverQ(promptstr string, requestmsg *string, message

// ApplySwitchOnQ 应用switchOnQ的逻辑,动态修改promptstr
func (app *App) ApplySwitchOnQ(promptstr *string, requestmsg *string, message *structs.OnebotGroupMessage) {
userid := message.UserID
userid := message.UserID + message.SelfID
if config.GetGroupContext() == 2 && message.MessageType != "private" {
userid = message.GroupID + message.SelfID
}
Expand Down Expand Up @@ -355,7 +355,7 @@ func (app *App) ProcessExitChoicesQ(promptstr string, requestmsg *string, messag
return
}

userid := message.UserID
userid := message.UserID + message.SelfID
if config.GetGroupContext() == 2 && message.MessageType != "private" {
userid = message.GroupID + message.SelfID
}
Expand Down Expand Up @@ -432,7 +432,7 @@ func (app *App) ProcessExitChoicesQ(promptstr string, requestmsg *string, messag

// HandleExit 处理用户退出逻辑,包括发送消息和重置用户状态。
func (app *App) HandleExit(exitText string, message *structs.OnebotGroupMessage, selfid string, promptstr string) {
userid := message.UserID
userid := message.UserID + message.SelfID
if config.GetGroupContext() == 2 && message.MessageType != "private" {
userid = message.GroupID + message.SelfID
}
Expand All @@ -459,7 +459,7 @@ func (app *App) ProcessExitChoicesA(promptstr string, response *string, message
return
}

userid := message.UserID
userid := message.UserID + message.SelfID
if config.GetGroupContext() == 2 && message.MessageType != "private" {
userid = message.GroupID + message.SelfID
}
Expand Down Expand Up @@ -536,7 +536,7 @@ func (app *App) ProcessExitChoicesA(promptstr string, response *string, message

// ApplySwitchOnA 应用switchOnA的逻辑,动态修改promptstr
func (app *App) ApplySwitchOnA(promptstr *string, response *string, message *structs.OnebotGroupMessage) {
userid := message.UserID
userid := message.UserID + message.SelfID
if config.GetGroupContext() == 2 && message.MessageType != "private" {
userid = message.GroupID + message.SelfID
}
Expand Down Expand Up @@ -622,7 +622,7 @@ func (app *App) ApplySwitchOnA(promptstr *string, response *string, message *str

// ApplyPromptChoiceA 应用故事模式的情绪增强逻辑,并返回增强内容。
func (app *App) ApplyPromptChoiceA(promptstr string, response string, message *structs.OnebotGroupMessage) string {
userid := message.UserID
userid := message.UserID + message.SelfID
if config.GetGroupContext() == 2 && message.MessageType != "private" {
userid = message.GroupID + message.SelfID
}
Expand Down
10 changes: 5 additions & 5 deletions applogic/gensokyo.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) {
}
} else {
// 从数据库读取用户的剧情存档
CustomRecord, err = app.FetchCustomRecord(message.UserID)
CustomRecord, err = app.FetchCustomRecord(message.UserID + message.SelfID)
if err != nil {
fmt.Printf("app.FetchCustomRecord 出错: %s\n", err)
}
Expand Down Expand Up @@ -355,7 +355,7 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) {
if config.GetGroupContext() == 2 && message.MessageType != "private" {
app.migrateUserToNewContext(message.GroupID + message.SelfID)
} else {
app.migrateUserToNewContext(message.UserID)
app.migrateUserToNewContext(message.UserID + message.SelfID)
}
RestoreResponse := config.GetRandomRestoreResponses()
if message.RealMessageType == "group_private" || message.MessageType == "private" {
Expand All @@ -371,7 +371,7 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) {
if config.GetGroupContext() == 2 && message.MessageType != "private" {
app.deleteCustomRecord(message.GroupID + message.SelfID)
} else {
app.deleteCustomRecord(message.UserID)
app.deleteCustomRecord(message.UserID + message.SelfID)
}
return
}
Expand Down Expand Up @@ -560,7 +560,7 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) {
if config.GetGroupContext() == 2 && message.MessageType != "private" {
conversationID, parentMessageID, err = app.handleUserContext(message.GroupID + message.SelfID)
} else {
conversationID, parentMessageID, err = app.handleUserContext(message.UserID)
conversationID, parentMessageID, err = app.handleUserContext(message.UserID + message.SelfID)
}

// 使用map映射conversationID和uid gid的关系
Expand Down Expand Up @@ -679,7 +679,7 @@ func (app *App) GensokyoHandler(w http.ResponseWriter, r *http.Request) {
fmt.Printf("app.FetchCustomRecord 出错: %s\n", err)
}
} else {
CustomRecord, err = app.FetchCustomRecord(message.UserID)
CustomRecord, err = app.FetchCustomRecord(message.UserID + message.SelfID)
if err != nil {
fmt.Printf("app.FetchCustomRecord 出错: %s\n", err)
}
Expand Down

0 comments on commit 5a209ae

Please sign in to comment.