Skip to content

Commit

Permalink
Beta459 (#459)
Browse files Browse the repository at this point in the history
* beta447

* beta448

* beta449

* beta450

* beta451

* beta452

* beta453

* beta454

* beta455

* btea455

* beta456

* beta457

* beta458

* beta460
  • Loading branch information
Hoshinonyaruko authored Jul 9, 2024
1 parent 427783b commit 2afe6a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Processor/ProcessC2CMessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,17 @@ func (p *Processors) ProcessC2CMessage(data *dto.WSC2CMessageData) error {
//其实不需要用AppIDString,因为gensokyo是单机器人框架
//可以试着开发一个,会很棒的
echo.AddMsgID(AppIDString, userid64, data.ID)

//懒message_id池
echo.AddLazyMessageId(strconv.FormatInt(userid64, 10), data.ID, time.Now())

//懒message_id池
echo.AddLazyMessageId(data.Author.ID, data.ID, time.Now())

//储存类型
echo.AddMsgType(AppIDString, userid64, "group_private")
//储存当前群或频道号的类型
idmap.WriteConfigv2(fmt.Sprint(userid64), "type", "group_private")
//储存当前群或频道号的类型 私信不需要
//idmap.WriteConfigv2(data.ChannelID, "type", "group_private")

// 调试
PrintStructWithFieldNames(privateMsg)
Expand Down Expand Up @@ -302,9 +305,13 @@ func (p *Processors) ProcessC2CMessage(data *dto.WSC2CMessageData) error {
echo.AddMsgType(AppIDString, userid64, "group_private")
//储存当前群或频道号的类型
idmap.WriteConfigv2(fmt.Sprint(userid64), "type", "group_private")

//懒message_id池
echo.AddLazyMessageId(strconv.FormatInt(userid64, 10), data.ID, time.Now())

//懒message_id池
echo.AddLazyMessageId(data.Author.ID, data.ID, time.Now())

//调试
PrintStructWithFieldNames(groupMsg)

Expand Down
2 changes: 2 additions & 0 deletions Processor/ProcessGuildNormalMessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ func (p *Processors) ProcessGuildNormalMessage(data *dto.WSMessageData) error {
echo.AddMsgType(AppIDString, ChannelID64, "guild")
//懒message_id池
echo.AddLazyMessageId(strconv.FormatInt(ChannelID64, 10), data.ID, time.Now())
//测试
echo.AddLazyMessageId(data.ChannelID, data.ID, time.Now())
//懒message_id池
//echo.AddLazyMessageId(strconv.FormatInt(userid64, 10), data.ID, time.Now())
//echo.AddLazyMessageIdv2(strconv.FormatInt(ChannelID64, 10), strconv.FormatInt(userid64, 10), data.ID, time.Now())
Expand Down

0 comments on commit 2afe6a3

Please sign in to comment.