ai work
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"database/sql"
|
||||
"errors"
|
||||
"kurumibot/database"
|
||||
"log"
|
||||
"math"
|
||||
"time"
|
||||
|
||||
@@ -52,7 +51,6 @@ type User struct {
|
||||
|
||||
func GetOrCreateUser(tgId int, name string) (*User, error) {
|
||||
user, err := GetUser(tgId)
|
||||
log.Println(errors.Is(err, gorm.ErrRecordNotFound))
|
||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
_, err = CreateUser(tgId, name)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user