Implementado comando msginfo

This commit is contained in:
binlab
2024-04-11 19:21:34 +00:00
parent 30123e736e
commit 05883dcab2

22
main.py
View File

@@ -54,6 +54,26 @@ async def on_message(message):
await send_log(f"rip. Error: ```{e}```") 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", @bot.slash_command(name="add",
description=f"Añade una característica más de {os.environ['N1']} o {os.environ['N2']}!", description=f"Añade una característica más de {os.environ['N1']} o {os.environ['N2']}!",
guild_only = True, guild_only = True,
@@ -193,7 +213,7 @@ async def rima(ctx, message):
elif message.content.lower().endswith("jueves") and message.author != bot.user: 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) 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) 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: except Exception as e: