Add bot owner commands for adding/removing servers and dashboard users

This commit is contained in:
Dragory 2020-10-10 14:21:59 +03:00
parent cd4b7a2f97
commit 5d13322439
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
8 changed files with 195 additions and 1 deletions

View file

@ -39,4 +39,18 @@ export class AllowedGuilds extends BaseRepository {
updateInfo(id, name, icon, ownerId) {
return this.allowedGuilds.update({ id }, { name, icon, owner_id: ownerId });
}
add(id, data: Partial<Omit<AllowedGuild, "id">> = {}) {
return this.allowedGuilds.insert({
name: "Server",
icon: null,
owner_id: "0",
...data,
id,
});
}
remove(id) {
return this.allowedGuilds.delete({ id });
}
}