GuildInfoSaver: also update owner id

This commit is contained in:
Dragory 2019-07-12 14:25:27 +03:00
parent 4cf58bd9f5
commit d80bc54635
3 changed files with 6 additions and 3 deletions

View file

@ -39,7 +39,7 @@ export class AllowedGuilds extends BaseRepository {
.getMany(); .getMany();
} }
updateInfo(id, name, icon) { updateInfo(id, name, icon, ownerId) {
return this.allowedGuilds.update({ id }, { name, icon }); return this.allowedGuilds.update({ id }, { name, icon, owner_id: ownerId });
} }
} }

View file

@ -11,4 +11,7 @@ export class AllowedGuild {
@Column() @Column()
icon: string; icon: string;
@Column()
owner_id: string;
} }

View file

@ -19,6 +19,6 @@ export class GuildInfoSaverPlugin extends ZeppelinPlugin {
} }
protected updateGuildInfo() { protected updateGuildInfo() {
this.allowedGuilds.updateInfo(this.guildId, this.guild.name, this.guild.iconURL); this.allowedGuilds.updateInfo(this.guildId, this.guild.name, this.guild.iconURL, this.guild.ownerID);
} }
} }