inline keyboard

This commit is contained in:
2026-01-22 13:47:18 +03:00
parent 8c44707434
commit 015d5b904a
5 changed files with 180 additions and 99 deletions

View File

@@ -3,6 +3,7 @@ package psql
import (
"database/sql"
"errors"
"kurumibot/laniakea"
"github.com/vinovest/sqlx"
)
@@ -15,9 +16,10 @@ type RPGeneralPreset struct {
PostHistory string `db:"post_history"`
}
type RPScenarios struct {
ID int
Name string
Prompt string
ID int
Name string
Description string
Prompt string
}
type RPUser struct {
UserID int64 `db:"user_id"`
@@ -30,8 +32,8 @@ type RPRepository struct {
db *sqlx.DB
}
func NewRPRepository(db *sqlx.DB) *RPRepository {
return &RPRepository{db: db}
func NewRPRepository(db *laniakea.DatabaseContext) *RPRepository {
return &RPRepository{db: db.PostgresSQL}
}
func (rep *RPRepository) GetOrCreateUser(id int64) (*RPUser, error) {