Commit f6438916 authored by nanahira's avatar nanahira

fix

parent 928b2507
Pipeline #3094 passed with stages
in 1 minute and 5 seconds
import { Injectable, Scope, Logger } from '@nestjs/common';
import { Injectable, Logger } from '@nestjs/common';
@Injectable()
export class BotLogger extends Logger {}
......@@ -19,7 +19,12 @@ export class BotService {
const repo = this.db.getRepository(User);
let ent = await repo.findOne({ where: { id } });
if (ent) {
return ent;
if (!ent.name && name) {
ent.name = name;
return await repo.save(ent);
} else {
return ent;
}
}
ent = new User();
ent.id = id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment