From e8eb3f76e42059efa51b34aa32e88cda658ce862 Mon Sep 17 00:00:00 2001 From: bobloy Date: Wed, 12 Aug 2020 10:57:47 -0400 Subject: [PATCH] confirmation --- chatter/chat.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chatter/chat.py b/chatter/chat.py index 1473ad3..886efc3 100644 --- a/chatter/chat.py +++ b/chatter/chat.py @@ -272,10 +272,16 @@ class Chatter(Cog): await ctx.send("Error occurred :(") @chatter.command(name="trainubuntu") - async def chatter_train_ubuntu(self, ctx: commands.Context): + async def chatter_train_ubuntu(self, ctx: commands.Context, confirmation: bool = False): """ WARNING: Large Download! Trains the bot using Ubuntu Dialog Corpus data. """ + + if not confirmation: + await ctx.maybe_send_embed("Warning: This command downloads ~500MB then eats your CPU for training\n" + "If you're sure you want to continue, run `[p]chatter trainubuntu True`") + return + async with ctx.typing(): future = await self.loop.run_in_executor(None, self._train_ubuntu)