From 3e4bf464597a178d62282750afe0211f05993946 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Wed, 22 Mar 2023 09:04:58 -0700 Subject: [PATCH] Switch /decide to return an embed --- app/cogs/cheeky_functions.py | 22 +++++++++++++++++----- app/decide.py | 0 2 files changed, 17 insertions(+), 5 deletions(-) delete mode 100644 app/decide.py diff --git a/app/cogs/cheeky_functions.py b/app/cogs/cheeky_functions.py index 5eac85e8..04b97801 100755 --- a/app/cogs/cheeky_functions.py +++ b/app/cogs/cheeky_functions.py @@ -17,18 +17,30 @@ class Cheeky(commands.Cog): description="Separate your choices with the word 'or', or dont to get a yes or no response.", ) @option( - name="input_string", + name="question", required=True, description="Separate your choices with 'or', or enter a singular choice to get a yes/no answer.", ) - async def decide(self, ctx, input_string): + async def decide(self, ctx, question): import random - choices = input_string.split(" or ") + choices = question.split(" or ") if len(choices) > 1: - await ctx.respond(random.choice(choices)) + embed = discord.Embed( + description=random.choice(choices), + color=discord.Color.green(), + type="rich", + ) + embed.set_author(name="You asked me: %s" % question) + await ctx.respond(embed=embed) else: - await ctx.respond(random.choice(["yes", "no"])) + embed = discord.Embed( + description=random.choice(["yes", "no"]), + color=discord.Color.green(), + type="rich", + ) + embed.set_author(name="You asked me: %s" % question) + await ctx.respond(embed=embed) @commands.command(name="coom", pass_context=True) async def coom(self, ctx: commands.Context, id=None): diff --git a/app/decide.py b/app/decide.py deleted file mode 100644 index e69de29b..00000000