From 7ab5ad91de883c81c2ac7bebb6d757e30fe82865 Mon Sep 17 00:00:00 2001 From: ScuroNeko Date: Mon, 2 Feb 2026 17:02:40 +0300 Subject: [PATCH] small fix --- plugins/rp.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/plugins/rp.go b/plugins/rp.go index b8be416..a0180f0 100644 --- a/plugins/rp.go +++ b/plugins/rp.go @@ -147,7 +147,14 @@ func rpWaifuList(ctx *laniakea.MsgContext, db *laniakea.DatabaseContext) { out := make([]string, len(waifus)) kb := laniakea.NewInlineKeyboard(2) for i, waifu := range waifus { - out[i] = fmt.Sprintf("*%s* %d\\* из \"%s\"", waifu.Name, waifu.Rarity, waifu.Fandom) + owner := "нет" + if waifu.OwnerID.Valid { + owner = waifu.Owner.Name + } + out[i] = fmt.Sprintf( + "*%s* %d\\* из \"%s\" (владелец: %s)", + waifu.Name, waifu.Rarity, waifu.Fandom, owner, + ) kb.AddCallbackButton(waifu.Name, "rp.waifu_set", waifu.ID) } kb.AddLine() @@ -637,13 +644,13 @@ func generate(ctx *laniakea.MsgContext, db *laniakea.DatabaseContext) { compressMethod := rpUser.CompressMethod if compressMethod == "messages" { if counter+2 >= rpUser.CompressLimit { - m := ctx.EditCallback("Запущено сжатие чата…", nil) + m = ctx.EditCallback("Запущено сжатие чата…", nil) _compress(ctx, db) m.Delete() } } else if compressMethod == "tokens" { if tokens >= rpUser.CompressLimit*1000 { - m := ctx.EditCallback("Запущено сжатие чата…", nil) + m = ctx.EditCallback("Запущено сжатие чата…", nil) _compress(ctx, db) m.Delete() }