From 05883dcab2bc0c01fc3b0f6d5953b0eefa771cf1 Mon Sep 17 00:00:00 2001 From: binlab Date: Thu, 11 Apr 2024 19:21:34 +0000 Subject: [PATCH] Implementado comando `msginfo` --- main.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index ffe700f..1af5809 100644 --- a/main.py +++ b/main.py @@ -54,6 +54,26 @@ async def on_message(message): await send_log(f"rip. Error: ```{e}```") +@bot.slash_command(name="msginfo", + description="Comprobar la longitud de cualquiera de las dos listas", + guild_only=True, + guild_ids=1051497546012430388) +async def msginfo(ctx, user: discord.Option(choices=[os.environ['N1'], os.environ['N2']])): + try: + msg = 0 + if user == os.environ['N1']: + channel = bot.get_channel(1166495380003889232) + msg = await channel.fetch_message(1167496435944652891) + + elif user == os.environ['N2']: + channel = bot.get_channel(1153429735527948399) + msg = await channel.fetch_message(1153429808429158460) + + await ctx.respond(len(msg)) + + except Exception as e: + await send_log(f"rip. Error: ```{e}```") + @bot.slash_command(name="add", description=f"Añade una característica más de {os.environ['N1']} o {os.environ['N2']}!", guild_only = True, @@ -193,7 +213,7 @@ async def rima(ctx, message): elif message.content.lower().endswith("jueves") and message.author != bot.user: await ctx.reply(random.choices(["https://media.tenor.com/riA830QHvC8AAAAC/feliz-jueves-asuka.gif","https://media.tenor.com/L2-mDROrwgwAAAAd/racism.gif"], k=1, weights=[9,1])[0], mention_author=True) - elif message.content.lower().endswith(("33", "treinta y tres")) and message.author != bot.user: + elif any(i in message.content for i in ("33", "treinta y tres")) and message.author != bot.user: await ctx.reply("https://tenor.com/view/fernando-alonso-live-fernando-reaction-alonso-fernando-live-reaction-gif-1814768510923235803", delete_after=5) except Exception as e: