cli command guild delete

closes #3
This commit is contained in:
Lukas | AstroGD 2022-11-25 16:55:27 +01:00
parent 0c9000a48c
commit 7a5d7f46b6
Signed by: AstroGD
GPG Key ID: 82A5E6C236C535AA

View File

@ -124,6 +124,21 @@ export default async function execute(args: string[]) {
break;
}
case "delete": {
if (!args[1]) return printHelp();
await database.getRepository(GuildSetting).delete({
id: args[1]
});
await database.getRepository(Badword).delete({
guildID: args[1]
});
console.log(`Deleted all data for guild ${args[1]}`);
break;
}
default: {
printHelp();
break;
@ -137,7 +152,8 @@ function printHelp() {
guild info [GUILDID]
guild setPremium [GUILDID] [YYYY-MM-DD or NULL]
guild words [get|add|remove|clear]`);
guild words [get|add|remove|clear]
guild delete [GUILDID]`);
}
function printWordHelp() {