diff --git a/cogs/commands.py b/cogs/commands.py index d87c234..b70c43f 100644 --- a/cogs/commands.py +++ b/cogs/commands.py @@ -626,11 +626,19 @@ class Commands(discord.Cog, name="Commands"): @discord.message_command( name="Paraphrase", guild_ids=ALLOWED_GUILDS, - checks=[Check.check_dalle_roles()], + checks=[Check.check_gpt_roles()], ) async def paraphrase_action(self, ctx, message: discord.Message): await self.converser_cog.paraphrase_action(ctx, message) + @discord.message_command( + name="Elaborate", + guild_ids=ALLOWED_GUILDS, + checks=[Check.check_gpt_roles()], + ) + async def elaborate_action(self, ctx, message: discord.Message): + await self.converser_cog.elaborate_action(ctx, message) + # Search slash commands @discord.slash_command( name="search", diff --git a/cogs/text_service_cog.py b/cogs/text_service_cog.py index 960f80c..c729560 100644 --- a/cogs/text_service_cog.py +++ b/cogs/text_service_cog.py @@ -1061,3 +1061,13 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"): prompt = f"Paraphrase the following text. Maintain roughly the same text length after paraphrasing and the same tone of voice: {prompt} \n\nParaphrased:" await self.ask_command(ctx, prompt, None, None, None, None, from_action=prompt) + + async def elaborate_action(self, ctx, message: discord.Message): + """Message command. paraphrase the current message content""" + user = ctx.user + prompt = await self.mention_to_username(ctx, message.content) + + # Construct the paraphrase prompt + prompt = f"Elaborate upon the subject of the following message: {prompt} \n\nElaboration:" + + await self.ask_command(ctx, prompt, None, None, None, None, from_action=prompt)