Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(fish): 修复客官名显示为菜名的问题 #1000

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 9 additions & 13 deletions plugin/dish/dish.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func init() {
return
}

name := ctx.NickName()
name := ctx.CardOrNickName(ctx.Event.UserID)
dishName := ctx.State["args"].(string)

if dishName == "" {
Expand All @@ -82,12 +82,10 @@ func init() {
return
}

ctx.SendChain(message.Text(fmt.Sprintf(
"已为客官%s找到%s的做法辣!\n"+
"原材料:%s\n"+
"步骤:\n"+
"%s",
name, d.Name, d.Materials, d.Steps),
ctx.SendChain(message.Text(
"已为客官", name, "找到", d.Name, "的做法辣!\n",
"原材料:", d.Materials, "\n",
"步骤:", d.Steps,
))
})

Expand All @@ -105,12 +103,10 @@ func init() {
return
}

ctx.SendChain(message.Text(fmt.Sprintf(
"已为客官%s送上%s的做法:\n"+
"原材料:%s\n"+
"步骤:\n"+
"%s",
name, d.Name, d.Materials, d.Steps),
ctx.SendChain(message.Text(
"已为客官", name, "送上", d.Name, "的做法:\n",
"原材料:", d.Materials, "\n",
"步骤:", d.Steps,
))
})
}
Loading