From b0ca5f3393beb1d02f987e3c3f6c11d9f1df85d9 Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 9 Jan 2023 01:06:06 -0500 Subject: feat: split messages that are too long --- src/moyai_bot/bot.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/moyai_bot/bot.py') diff --git a/src/moyai_bot/bot.py b/src/moyai_bot/bot.py index 8ba5ac0..f4b2f25 100644 --- a/src/moyai_bot/bot.py +++ b/src/moyai_bot/bot.py @@ -54,8 +54,13 @@ async def moyaispam(ctx: commands.Context): app_commands.Choice(name="happymeal", value="happymeal"), app_commands.Choice(name="ismah", value="ismah"), app_commands.Choice(name="sus", value="sus"), - app_commands.Choice(name="ticktock", value="ticktock") + app_commands.Choice(name="ticktock", value="ticktock"), ]) -async def copypasta(i: discord.Interaction, choices: app_commands.Choice[str]): - msg = get_copypasta(choices.value) - await i.response.send_message(msg) +async def copypasta(interaction: discord.Interaction, + choices: app_commands.Choice[str]): + msgs = get_copypasta(choices.value) + for i, msg in enumerate(msgs): + if i == 0: + await interaction.response.send_message(msg) + else: + await interaction.channel.send(msg) -- cgit v1.2.3