From ca954f25e46c02230b6f697105c7cdb6b7c52cb4 Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Sun, 4 Jul 2021 19:54:28 -0600 Subject: [PATCH] /rcauto --- jarvis/cogs/util.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/jarvis/cogs/util.py b/jarvis/cogs/util.py index db9edfc..68e3e7b 100644 --- a/jarvis/cogs/util.py +++ b/jarvis/cogs/util.py @@ -1,5 +1,6 @@ from discord.ext import commands -from discord_slash import cog_ext +from discord_slash import SlashContext, cog_ext +from discord_slash.utils.manage_commands import create_option import jarvis from jarvis import config, jarvis_self, logo @@ -53,6 +54,25 @@ class UtilCog(commands.Cog): lo = logo.get_logo(self.config.logo) await ctx.send(f"```\n{lo}\n```") + @cog_ext.cog_slash( + name="rcauto", + description="Automates robot camo letters", + guild_ids=[578757004059738142], + option=[ + create_option( + name="text", description="Text to camo-ify", option_type=3 + ) + ], + ) + async def _rcauto(self, ctx: SlashContext, text: str): + text = "" + for letter in text: + if letter == " ": + text += " " + else: + text += f":rc{letter}:" + await ctx.send(text) + def setup(bot): bot.add_cog(UtilCog(bot))