Switch /decide to return an embed

This commit is contained in:
Luke Robles 2023-03-22 09:04:58 -07:00
parent 355efb85a6
commit 3e4bf46459
2 changed files with 17 additions and 5 deletions

View File

@ -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):

View File