inline keyboard
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user