Skip to content

Commit

Permalink
clear code
Browse files Browse the repository at this point in the history
  • Loading branch information
SpenserCai committed Sep 22, 2023
1 parent ae7c90b commit 486ddfa
Show file tree
Hide file tree
Showing 2 changed files with 195 additions and 220 deletions.
12 changes: 11 additions & 1 deletion dbot/slash_handler/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Date: 2023-08-17 09:52:25
* @version:
* @LastEditors: SpenserCai
* @LastEditTime: 2023-09-22 12:16:15
* @LastEditTime: 2023-09-22 13:53:23
* @Description: file content
*/
package slash_handler
Expand Down Expand Up @@ -100,6 +100,16 @@ func (shdl SlashHandler) SendStateMessageWithFlag(state string, s *discordgo.Ses
return msg, nil
}

func (shdl SlashHandler) SendTextInteractionRespondWithFlag(msg string, s *discordgo.Session, i *discordgo.InteractionCreate, flags discordgo.MessageFlags) error {
return s.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
Type: discordgo.InteractionResponseChannelMessageWithSource,
Data: &discordgo.InteractionResponseData{
Content: msg,
Flags: flags,
},
})
}

func (shdl SlashHandler) GetControlNetScript(jsonStr string) (*intersvc.ControlnetPredictScript, error) {
script := &intersvc.ControlnetPredictScript{}
// 把jsonStr转成intersvc.ControlnetScriptArgsItem
Expand Down
Loading

0 comments on commit 486ddfa

Please sign in to comment.