diff --git a/src/cli/guild.ts b/src/cli/guild.ts index 9c98555..42c58db 100644 --- a/src/cli/guild.ts +++ b/src/cli/guild.ts @@ -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() {