diff --git a/app/cogs/cheeky_functions.py b/app/cogs/cheeky_functions.py index 96389664..7fa5f42e 100644 --- a/app/cogs/cheeky_functions.py +++ b/app/cogs/cheeky_functions.py @@ -10,12 +10,21 @@ class Cheeky(commands.Cog): def __init__(self, bot): self.bot: commands.Bot = bot - @commands.command(name="decide") - async def decide(self, ctx: commands.Context): + @commands.slash_command( + guild_ids=None, + name="decide", + description="Separate your choices with the word 'or', or dont to get a yes or no response.", + ) + @option(name="input_string", required=True) + async def decide(self, ctx, input_string): - import decide + import random - await ctx.reply(decide.decide(ctx.message.content)) + choices = input_string.split(" or ") + if len(choices) > 1: + await ctx.respond(random.choice(choices)) + else: + await ctx.respond(random.choice(["yes", "no"])) @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 100755 index f1509b53..00000000 --- a/app/decide.py +++ /dev/null @@ -1,12 +0,0 @@ -import random -import help_methods - - -def decide(message): - choices = message.replace("!decide", "").lstrip().split(" or ") - if "" in choices: - return help_methods.get_help_message("decide") - elif len(choices) > 1: - return random.choice(choices) - else: - return random.choice(["yes", "no"])