Bot guild abstractions and .NET core dev portal started

This commit is contained in:
plane000
2018-10-25 18:07:42 +01:00
parent 5d513ade65
commit 37bbb84ec3
13 changed files with 11802 additions and 2 deletions

View File

@@ -8,10 +8,24 @@ export class GuildTools extends BaseDatabase {
const Guild = super.Guild;
try {
return await Guild.create({
id: id,
name: serverName
});
} catch (e) {
Logger.error(`An error occured inserting guild id: ${id}`);
return -1;
}
}
static async deleteGuild(id) {
const Guild = super.Guild;
try {
return Guild.destroy({where: {id: id}});
} catch (e) {
Logger.error(`An error occured while deleting guild id: ${id}`);
return -1;
}
}
}